@designcrowd/library.brand-page 5.14.11 → 5.14.12
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-BJ3Foxao.js → CreatedOnBrandCrowd-de-de-C5tl1NwD.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-BjI_fxWY.js → CreatedOnBrandCrowd-en-us-C7J2vGwU.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-Dt8190BK.js → CreatedOnBrandCrowd-es-es-IREekVx2.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-Ck6zCiIn.js → CreatedOnBrandCrowd-fr-fr-EJkAJ0iH.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-CaNvmzQJ.js → CreatedOnBrandCrowd-pt-pt-mKBH6Ary.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-DMEecXw8.js → CreatedOnDcom-de-de-CWWw2LBb.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-BZIPLMxJ.js → CreatedOnDcom-en-us-Db6zzKtc.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-D6ey1TnI.js → CreatedOnDcom-es-es-CsMu_iBW.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-NaeiDsv-.js → CreatedOnDcom-fr-fr-oJRc8eop.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-BwEUUii2.js → CreatedOnDcom-pt-pt-CQ_otC6l.js} +1 -1
- package/lib/src/brand-page/components/button/Button.mixin.js +4 -2
- package/lib/src/brand-page/models/index.d.ts +9 -2
- package/lib/src/brand-page/utils/migration/migration-06.d.ts +2 -0
- package/lib/src/brand-page/utils/migration/migration-06.js +48 -0
- package/lib/src/brand-page/utils/migration.util.js +6 -0
- package/lib/src/brand-page/utils/view-model.util.js +49 -11
- package/lib/src/brand-page/view-models.d.ts +10 -3
- package/lib/src/brand-page-maker/constants/config-settings-constant.js +8 -1
- package/lib/src/brand-page-maker/models/content-settings.js +7 -1
- package/lib/src/{bundled-translations-B54196Rf.js → bundled-translations-fWikWTfa.js} +15 -15
- package/lib/src/{bundled-translations.de-DE-CNESUsYJ.js → bundled-translations.de-DE-CwtsRCCr.js} +33 -33
- package/lib/src/{bundled-translations.es-ES-FWge029M.js → bundled-translations.es-ES-DELCLCbF.js} +9 -9
- package/lib/src/{bundled-translations.fr-CA-DlWfm29N.js → bundled-translations.fr-CA-PDBhYlx8.js} +17 -17
- package/lib/src/{bundled-translations.fr-FR-DRCMzVfh.js → bundled-translations.fr-FR-OuZj3i-r.js} +24 -24
- package/lib/src/{bundled-translations.pt-BR-llUnBWoL.js → bundled-translations.pt-BR-RPfprZOm.js} +36 -36
- package/lib/src/{bundled-translations.pt-PT-K74Dt682.js → bundled-translations.pt-PT-DF_GCXSl.js} +5 -5
- package/lib/src/bundles/bundled-translations.de-DE.json +18 -2
- package/lib/src/bundles/bundled-translations.es-ES.json +18 -2
- package/lib/src/bundles/bundled-translations.fr-CA.json +18 -2
- package/lib/src/bundles/bundled-translations.fr-FR.json +18 -2
- package/lib/src/bundles/bundled-translations.json +18 -2
- package/lib/src/bundles/bundled-translations.pt-BR.json +18 -2
- package/lib/src/bundles/bundled-translations.pt-PT.json +18 -2
- package/lib/src/css/library.brand-page-brandCrowd.min.css +31 -28
- package/lib/src/css/library.brand-page-brandPage.min.css +31 -28
- package/lib/src/css/library.brand-page-designCom.min.css +31 -28
- package/lib/src/css/library.brand-page-preview.min.css +31 -28
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-C0mkZ8UD.js → lib-CwoD7AhY.js} +26687 -26581
- package/lib/src/shared/content-settings/components/items-field/ItemsField.mixin.d.ts +3 -3
- package/lib/src/shared/content-settings/components/items-field/ItemsField.mixin.js +3 -3
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +2 -2
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +2 -2
- package/package.json +1 -1
- package/src/brand-page/components/button/Button.mixin.ts +4 -2
- package/src/brand-page/components/fallback-image/FallbackImage.vue +1 -1
- package/src/brand-page/components/image/Image.vue +1 -1
- package/src/brand-page/components/images-section/ImagesSection.test.ts +230 -0
- package/src/brand-page/components/images-section/ImagesSection.vue +185 -18
- package/src/brand-page/components/shapes-section/ShapesSection.vue +19 -9
- package/src/brand-page/components/text-media-section/TextMediaSection.vue +166 -7
- package/src/brand-page/models/index.ts +10 -2
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +3 -3
- package/src/brand-page/utils/migration/migration-06.ts +64 -0
- package/src/brand-page/utils/migration.util.ts +6 -0
- package/src/brand-page/utils/view-model.util.ts +62 -13
- package/src/brand-page/view-models.ts +8 -2
- package/src/brand-page-maker/constants/config-settings-constant.ts +7 -1
- package/src/brand-page-maker/models/content-settings.ts +7 -1
- package/src/bundles/bundled-translations.de-DE.json +18 -2
- package/src/bundles/bundled-translations.es-ES.json +18 -2
- package/src/bundles/bundled-translations.fr-CA.json +18 -2
- package/src/bundles/bundled-translations.fr-FR.json +18 -2
- package/src/bundles/bundled-translations.json +18 -2
- package/src/bundles/bundled-translations.pt-BR.json +18 -2
- package/src/bundles/bundled-translations.pt-PT.json +18 -2
- package/src/shared/content-settings/components/button-configuration-field/ButtonConfigurationField.vue +283 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.de-DE.json +1 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.es-ES.json +1 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-CA.json +1 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-FR.json +1 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.json +1 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-BR.json +1 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-PT.json +1 -0
- package/src/shared/content-settings/components/items-field/ItemsField.mixin.ts +3 -3
- package/src/shared/content-settings/components/text-image-field/TextImageField.vue +428 -92
- package/src/shared/content-settings/components/text-image-field/i18n/text-image-field.de-DE.json +18 -3
- package/src/shared/content-settings/components/text-image-field/i18n/text-image-field.es-ES.json +18 -3
- package/src/shared/content-settings/components/text-image-field/i18n/text-image-field.fr-CA.json +18 -3
- package/src/shared/content-settings/components/text-image-field/i18n/text-image-field.fr-FR.json +18 -3
- package/src/shared/content-settings/components/text-image-field/i18n/text-image-field.json +18 -2
- package/src/shared/content-settings/components/text-image-field/i18n/text-image-field.pt-BR.json +18 -3
- package/src/shared/content-settings/components/text-image-field/i18n/text-image-field.pt-PT.json +18 -3
- package/lib/src/brand-page/components/images-section/ImagesSection.mixin.d.ts +0 -86
- package/lib/src/brand-page/components/images-section/ImagesSection.mixin.js +0 -149
- package/lib/src/brand-page/components/shapes-section/ShapesSection.mixin.d.ts +0 -62
- package/lib/src/brand-page/components/shapes-section/ShapesSection.mixin.js +0 -25
- package/lib/src/brand-page/components/text-media-section/TextMediaSection.mixin.d.ts +0 -66
- package/lib/src/brand-page/components/text-media-section/TextMediaSection.mixin.js +0 -90
- package/lib/src/shared/content-settings/components/text-image-field/TextImageField.mixin.d.ts +0 -126
- package/lib/src/shared/content-settings/components/text-image-field/TextImageField.mixin.js +0 -192
- package/src/brand-page/components/images-section/ImagesSection.mixin.ts +0 -183
- package/src/brand-page/components/shapes-section/ShapesSection.mixin.ts +0 -29
- package/src/brand-page/components/text-media-section/TextMediaSection.mixin.ts +0 -124
- package/src/shared/content-settings/components/text-image-field/TextImageField.mixin.ts +0 -252
|
@@ -110,7 +110,8 @@ export default defineComponent({
|
|
|
110
110
|
},
|
|
111
111
|
isValidUrl() {
|
|
112
112
|
if (this.viewModel.role === 'banner-section' ||
|
|
113
|
-
this.viewModel.role === 'booking-section'
|
|
113
|
+
this.viewModel.role === 'booking-section' ||
|
|
114
|
+
this.viewModel.role === 'images-section') {
|
|
114
115
|
switch (this.viewModel.buttonLinkType) {
|
|
115
116
|
case 'mailTo':
|
|
116
117
|
return isEmail(this.viewModel.url);
|
|
@@ -131,7 +132,8 @@ export default defineComponent({
|
|
|
131
132
|
},
|
|
132
133
|
url() {
|
|
133
134
|
if (this.viewModel.role === 'banner-section' ||
|
|
134
|
-
this.viewModel.role === 'booking-section'
|
|
135
|
+
this.viewModel.role === 'booking-section' ||
|
|
136
|
+
this.viewModel.role === 'images-section') {
|
|
135
137
|
switch (this.viewModel.buttonLinkType) {
|
|
136
138
|
case 'mailTo':
|
|
137
139
|
return `mailto:${this.viewModel.url}`;
|
|
@@ -114,7 +114,7 @@ export interface ImageItem {
|
|
|
114
114
|
mediaType?: MediaType;
|
|
115
115
|
colorReplacements?: ColorReplacement[];
|
|
116
116
|
size?: string;
|
|
117
|
-
imageLink: string;
|
|
117
|
+
imageLink: string | false;
|
|
118
118
|
imageUrlOverride?: string;
|
|
119
119
|
imageTitleOverride?: string;
|
|
120
120
|
}
|
|
@@ -280,8 +280,13 @@ export type MediaType = keyof typeof MEDIA_TYPES;
|
|
|
280
280
|
export interface TextMediaItem extends ImageItem {
|
|
281
281
|
title: string;
|
|
282
282
|
paragraph: string;
|
|
283
|
-
imageLink: string;
|
|
284
283
|
itemsId: number;
|
|
284
|
+
buttonText?: string | false;
|
|
285
|
+
pageSlug?: string;
|
|
286
|
+
buttonLinkType?: ButtonLinkType;
|
|
287
|
+
url?: string;
|
|
288
|
+
email?: string;
|
|
289
|
+
tel?: string;
|
|
285
290
|
titleOverride?: string;
|
|
286
291
|
paragraphOverride?: string;
|
|
287
292
|
}
|
|
@@ -326,6 +331,7 @@ export interface ImagesSectionContent extends Content, MediaSection {
|
|
|
326
331
|
aspectRatio: AspectRatio;
|
|
327
332
|
areImagesFullWidth: boolean;
|
|
328
333
|
cardStyle: BrandPageCssStyle;
|
|
334
|
+
enablePopup: boolean;
|
|
329
335
|
}
|
|
330
336
|
export interface MediaSection extends Content {
|
|
331
337
|
title: string;
|
|
@@ -337,6 +343,7 @@ export interface MediaSection extends Content {
|
|
|
337
343
|
headingStyle: TextStyleDeclaration;
|
|
338
344
|
paragraphStyle: TextStyleDeclaration;
|
|
339
345
|
backgroundStyle: BrandPageCssStyle;
|
|
346
|
+
buttonTextStyle?: TextStyleDeclaration;
|
|
340
347
|
}
|
|
341
348
|
export interface ColorReplacement {
|
|
342
349
|
attribute: string;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import {} from '../..';
|
|
2
|
+
import { isImagesContent } from '../model.util';
|
|
3
|
+
export const migration06 = (brandPageModel) => {
|
|
4
|
+
brandPageModel.pages.forEach((page) => {
|
|
5
|
+
page.contents.forEach((content) => {
|
|
6
|
+
// Migration for ImagesSection content
|
|
7
|
+
if (isImagesContent(content)) {
|
|
8
|
+
const imagesSectionContent = content;
|
|
9
|
+
// Add content-level buttonTextStyle if it doesn't exist
|
|
10
|
+
if (imagesSectionContent.buttonTextStyle === undefined) {
|
|
11
|
+
imagesSectionContent.buttonTextStyle = {};
|
|
12
|
+
}
|
|
13
|
+
// Add content-level buttonTextStyle if it doesn't exist
|
|
14
|
+
if (imagesSectionContent.enablePopup === undefined) {
|
|
15
|
+
imagesSectionContent.enablePopup = true;
|
|
16
|
+
}
|
|
17
|
+
imagesSectionContent.items?.forEach((item) => {
|
|
18
|
+
const mediaItem = item;
|
|
19
|
+
// Add buttonText if it doesn't exist
|
|
20
|
+
if (mediaItem.buttonText === undefined) {
|
|
21
|
+
mediaItem.buttonText = false;
|
|
22
|
+
}
|
|
23
|
+
// Remove item-level buttonTextStyle as it's now at content level
|
|
24
|
+
if (mediaItem.buttonTextStyle !== undefined) {
|
|
25
|
+
delete mediaItem.buttonTextStyle;
|
|
26
|
+
}
|
|
27
|
+
// Add button link properties if they don't exist
|
|
28
|
+
if (mediaItem.buttonLinkType === undefined) {
|
|
29
|
+
mediaItem.buttonLinkType = 'url';
|
|
30
|
+
}
|
|
31
|
+
if (mediaItem.url === undefined) {
|
|
32
|
+
mediaItem.url = '';
|
|
33
|
+
}
|
|
34
|
+
if (mediaItem.email === undefined) {
|
|
35
|
+
mediaItem.email = '';
|
|
36
|
+
}
|
|
37
|
+
if (mediaItem.tel === undefined) {
|
|
38
|
+
mediaItem.tel = '';
|
|
39
|
+
}
|
|
40
|
+
if (mediaItem.pageSlug === undefined) {
|
|
41
|
+
mediaItem.pageSlug = '';
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
return brandPageModel;
|
|
48
|
+
};
|
|
@@ -7,6 +7,7 @@ import { migration04 } from './migration/migration-04';
|
|
|
7
7
|
import { migration05 } from './migration/migration-05';
|
|
8
8
|
import { migration05_1 } from './migration/migration-05_1';
|
|
9
9
|
import { migration05_2 } from './migration/migration-05_2';
|
|
10
|
+
import { migration06 } from './migration/migration-06';
|
|
10
11
|
const MIGRATION_TABLE = [
|
|
11
12
|
{
|
|
12
13
|
version: 1,
|
|
@@ -49,6 +50,11 @@ const MIGRATION_TABLE = [
|
|
|
49
50
|
migrateFn: migration05_2,
|
|
50
51
|
description: 'Migrating twitter content to x content',
|
|
51
52
|
},
|
|
53
|
+
{
|
|
54
|
+
version: 6,
|
|
55
|
+
migrateFn: migration06,
|
|
56
|
+
description: 'Migrating new fields for images section',
|
|
57
|
+
},
|
|
52
58
|
];
|
|
53
59
|
export const GetLatestModelVersion = () => Math.max(...MIGRATION_TABLE.map((x) => x.version));
|
|
54
60
|
export const migrateBrandPageModel = (brandPageModel, options) => {
|
|
@@ -201,10 +201,23 @@ const mapToButtonViewModel = (content, styles, options) => {
|
|
|
201
201
|
},
|
|
202
202
|
selectedButtonStyleId: styles.buttonStyles.selectedButtonStyleId,
|
|
203
203
|
};
|
|
204
|
+
// Extract only text-related properties from titleStyle, excluding button styling properties
|
|
205
|
+
const textOnlyProperties = {
|
|
206
|
+
color: options.titleStyle.color,
|
|
207
|
+
fontFamily: options.titleStyle.fontFamily,
|
|
208
|
+
fontSize: options.titleStyle.fontSize,
|
|
209
|
+
fontWeight: options.titleStyle.fontWeight,
|
|
210
|
+
textAlign: options.titleStyle.textAlign,
|
|
211
|
+
letterSpacing: options.titleStyle.letterSpacing,
|
|
212
|
+
lineHeight: options.titleStyle.lineHeight || LINE_HEIGHT_HEADINGS,
|
|
213
|
+
textStyleType: options.titleStyle.textStyleType,
|
|
214
|
+
applyAutoScale: options.titleStyle.applyAutoScale,
|
|
215
|
+
textDecoration: options.titleStyle.textDecoration,
|
|
216
|
+
fontStyle: options.titleStyle.fontStyle,
|
|
217
|
+
};
|
|
204
218
|
/* For text content text style backward compatibility */
|
|
205
219
|
const titleStyle = {
|
|
206
|
-
|
|
207
|
-
...options.titleStyle,
|
|
220
|
+
...textOnlyProperties,
|
|
208
221
|
};
|
|
209
222
|
return applyViewModelTextStyles({
|
|
210
223
|
...content,
|
|
@@ -415,31 +428,56 @@ const mapToDividerSectionViewModel = (content) => {
|
|
|
415
428
|
};
|
|
416
429
|
};
|
|
417
430
|
export const mapToImagesSectionViewModel = (content, styles, brandPageType) => {
|
|
431
|
+
const processedItems = content.items
|
|
432
|
+
.map((item, index) => ({
|
|
433
|
+
...item,
|
|
434
|
+
itemsId: index,
|
|
435
|
+
}))
|
|
436
|
+
.filter((item) => content.displayStyle === ALIGN_LEFT_ALIGNED ||
|
|
437
|
+
content.displayStyle === ALIGN_RIGHT_ALIGNED
|
|
438
|
+
? item.itemsId < MAX_IMAGES_SECTION_ALIGNMENT_ITEMS_LENGTH
|
|
439
|
+
: true)
|
|
440
|
+
.map((item) => ({
|
|
441
|
+
...item,
|
|
442
|
+
buttonViewModel: item.buttonText && typeof item.buttonText === 'string'
|
|
443
|
+
? mapToButtonViewModel({
|
|
444
|
+
...content,
|
|
445
|
+
clickActionField: 'url',
|
|
446
|
+
iconUrl: '',
|
|
447
|
+
modalImageUrl: '',
|
|
448
|
+
url: item.url,
|
|
449
|
+
title: item.buttonText || '',
|
|
450
|
+
page: item.pageSlug || '',
|
|
451
|
+
colorReplacements: [],
|
|
452
|
+
titleStyle: content.buttonTextStyle || styles.buttonStyles.style,
|
|
453
|
+
}, styles, {
|
|
454
|
+
titleStyle: content.buttonTextStyle || styles.buttonStyles.style,
|
|
455
|
+
})
|
|
456
|
+
: undefined,
|
|
457
|
+
}));
|
|
418
458
|
return applyViewModelTextStyles({
|
|
419
459
|
...content,
|
|
420
460
|
role: content.type,
|
|
421
461
|
type: 'images-section',
|
|
462
|
+
buttonTextStyle: styles.buttonStyles.style,
|
|
422
463
|
isFullWidth: brandPageType === BRAND_PAGE_TYPES.brandSite ||
|
|
423
464
|
((brandPageType === BRAND_PAGE_TYPES.default ||
|
|
424
465
|
brandPageType === BRAND_PAGE_TYPES.brandContact) &&
|
|
425
466
|
content.areImagesFullWidth),
|
|
426
|
-
items:
|
|
427
|
-
.map((item, index) => ({
|
|
428
|
-
...item,
|
|
429
|
-
itemsId: index,
|
|
430
|
-
}))
|
|
431
|
-
.filter((item) => content.displayStyle === ALIGN_LEFT_ALIGNED ||
|
|
432
|
-
content.displayStyle === ALIGN_RIGHT_ALIGNED
|
|
433
|
-
? item.itemsId < MAX_IMAGES_SECTION_ALIGNMENT_ITEMS_LENGTH
|
|
434
|
-
: true),
|
|
467
|
+
items: processedItems,
|
|
435
468
|
}, styles);
|
|
436
469
|
};
|
|
437
470
|
const mapToShapesSectionViewModel = (content, styles, brandPageType) => {
|
|
471
|
+
const processedItems = content.items.map((item, index) => ({
|
|
472
|
+
...item,
|
|
473
|
+
itemsId: index,
|
|
474
|
+
}));
|
|
438
475
|
return applyViewModelTextStyles({
|
|
439
476
|
...content,
|
|
440
477
|
role: content.type,
|
|
441
478
|
type: 'shapes-section',
|
|
442
479
|
isFullWidth: brandPageType === BRAND_PAGE_TYPES.brandSite,
|
|
480
|
+
items: processedItems,
|
|
443
481
|
}, styles);
|
|
444
482
|
};
|
|
445
483
|
const mapToShopViewModel = (content, styles) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PageStyles, ButtonWithModalContent, ProfileContent, TextContent, VideoContent, ImageContent, ContentType, ButtonStyles, LogoStyles, MapContent, ImageGalleryContent, GalleryStyles, MailingListContent, RequestPaymentContent, ShopContent, SupportMeContent, ContactFormContent, BannerSectionContent, BrandPageType, SocialLinksContent, TestimonialSectionContent, AboutSectionContent, DividerSectionContent, ShapesSectionContent, ButtonLinkType, PageHeaderMobile, PageHeaderDesktop, PageFooterMobile, PageFooterDesktop, TextMediaItem, TextStyleDeclaration, AspectRatio, LogoImageModel, LogoTemplateImageModel, CookieOptions, BookingSectionContent } from './models';
|
|
1
|
+
import type { PageStyles, ButtonWithModalContent, ProfileContent, TextContent, VideoContent, ImageContent, ContentType, ButtonStyles, LogoStyles, MapContent, ImageGalleryContent, GalleryStyles, MailingListContent, RequestPaymentContent, ShopContent, SupportMeContent, ContactFormContent, BannerSectionContent, BrandPageType, SocialLinksContent, TestimonialSectionContent, AboutSectionContent, DividerSectionContent, ShapesSectionContent, ButtonLinkType, PageHeaderMobile, PageHeaderDesktop, PageFooterMobile, PageFooterDesktop, TextMediaItem, TextShapeItem, TextStyleDeclaration, AspectRatio, LogoImageModel, LogoTemplateImageModel, CookieOptions, BookingSectionContent } from './models';
|
|
2
2
|
import type { ImagesSectionContentDisplayStyle } from './constants';
|
|
3
3
|
export type ViewModelType = 'button' | 'image' | 'image-gallery' | 'logo' | 'map' | 'mailing-list' | 'profile' | 'support-me' | 'request-payment' | 'text' | 'video' | 'contact-form' | 'banner-section' | 'images-section' | 'about-section' | 'divider-section' | 'testimonial-section' | 'social-links' | 'shapes-section' | 'shop-section' | 'booking-section';
|
|
4
4
|
export interface ContentViewModel {
|
|
@@ -36,7 +36,8 @@ export interface LogoViewModel extends ContentViewModel {
|
|
|
36
36
|
export interface ProfileViewModel extends ContentViewModel, Omit<ProfileContent, 'type'> {
|
|
37
37
|
containerStyle?: BrandPageCssStyle;
|
|
38
38
|
}
|
|
39
|
-
export interface ShapesSectionViewModel extends ContentViewModel, Omit<ShapesSectionContent, 'type'> {
|
|
39
|
+
export interface ShapesSectionViewModel extends ContentViewModel, Omit<ShapesSectionContent, 'type' | 'items'> {
|
|
40
|
+
items: TextShapeItem[];
|
|
40
41
|
isFullWidth: boolean;
|
|
41
42
|
}
|
|
42
43
|
export type TextViewModel = ContentViewModel & Omit<TextContent, 'type' | 'textSize' | 'textAlignment' | 'textColor'> & {
|
|
@@ -74,15 +75,21 @@ export interface TextImageSectionViewModel {
|
|
|
74
75
|
type: 'images-section';
|
|
75
76
|
role: ContentType;
|
|
76
77
|
title: string;
|
|
78
|
+
description: string;
|
|
77
79
|
displayStyle: ImagesSectionContentDisplayStyle;
|
|
78
80
|
aspectRatio: AspectRatio;
|
|
79
81
|
areImagesFullWidth: boolean;
|
|
80
|
-
|
|
82
|
+
enablePopup: boolean;
|
|
83
|
+
items: (TextMediaItem & {
|
|
84
|
+
buttonViewModel?: ButtonViewModel;
|
|
85
|
+
})[];
|
|
81
86
|
backgroundStyle: BrandPageCssStyle;
|
|
82
87
|
titleStyle: TextStyleDeclaration;
|
|
88
|
+
descriptionStyle: TextStyleDeclaration;
|
|
83
89
|
headingStyle: TextStyleDeclaration;
|
|
84
90
|
paragraphStyle: TextStyleDeclaration;
|
|
85
91
|
cardStyle: BrandPageCssStyle;
|
|
92
|
+
buttonTextStyle?: TextStyleDeclaration;
|
|
86
93
|
isFullWidth: boolean;
|
|
87
94
|
}
|
|
88
95
|
export interface TestimonialSectionViewModel extends ContentViewModel, Omit<TestimonialSectionContent, 'type'> {
|
|
@@ -2,7 +2,7 @@ import { SOCIAL_LINKS_ICON_DISPLAY_STYLES, BRAND_PAGE_TYPES, DIVIDER_STYLES, MED
|
|
|
2
2
|
import { createInitialButtonContent, createInitialImageContent, createInitialProfileContent, createInitialTextContent, createInitialVideoContent, createInitialLogoContent, createInitialMapContent, createInitialImageGalleryContent, createInitialGeneralLinkContent, createInitialMailingListContent, createInitialRequestPaymentContent, createInitialSupportMeContent, createInitialContactFormContent, CONTENT_SETTINGS_DISPLAY_MODES, createInitialBannerSectionContent, createInitialSocialLinksContent, createInitialImagesSectionContent, createInitialTestimonialSectionContent, createInitialAboutSectionContent, createInitialDividerSectionContent, createInitialShapesSectionContent, VARIANT_DISPLAY_MODES, createInitialShopContent, createInitialBookingSectionContent, } from '../models';
|
|
3
3
|
import { colorConvertor, backgroundColorConvertor, borderColorConvertor, displayStyleConvertor, galleryTypeConvertor, imageAspectRatioConvertor, textAlignmentOptionsConvertor, videoContentStateConvertor, fillColorConvertor, bannerAlignDisplayStyleConvertor, aboutDisplayStyleConvertor, dividerStyleConvertor, shapeSizeOptionsConvertor, buttonLinkStyleConvertor, textSizeValueConvertor, textColumnStyleConvertor, contactLayoutStyleConvertor, paymentLinkDisplayStyleConvertor, shopDisplayConvertor, shopAspectRatioConvertor, } from '../convertors';
|
|
4
4
|
import { ALIGN_CENTERED, DISPLAY_STYLE_COLLAPSED, DISPLAY_STYLE_PREVIEW, } from '../../brand-page';
|
|
5
|
-
import { imageFieldVisibilityAssessor, imageOptionVisibilityAssessor, imageGalleryFieldVisibilityAssessor, cardFillVisibilityAssessor, mediaSectionItemsFieldTypeAssessor, dividerToggleFieldVisibilityAssessor, shapeSectionItemsFieldTypeAssessor, colorReplacementVisibilityTypeAssessor, colorReplacementProfileVisibilityTypeAssessor, colorReplacementIconVisibilityTypeAssessor, imagesSectionCardStyleVisibilityAssessor,
|
|
5
|
+
import { imageFieldVisibilityAssessor, imageOptionVisibilityAssessor, imageGalleryFieldVisibilityAssessor, cardFillVisibilityAssessor, mediaSectionItemsFieldTypeAssessor, dividerToggleFieldVisibilityAssessor, shapeSectionItemsFieldTypeAssessor, colorReplacementVisibilityTypeAssessor, colorReplacementProfileVisibilityTypeAssessor, colorReplacementIconVisibilityTypeAssessor, imagesSectionCardStyleVisibilityAssessor, contactCardDisplayTypeVisibilityAssessor, imageUrlVisibilityAssessor, displayTypeVisibilityAssessor, logoFieldVisibilityAssessor, shapesSectionCardStyleVisibilityAssessor, shopImageOptionVisibilityAssessor, shopItemColorVisibility, personalisationOverrideVisibility, } from '../assessors';
|
|
6
6
|
import { logoBackgroundColorDefaultGetter, paymentFillColorFieldDefaultGetter, paymentTextAndBorderColorFieldDefaultGetter, shopBorderColorFieldDefaultGetter, shopFillColorFieldDefaultGetter, textColorFieldDefaultGetter, } from '../default-getters';
|
|
7
7
|
import { socialLinksIconDisplayStyleConvertor } from '../convertors/social-links-icon-display-style.convertor';
|
|
8
8
|
import { getTextMediaOptionsConverterByMediaType } from '../convertors/text-image-display-style.convertor';
|
|
@@ -2122,6 +2122,12 @@ export const IMAGES_SECTION_SETTINGS_CONFIG = () => ({
|
|
|
2122
2122
|
? VARIANT_DISPLAY_MODES.custom
|
|
2123
2123
|
: VARIANT_DISPLAY_MODES.none,
|
|
2124
2124
|
},
|
|
2125
|
+
enablePopup: {
|
|
2126
|
+
type: 'toggle',
|
|
2127
|
+
label: contentSettingsTr(`enablePopupLabel`),
|
|
2128
|
+
defaultValue: true,
|
|
2129
|
+
groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.style,
|
|
2130
|
+
},
|
|
2125
2131
|
areImagesFullWidth: {
|
|
2126
2132
|
type: 'toggle',
|
|
2127
2133
|
label: contentSettingsTr(`fullWidthLabel`),
|
|
@@ -2139,6 +2145,7 @@ export const IMAGES_SECTION_SETTINGS_CONFIG = () => ({
|
|
|
2139
2145
|
descriptionStyle: TEXT_MEDIA_DESCRIPTION_STYLE_FIELD(),
|
|
2140
2146
|
headingStyle: TEXT_MEDIA_HEADING_STYLE_FIELD(),
|
|
2141
2147
|
paragraphStyle: TEXT_MEDIA_PARAGRAPH_STYLE_FIELD(),
|
|
2148
|
+
buttonTextStyle: DEFAULT_BUTTON_TEXT_STYLE_FIELD(),
|
|
2142
2149
|
cardStyle: {
|
|
2143
2150
|
type: 'color',
|
|
2144
2151
|
groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.style,
|
|
@@ -455,6 +455,7 @@ export const createInitialImagesSectionContent = (options) => {
|
|
|
455
455
|
displayStyle: 'centered',
|
|
456
456
|
aspectRatio: 'Default',
|
|
457
457
|
areImagesFullWidth: false,
|
|
458
|
+
enablePopup: true,
|
|
458
459
|
items: [
|
|
459
460
|
{
|
|
460
461
|
height: -1,
|
|
@@ -464,7 +465,7 @@ export const createInitialImagesSectionContent = (options) => {
|
|
|
464
465
|
paragraph: '',
|
|
465
466
|
title: '',
|
|
466
467
|
width: -1,
|
|
467
|
-
imageLink:
|
|
468
|
+
imageLink: false,
|
|
468
469
|
itemsId: -1,
|
|
469
470
|
},
|
|
470
471
|
],
|
|
@@ -490,6 +491,11 @@ export const createInitialImagesSectionContent = (options) => {
|
|
|
490
491
|
textStyleType: TEXT_STYLE_TYPES.paragraphs,
|
|
491
492
|
textAlign: 'center',
|
|
492
493
|
},
|
|
494
|
+
buttonTextStyle: {
|
|
495
|
+
applyAutoScale: options?.brandPageType === BRAND_PAGE_TYPES.brandSite,
|
|
496
|
+
textStyleType: TEXT_STYLE_TYPES.buttons,
|
|
497
|
+
textAlign: 'center',
|
|
498
|
+
},
|
|
493
499
|
};
|
|
494
500
|
};
|
|
495
501
|
export const createInitialTestimonialSectionContent = (options) => {
|