@designcrowd/library.brand-page 5.14.8 → 5.14.10-ast-images-update
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-CiXGpUsj.js → CreatedOnBrandCrowd-de-de-6zRUEocE.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-BjBeAHIJ.js → CreatedOnBrandCrowd-en-us-GkTM5deg.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-COz-dVj5.js → CreatedOnBrandCrowd-es-es-B_D3iMlX.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-DdRo8IoH.js → CreatedOnBrandCrowd-fr-fr-D_3YNh30.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-YPxQ1gbj.js → CreatedOnBrandCrowd-pt-pt-DDzT0ViR.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-DeUP5Ur5.js → CreatedOnDcom-de-de-DVOfC8nd.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-BjaQwhMw.js → CreatedOnDcom-en-us-CryPyu9w.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-CYexVJc5.js → CreatedOnDcom-es-es-D5KYEcv7.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-BktbLTrT.js → CreatedOnDcom-fr-fr-BpceZN9h.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-HnEwifku.js → CreatedOnDcom-pt-pt-DnlMPcg8.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-05_3.d.ts +2 -0
- package/lib/src/brand-page/utils/migration/migration-05_3.js +48 -0
- package/lib/src/brand-page/utils/personalisation.util.js +2 -2
- 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/components/brand-page-maker/BrandPageMaker.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/seo-settings/UseExistingDomainModal.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/upgrade-to-premium-button/UpgradeToPremiumButton.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/composables/useEventTracker.d.ts +2 -0
- package/lib/src/brand-page-maker/composables/useEventTracker.js +2 -0
- 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/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +1 -1
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.js +8 -2
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +2 -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-BXmT_3as.js → lib-BbIM3Ie7.js} +22201 -22083
- 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/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +1 -1
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +1 -1
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +3 -3
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +3 -3
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +1 -1
- package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +1 -1
- package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +1 -1
- 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 +193 -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/migration/migration-05_3.ts +66 -0
- package/src/brand-page/utils/personalisation.util.test.ts +9 -9
- package/src/brand-page/utils/personalisation.util.ts +2 -4
- 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/composables/useEventTracker.ts +2 -0
- 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/brand-page-maker/stores/brandpage-container/brand-page-container-store.ts +10 -3
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +4 -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 +282 -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 +455 -116
- 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 migration05_3 = (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
|
+
};
|
|
@@ -18,8 +18,8 @@ export const getPersonalisationMappingForContentType = (contentType) => {
|
|
|
18
18
|
};
|
|
19
19
|
export const getModifiedPersonalisationPropertyKeyBasedOnCondition = (property, option) => {
|
|
20
20
|
let newProperty = property;
|
|
21
|
-
if (property === 'description'
|
|
22
|
-
|
|
21
|
+
if (property === 'description') {
|
|
22
|
+
// For now we are using short description for all types
|
|
23
23
|
newProperty = 'descriptionShort';
|
|
24
24
|
}
|
|
25
25
|
else if (property === 'imageUrls' || property === 'shapes') {
|
|
@@ -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'> {
|
|
@@ -380,7 +380,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
380
380
|
saveTemplate(): Promise<void>;
|
|
381
381
|
setBrandPageStatus(status: any): Promise<void>;
|
|
382
382
|
showPublishModal(eventButtonLocation?: string | undefined, websiteUpsellModalViewModel?: any, isSubsequentPublish?: boolean | undefined): void;
|
|
383
|
-
showBrandPageSlugEditModal(): Promise<void>;
|
|
383
|
+
showBrandPageSlugEditModal(eventButtonLocation: string): Promise<void>;
|
|
384
384
|
showUpgradeModalAndSaveAsync(): Promise<void>;
|
|
385
385
|
showStripeOnboardingModal(): void;
|
|
386
386
|
closeStripeOnboardingModal(): void;
|
package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts
CHANGED
|
@@ -818,7 +818,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
818
818
|
saveTemplate(): Promise<void>;
|
|
819
819
|
setBrandPageStatus(status: any): Promise<void>;
|
|
820
820
|
showPublishModal(eventButtonLocation?: string | undefined, websiteUpsellModalViewModel?: any, isSubsequentPublish?: boolean | undefined): void;
|
|
821
|
-
showBrandPageSlugEditModal(): Promise<void>;
|
|
821
|
+
showBrandPageSlugEditModal(eventButtonLocation: string): Promise<void>;
|
|
822
822
|
showUpgradeModalAndSaveAsync(): Promise<void>;
|
|
823
823
|
showStripeOnboardingModal(): void;
|
|
824
824
|
closeStripeOnboardingModal(): void;
|
|
@@ -201,7 +201,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
201
201
|
saveTemplate(): Promise<void>;
|
|
202
202
|
setBrandPageStatus(status: any): Promise<void>;
|
|
203
203
|
showPublishModal(eventButtonLocation?: string | undefined, websiteUpsellModalViewModel?: any, isSubsequentPublish?: boolean | undefined): void;
|
|
204
|
-
showBrandPageSlugEditModal(): Promise<void>;
|
|
204
|
+
showBrandPageSlugEditModal(eventButtonLocation: string): Promise<void>;
|
|
205
205
|
showUpgradeModalAndSaveAsync(): Promise<void>;
|
|
206
206
|
showStripeOnboardingModal(): void;
|
|
207
207
|
closeStripeOnboardingModal(): void;
|
|
@@ -217,7 +217,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
217
217
|
saveTemplate(): Promise<void>;
|
|
218
218
|
setBrandPageStatus(status: any): Promise<void>;
|
|
219
219
|
showPublishModal(eventButtonLocation?: string | undefined, websiteUpsellModalViewModel?: any, isSubsequentPublish?: boolean | undefined): void;
|
|
220
|
-
showBrandPageSlugEditModal(): Promise<void>;
|
|
220
|
+
showBrandPageSlugEditModal(eventButtonLocation: string): Promise<void>;
|
|
221
221
|
showUpgradeModalAndSaveAsync(): Promise<void>;
|
|
222
222
|
showStripeOnboardingModal(): void;
|
|
223
223
|
closeStripeOnboardingModal(): void;
|
|
@@ -220,7 +220,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
220
220
|
saveTemplate(): Promise<void>;
|
|
221
221
|
setBrandPageStatus(status: any): Promise<void>;
|
|
222
222
|
showPublishModal(eventButtonLocation?: string | undefined, websiteUpsellModalViewModel?: any, isSubsequentPublish?: boolean | undefined): void;
|
|
223
|
-
showBrandPageSlugEditModal(): Promise<void>;
|
|
223
|
+
showBrandPageSlugEditModal(eventButtonLocation: string): Promise<void>;
|
|
224
224
|
showUpgradeModalAndSaveAsync(): Promise<void>;
|
|
225
225
|
showStripeOnboardingModal(): void;
|
|
226
226
|
closeStripeOnboardingModal(): void;
|
|
@@ -198,7 +198,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
198
198
|
saveTemplate(): Promise<void>;
|
|
199
199
|
setBrandPageStatus(status: any): Promise<void>;
|
|
200
200
|
showPublishModal(eventButtonLocation?: string | undefined, websiteUpsellModalViewModel?: any, isSubsequentPublish?: boolean | undefined): void;
|
|
201
|
-
showBrandPageSlugEditModal(): Promise<void>;
|
|
201
|
+
showBrandPageSlugEditModal(eventButtonLocation: string): Promise<void>;
|
|
202
202
|
showUpgradeModalAndSaveAsync(): Promise<void>;
|
|
203
203
|
showStripeOnboardingModal(): void;
|
|
204
204
|
closeStripeOnboardingModal(): void;
|
|
@@ -198,7 +198,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
198
198
|
saveTemplate(): Promise<void>;
|
|
199
199
|
setBrandPageStatus(status: any): Promise<void>;
|
|
200
200
|
showPublishModal(eventButtonLocation?: string | undefined, websiteUpsellModalViewModel?: any, isSubsequentPublish?: boolean | undefined): void;
|
|
201
|
-
showBrandPageSlugEditModal(): Promise<void>;
|
|
201
|
+
showBrandPageSlugEditModal(eventButtonLocation: string): Promise<void>;
|
|
202
202
|
showUpgradeModalAndSaveAsync(): Promise<void>;
|
|
203
203
|
showStripeOnboardingModal(): void;
|
|
204
204
|
closeStripeOnboardingModal(): void;
|
|
@@ -56,6 +56,8 @@ export declare const UPGRADE_CTA_LOCATIONS: {
|
|
|
56
56
|
ADD_CONTENT: string;
|
|
57
57
|
EDITOR_PUBLISH_TOP: string;
|
|
58
58
|
EDITOR_PUBLISH_BOTTOM: string;
|
|
59
|
+
SLUG_CHANGE_MAKER_SIDEBAR_SETTINGS: string;
|
|
60
|
+
SLUG_CHANGE_MANAGE_PAGE: string;
|
|
59
61
|
};
|
|
60
62
|
export declare const TRIGGER_TYPE: {
|
|
61
63
|
AUTOMATIC: string;
|
|
@@ -39,6 +39,8 @@ export const UPGRADE_CTA_LOCATIONS = {
|
|
|
39
39
|
ADD_CONTENT: 'add_content',
|
|
40
40
|
EDITOR_PUBLISH_TOP: 'editor_publish_top',
|
|
41
41
|
EDITOR_PUBLISH_BOTTOM: 'editor_publish_bottom',
|
|
42
|
+
SLUG_CHANGE_MAKER_SIDEBAR_SETTINGS: 'slug_change_maker_sidebar_settings',
|
|
43
|
+
SLUG_CHANGE_MANAGE_PAGE: 'slug_change_manage_page',
|
|
42
44
|
};
|
|
43
45
|
export const TRIGGER_TYPE = {
|
|
44
46
|
AUTOMATIC: 'automatic',
|
|
@@ -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) => {
|
|
@@ -253,7 +253,7 @@ export declare const useBrandPageContainerStore: import("pinia").StoreDefinition
|
|
|
253
253
|
saveTemplate(): Promise<void>;
|
|
254
254
|
setBrandPageStatus(status: any): Promise<void>;
|
|
255
255
|
showPublishModal(eventButtonLocation?: string, websiteUpsellModalViewModel?: any, isSubsequentPublish?: boolean): void;
|
|
256
|
-
showBrandPageSlugEditModal(): Promise<void>;
|
|
256
|
+
showBrandPageSlugEditModal(eventButtonLocation: string): Promise<void>;
|
|
257
257
|
showUpgradeModalAndSaveAsync(): Promise<void>;
|
|
258
258
|
showStripeOnboardingModal(): void;
|
|
259
259
|
closeStripeOnboardingModal(): void;
|
|
@@ -668,6 +668,12 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
668
668
|
this.setTriggerSaveEventApiOnPublishModalClose();
|
|
669
669
|
}
|
|
670
670
|
if (!response.canPublish) {
|
|
671
|
+
const eventTracker = useEventTracker();
|
|
672
|
+
eventTracker.setUpsellBridgeState({
|
|
673
|
+
cta_location: eventButtonLocation,
|
|
674
|
+
trigger_type: TRIGGER_TYPE.AUTOMATIC,
|
|
675
|
+
content_type: null,
|
|
676
|
+
});
|
|
671
677
|
this.setIsPublishUpgradeModal(true);
|
|
672
678
|
await this.showUpgradeModalAndSaveAsync();
|
|
673
679
|
return;
|
|
@@ -719,9 +725,9 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
719
725
|
websiteUpsellModalViewModel,
|
|
720
726
|
});
|
|
721
727
|
},
|
|
722
|
-
async showBrandPageSlugEditModal() {
|
|
728
|
+
async showBrandPageSlugEditModal(eventButtonLocation) {
|
|
723
729
|
await this.startBrandPageSlugEditMode();
|
|
724
|
-
await this.showPublishModal();
|
|
730
|
+
await this.showPublishModal(eventButtonLocation);
|
|
725
731
|
},
|
|
726
732
|
async showUpgradeModalAndSaveAsync() {
|
|
727
733
|
const eventTracker = useEventTracker();
|
|
@@ -30,6 +30,7 @@ import { applyLogoTemplateImageToBrandPageTemplateModel, getOptimalLogoSize, } f
|
|
|
30
30
|
import { FabricRenderClient } from '../../../clients/fabric-render-client';
|
|
31
31
|
import { useConsent } from '../../../brand-page/composables/consent.composable';
|
|
32
32
|
import { commonTr, errorTr } from '../../../composables/useTranslate';
|
|
33
|
+
import { UPGRADE_CTA_LOCATIONS } from '../../composables/useEventTracker';
|
|
33
34
|
const brandPageTypeTemplateTypeMap = {
|
|
34
35
|
[BRAND_PAGE_TYPES.default]: 'Brand Page',
|
|
35
36
|
[BRAND_PAGE_TYPES.brandSite]: 'Brand Site',
|
|
@@ -654,7 +655,7 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
654
655
|
},
|
|
655
656
|
async showBrandPageSlugEditModal() {
|
|
656
657
|
const brandPageContainerStore = useBrandPageContainerStore();
|
|
657
|
-
await brandPageContainerStore.showBrandPageSlugEditModal();
|
|
658
|
+
await brandPageContainerStore.showBrandPageSlugEditModal(UPGRADE_CTA_LOCATIONS.SLUG_CHANGE_MAKER_SIDEBAR_SETTINGS);
|
|
658
659
|
},
|
|
659
660
|
async updateBrandPageSettings(payload) {
|
|
660
661
|
const brandPageContainerStore = useBrandPageContainerStore();
|