@designcrowd/library.brand-page 5.12.14-upsell-6 → 5.12.15
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-4gdNQRfZ.js → CreatedOnBrandCrowd-de-de-CZd7RKCS.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-kl2UTn1f.js → CreatedOnBrandCrowd-en-us-DgUw_Gmk.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-DUuyFU8S.js → CreatedOnBrandCrowd-es-es-qmEj0qtS.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-CiNUgSZL.js → CreatedOnBrandCrowd-fr-fr-WSAFNEbH.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-DtUdufqG.js → CreatedOnBrandCrowd-pt-pt-QQsa4zfN.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-BXJ-VNwJ.js → CreatedOnDcom-de-de-Dgmk8ib6.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-B9rtV_a9.js → CreatedOnDcom-en-us-u6DK8Fzd.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-DXz-RaQI.js → CreatedOnDcom-es-es-CyOJpVzh.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-CAo4Td4h.js → CreatedOnDcom-fr-fr-CWzC5FlL.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-Ba42OWgc.js → CreatedOnDcom-pt-pt-DVigHaTn.js} +1 -1
- package/lib/src/brand-page/components/icon/Icon.mixin.d.ts +1 -1
- package/lib/src/brand-page/components/icon/Icon.mixin.js +2 -2
- package/lib/src/brand-page/models/brand-page-context.model.d.ts +0 -2
- package/lib/src/brand-page/models/brand-page-context.model.js +1 -2
- package/lib/src/brand-page/models/content.model.d.ts +1 -1
- package/lib/src/brand-page/models/content.model.js +1 -1
- package/lib/src/brand-page/models/index.d.ts +7 -13
- package/lib/src/brand-page/models/index.js +2 -2
- package/lib/src/brand-page/utils/button.util.d.ts +7 -0
- package/lib/src/brand-page/utils/button.util.js +29 -0
- package/lib/src/brand-page/utils/content-callback-util.js +1 -1
- package/lib/src/brand-page/utils/model.util.js +1 -1
- package/lib/src/brand-page/utils/style.util.js +7 -1
- package/lib/src/brand-page/utils/view-model.util.js +18 -21
- package/lib/src/brand-page-maker/components/admin-logo-settings/AdminLogoSettings.mixin.d.ts +2 -2
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +20 -23
- package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.js +2 -0
- package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/content-settings-items.fixture.d.ts +2 -2
- package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/content-settings-items.fixture.js +4 -4
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +22 -29
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.js +2 -0
- package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.d.ts +2 -5
- package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +3 -6
- package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +2 -5
- package/lib/src/brand-page-maker/components/seo-settings/UseExistingDomainModal.mixin.d.ts +2 -5
- package/lib/src/brand-page-maker/components/upgrade-to-premium-button/UpgradeToPremiumButton.mixin.d.ts +2 -5
- package/lib/src/brand-page-maker/composables/useEventTracker.d.ts +1 -7
- package/lib/src/brand-page-maker/composables/useEventTracker.js +4 -29
- package/lib/src/brand-page-maker/constants/config-settings-constant.d.ts +4 -2
- package/lib/src/brand-page-maker/constants/config-settings-constant.js +24 -5
- package/lib/src/brand-page-maker/constants/personalisation.constant.js +1 -1
- package/lib/src/brand-page-maker/models/content-settings.js +20 -2
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +2 -6
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.js +6 -43
- package/lib/src/brand-page-maker/utils/rich-text-editor.util.js +80 -0
- package/lib/src/bundled-translations-CD8h4dNr.js +27 -0
- package/lib/src/{bundled-translations-5b693qBQ.js → bundled-translations-DEYhoqLM.js} +10 -10
- package/lib/src/{bundled-translations.de-DE-Baq37kiT.js → bundled-translations.de-DE-B3NNo7JX.js} +22 -22
- package/lib/src/bundled-translations.de-DE-djs407Ih.js +27 -0
- package/lib/src/bundled-translations.es-ES-JjQoQaM7.js +27 -0
- package/lib/src/{bundled-translations.es-ES-BZB7Rc2f.js → bundled-translations.es-ES-_4IspVbp.js} +7 -7
- package/lib/src/{bundled-translations.fr-FR-QQJaBYEl.js → bundled-translations.fr-FR-9CdErV_a.js} +5 -5
- package/lib/src/bundled-translations.fr-FR-rUuRWfsM.js +27 -0
- package/lib/src/{bundled-translations.pt-PT-DXFlBwc9.js → bundled-translations.pt-PT-BSmtPIMr.js} +12 -12
- package/lib/src/bundled-translations.pt-PT-BiSQEFmA.js +27 -0
- package/lib/src/bundles/bundled-translations.de-DE.json +9 -8
- package/lib/src/bundles/bundled-translations.es-ES.json +10 -9
- package/lib/src/bundles/bundled-translations.fr-FR.json +3 -2
- package/lib/src/bundles/bundled-translations.json +2 -1
- package/lib/src/bundles/bundled-translations.pt-PT.json +14 -13
- package/lib/src/clients/brand-page-client.d.ts +3 -20
- package/lib/src/css/library.brand-page-brandCrowd.min.css +26 -29
- package/lib/src/css/library.brand-page-brandPage.min.css +26 -29
- package/lib/src/css/library.brand-page-designCom.min.css +26 -29
- package/lib/src/css/library.brand-page-preview.min.css +26 -29
- package/lib/src/index.mjs +74 -73
- package/lib/src/{lib-pU0Bg4q2.js → lib--oa9Rosp.js} +8436 -8421
- package/lib/src/plugins/bundle-translations-plugin/bundle-translations-plugin.js +2 -4
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +20 -24
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.js +2 -0
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +21 -21
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +20 -24
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +18 -18
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.js +7 -1
- package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +18 -18
- package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +2 -5
- package/lib/src/shared/content-settings/store/content-settings-store.d.ts +18 -18
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +2 -5
- package/lib/src/shared/page-settings/components/delete-page-modal/DeletePageModal.mixin.d.ts +1 -1
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +24 -31
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +22 -25
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +8 -18
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.js +1 -14
- package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +2 -5
- package/lib/src/shared/side-bar/components/SideBarTabButton.mixin.d.ts +0 -4
- package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +2 -9
- package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.d.ts +0 -4
- package/package.json +2 -2
- package/src/brand-page/components/icon/Icon.mixin.ts +2 -2
- package/src/brand-page/components/icon/Icon.vue +1 -1
- package/src/brand-page/components/text-media-section/TextMediaSection.vue +14 -0
- package/src/brand-page/models/brand-page-context.model.ts +1 -7
- package/src/brand-page/models/content.model.ts +1 -1
- package/src/brand-page/models/index.ts +9 -15
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +12 -12
- package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +4 -4
- package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +8 -8
- package/src/brand-page/utils/button.util.ts +39 -0
- package/src/brand-page/utils/content-callback-util.ts +1 -1
- package/src/brand-page/utils/model.util.ts +1 -1
- package/src/brand-page/utils/style.util.ts +7 -1
- package/src/brand-page/utils/view-model.util.ts +21 -30
- package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.ts +2 -0
- package/src/brand-page-maker/components/brand-page-maker/__fixtures__/content-settings-items.fixture.ts +6 -6
- package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.ts +2 -0
- package/src/brand-page-maker/composables/useEventTracker.ts +4 -37
- package/src/brand-page-maker/constants/config-settings-constant.ts +38 -7
- package/src/brand-page-maker/constants/personalisation.constant.ts +1 -1
- package/src/brand-page-maker/models/content-settings.ts +20 -2
- package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.ts +6 -80
- package/src/brand-page-maker/stores/brandpage-maker/__snapshots__/brandpage-maker-store.test.ts.snap +1 -1
- package/src/brand-page-maker/utils/rich-text-editor.util.ts +156 -0
- package/src/bundles/bundled-translations.de-DE.json +9 -8
- package/src/bundles/bundled-translations.es-ES.json +10 -9
- package/src/bundles/bundled-translations.fr-FR.json +3 -2
- package/src/bundles/bundled-translations.json +2 -1
- package/src/bundles/bundled-translations.pt-PT.json +14 -13
- package/src/clients/brand-page-client.ts +3 -22
- package/src/plugins/bundle-translations-plugin/bundle-translations-plugin.ts +3 -6
- package/src/shared/content-settings/components/content-settings/ContentSettings.mixin.ts +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.de-DE.json +9 -8
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.es-ES.json +10 -9
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-FR.json +3 -2
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.json +2 -1
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-PT.json +14 -13
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.ts +7 -1
- package/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.ts +1 -16
- package/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.vue +0 -5
- package/lib/src/bundled-translations-BMr0LtzI.js +0 -27
- package/lib/src/bundled-translations.de-DE-BXAa3p16.js +0 -27
- package/lib/src/bundled-translations.es-ES-B4FHib2V.js +0 -27
- package/lib/src/bundled-translations.fr-FR-B84T67W5.js +0 -27
- package/lib/src/bundled-translations.pt-PT-BB4hTIYd.js +0 -27
- /package/src/brand-page/components/icon/icons/{Twitter.vue → X.vue} +0 -0
|
@@ -113,7 +113,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
113
113
|
IconTikTok: import("vue").DefineComponent<{}, {}, any>;
|
|
114
114
|
IconTumblr: import("vue").DefineComponent<{}, {}, any>;
|
|
115
115
|
IconTwitch: import("vue").DefineComponent<{}, {}, any>;
|
|
116
|
-
|
|
116
|
+
IconX: import("vue").DefineComponent<{}, {}, any>;
|
|
117
117
|
IconUser: import("vue").DefineComponent<{}, {}, any>;
|
|
118
118
|
IconUtensils: import("vue").DefineComponent<{}, {}, any>;
|
|
119
119
|
IconVideo: import("vue").DefineComponent<{}, {}, any>;
|
|
@@ -62,7 +62,7 @@ import IconThumbsUp from './icons/ThumbsUp.vue';
|
|
|
62
62
|
import IconTikTok from './icons/TikTok.vue';
|
|
63
63
|
import IconTumblr from './icons/Tumblr.vue';
|
|
64
64
|
import IconTwitch from './icons/Twitch.vue';
|
|
65
|
-
import
|
|
65
|
+
import IconX from './icons/X.vue';
|
|
66
66
|
import IconUser from './icons/User.vue';
|
|
67
67
|
import IconUtensils from './icons/Utensils.vue';
|
|
68
68
|
import IconVideo from './icons/Video.vue';
|
|
@@ -128,7 +128,7 @@ export default defineComponent({
|
|
|
128
128
|
IconTikTok,
|
|
129
129
|
IconTumblr,
|
|
130
130
|
IconTwitch,
|
|
131
|
-
|
|
131
|
+
IconX,
|
|
132
132
|
IconUser,
|
|
133
133
|
IconUtensils,
|
|
134
134
|
IconVideo,
|
|
@@ -36,7 +36,6 @@ export interface AbTestResult {
|
|
|
36
36
|
}
|
|
37
37
|
export interface AbTest {
|
|
38
38
|
bp_3926_freemium_watermark?: AbTestResult;
|
|
39
|
-
bp_4092_rotating_upsells_at_publish?: AbTestResult;
|
|
40
39
|
}
|
|
41
40
|
export declare const MEDIA_SIZES: {
|
|
42
41
|
readonly size1x: "size1x";
|
|
@@ -75,5 +74,4 @@ export interface BrandPageContext {
|
|
|
75
74
|
isCapturingPreview: boolean;
|
|
76
75
|
disableLogoRenderOnServerside?: boolean;
|
|
77
76
|
}
|
|
78
|
-
export declare const getValueType: (key: string, abtestValue?: string) => AbTestResult;
|
|
79
77
|
export declare const getAbTestResults: (abtestKeyValues: Record<string, string>) => AbTest;
|
|
@@ -24,14 +24,13 @@ export const AB_TEST_FLAG = {
|
|
|
24
24
|
};
|
|
25
25
|
const AB_TEST_KEYS = {
|
|
26
26
|
BP_3926_FREEMIUM_WATERMARK: 'bc-bp-3926-freemium-cta-in-website-editor',
|
|
27
|
-
BP_4092_ROTATING_UPSELLS_AT_PUBLISH: 'bc-bp-4092-rotating-upsells-at-website-publish',
|
|
28
27
|
};
|
|
29
28
|
export const MEDIA_SIZES = {
|
|
30
29
|
size1x: 'size1x',
|
|
31
30
|
size2x: 'size2x',
|
|
32
31
|
sizeThumb: 'sizeThumb',
|
|
33
32
|
};
|
|
34
|
-
|
|
33
|
+
const getValueType = (key, abtestValue) => {
|
|
35
34
|
return {
|
|
36
35
|
key: key,
|
|
37
36
|
value: abtestValue || '',
|
|
@@ -9,7 +9,7 @@ export declare const CONTENT_TYPES: {
|
|
|
9
9
|
readonly phone: "phone";
|
|
10
10
|
readonly text: "text";
|
|
11
11
|
readonly facebook: "facebook";
|
|
12
|
-
readonly
|
|
12
|
+
readonly x: "x";
|
|
13
13
|
readonly instagram: "instagram";
|
|
14
14
|
readonly youtube: "youtube";
|
|
15
15
|
readonly linkedin: "linkedin";
|
|
@@ -79,7 +79,7 @@ export type WebsiteContent = ButtonContent;
|
|
|
79
79
|
export type EmailContent = ButtonContent;
|
|
80
80
|
export type PhoneContent = ButtonContent;
|
|
81
81
|
export type FacebookContent = ButtonContent;
|
|
82
|
-
export type
|
|
82
|
+
export type XContent = ButtonContent;
|
|
83
83
|
export type InstagramContent = ButtonContent;
|
|
84
84
|
export type YoutubeContent = ButtonContent;
|
|
85
85
|
export type LinkedInContent = ButtonContent;
|
|
@@ -287,12 +287,11 @@ export interface TextMediaItem extends ImageItem {
|
|
|
287
287
|
}
|
|
288
288
|
export interface TextShapeItem extends TextMediaItem {
|
|
289
289
|
colorReplacements: ColorReplacement[];
|
|
290
|
-
mediaType: 'shape';
|
|
291
290
|
aspectRatio?: number | null;
|
|
292
291
|
}
|
|
293
292
|
export interface ShapeItem extends ImageItem {
|
|
294
293
|
colorReplacements: ColorReplacement[];
|
|
295
|
-
mediaType:
|
|
294
|
+
mediaType: MediaType;
|
|
296
295
|
title?: string;
|
|
297
296
|
paragraph?: string;
|
|
298
297
|
titleOverride?: string;
|
|
@@ -322,24 +321,19 @@ export interface ShapesSectionContent extends Content, MediaSection {
|
|
|
322
321
|
size: string;
|
|
323
322
|
cardStyle: BrandPageCssStyle;
|
|
324
323
|
}
|
|
325
|
-
export interface ImagesSectionContent extends Content {
|
|
324
|
+
export interface ImagesSectionContent extends Content, MediaSection {
|
|
326
325
|
type: 'images-section';
|
|
327
|
-
title: string;
|
|
328
|
-
displayStyle: ImagesSectionContentDisplayStyle;
|
|
329
326
|
aspectRatio: AspectRatio;
|
|
330
327
|
areImagesFullWidth: boolean;
|
|
331
|
-
items: TextMediaItem[];
|
|
332
|
-
backgroundStyle: BrandPageCssStyle;
|
|
333
|
-
titleStyle: TextStyleDeclaration;
|
|
334
|
-
headingStyle: TextStyleDeclaration;
|
|
335
|
-
paragraphStyle: TextStyleDeclaration;
|
|
336
328
|
cardStyle: BrandPageCssStyle;
|
|
337
329
|
}
|
|
338
330
|
export interface MediaSection extends Content {
|
|
339
331
|
title: string;
|
|
340
|
-
|
|
341
|
-
|
|
332
|
+
description: string;
|
|
333
|
+
displayStyle: ImagesSectionContentDisplayStyle;
|
|
334
|
+
items: TextShapeItem[] | TextMediaItem[];
|
|
342
335
|
titleStyle: TextStyleDeclaration;
|
|
336
|
+
descriptionStyle: TextStyleDeclaration;
|
|
343
337
|
headingStyle: TextStyleDeclaration;
|
|
344
338
|
paragraphStyle: TextStyleDeclaration;
|
|
345
339
|
backgroundStyle: BrandPageCssStyle;
|
|
@@ -338,9 +338,9 @@ export class AbstractPageFooterStyles {
|
|
|
338
338
|
{
|
|
339
339
|
width: 0,
|
|
340
340
|
height: 0,
|
|
341
|
-
imageUrl: '
|
|
341
|
+
imageUrl: 'x',
|
|
342
342
|
imageTitle: '',
|
|
343
|
-
url: 'https://www.
|
|
343
|
+
url: 'https://www.x.com',
|
|
344
344
|
mediaType: 'image',
|
|
345
345
|
imageLink: '',
|
|
346
346
|
},
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ButtonStyles } from '../models';
|
|
2
|
+
/**
|
|
3
|
+
* Calculates the box shadow value for button styles based on the button style configuration
|
|
4
|
+
* @param buttonStyles - The button styles configuration
|
|
5
|
+
* @returns The calculated box shadow CSS value
|
|
6
|
+
*/
|
|
7
|
+
export declare const getBoxShadowValue: (buttonStyles: ButtonStyles) => string;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { isHexColor } from '../../utils/helpers';
|
|
2
|
+
import { setRgbAlpha } from './color.util';
|
|
3
|
+
import { ButtonSoftBoxShadowSize, ButtonBoxShadowSize, BoxShadowSpread, } from '../constants';
|
|
4
|
+
/**
|
|
5
|
+
* Calculates the box shadow value for button styles based on the button style configuration
|
|
6
|
+
* @param buttonStyles - The button styles configuration
|
|
7
|
+
* @returns The calculated box shadow CSS value
|
|
8
|
+
*/
|
|
9
|
+
export const getBoxShadowValue = (buttonStyles) => {
|
|
10
|
+
let boxShadowValue = '';
|
|
11
|
+
if (buttonStyles.style.boxShadow) {
|
|
12
|
+
if (isHexColor(buttonStyles.style.boxShadow)) {
|
|
13
|
+
if (buttonStyles.selectedButtonStyleId === 'BUTTON_STYLE_16' ||
|
|
14
|
+
buttonStyles.selectedButtonStyleId === 'BUTTON_STYLE_17' ||
|
|
15
|
+
buttonStyles.selectedButtonStyleId === 'BUTTON_STYLE_18') {
|
|
16
|
+
const rgba = setRgbAlpha(buttonStyles.style.boxShadow, BoxShadowSpread);
|
|
17
|
+
boxShadowValue = `${ButtonSoftBoxShadowSize} ${rgba}`;
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
const rgba = setRgbAlpha(buttonStyles.style.boxShadow, BoxShadowSpread);
|
|
21
|
+
boxShadowValue = `${ButtonBoxShadowSize} ${rgba}`;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
boxShadowValue = buttonStyles.style.boxShadow;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return boxShadowValue;
|
|
29
|
+
};
|
|
@@ -28,7 +28,7 @@ export const isButtonContent = (content) => {
|
|
|
28
28
|
content?.type === 'website' ||
|
|
29
29
|
content?.type === 'email' ||
|
|
30
30
|
content?.type === 'phone' ||
|
|
31
|
-
content?.type === '
|
|
31
|
+
content?.type === 'x' ||
|
|
32
32
|
content?.type === 'instagram' ||
|
|
33
33
|
content?.type === 'youtube' ||
|
|
34
34
|
content?.type === 'linkedin' ||
|
|
@@ -199,7 +199,13 @@ const CONTENT_STYLE_PROP_NAME_SUFFIX = [
|
|
|
199
199
|
'Color',
|
|
200
200
|
'Replacements',
|
|
201
201
|
];
|
|
202
|
-
const RTE_ALLOWED_SECTION_TYPES = [
|
|
202
|
+
const RTE_ALLOWED_SECTION_TYPES = [
|
|
203
|
+
'text',
|
|
204
|
+
'banner-section',
|
|
205
|
+
'booking-section',
|
|
206
|
+
'images-section',
|
|
207
|
+
'shapes-section',
|
|
208
|
+
];
|
|
203
209
|
const RTE_ALLOWED_FIELDS = ['title', 'description', 'text', 'textItems'];
|
|
204
210
|
export const applyLogoThemeToContents = (logoTheme, pages) => {
|
|
205
211
|
let isModified = false;
|
|
@@ -9,6 +9,7 @@ import uniq from 'lodash/uniq';
|
|
|
9
9
|
import { generateGoogleFontUrl } from './font-loader.util';
|
|
10
10
|
import { isValidSvgUrl } from './image.util';
|
|
11
11
|
import { isLogoContent } from './model.util';
|
|
12
|
+
import { getBoxShadowValue } from './button.util';
|
|
12
13
|
const BUTTON_BORDER_RADIUS = '9999px';
|
|
13
14
|
const CONTENT_BORDER_RADIUS = '48px';
|
|
14
15
|
const PROFILE_PADDING_TOP = '1rem';
|
|
@@ -191,24 +192,7 @@ const isBigImageType = (displayStyle) => {
|
|
|
191
192
|
return false;
|
|
192
193
|
};
|
|
193
194
|
const mapToButtonViewModel = (content, styles, options) => {
|
|
194
|
-
|
|
195
|
-
if (styles.buttonStyles.style.boxShadow) {
|
|
196
|
-
if (isHexColor(styles.buttonStyles.style.boxShadow)) {
|
|
197
|
-
if (styles.buttonStyles.selectedButtonStyleId === 'BUTTON_STYLE_16' ||
|
|
198
|
-
styles.buttonStyles.selectedButtonStyleId === 'BUTTON_STYLE_17' ||
|
|
199
|
-
styles.buttonStyles.selectedButtonStyleId === 'BUTTON_STYLE_18') {
|
|
200
|
-
const rgba = setRgbAlpha(styles.buttonStyles.style.boxShadow, BoxShadowSpread);
|
|
201
|
-
boxShadowValue = `${ButtonSoftBoxShadowSize} ${rgba}`;
|
|
202
|
-
}
|
|
203
|
-
else {
|
|
204
|
-
const rgba = setRgbAlpha(styles.buttonStyles.style.boxShadow, BoxShadowSpread);
|
|
205
|
-
boxShadowValue = `${ButtonBoxShadowSize} ${rgba}`;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
else {
|
|
209
|
-
boxShadowValue = styles.buttonStyles.style.boxShadow;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
195
|
+
const boxShadowValue = getBoxShadowValue(styles.buttonStyles);
|
|
212
196
|
const buttonStyles = {
|
|
213
197
|
iconStyle: styles.buttonStyles.iconStyle,
|
|
214
198
|
style: {
|
|
@@ -309,9 +293,13 @@ const mapToMapViewModel = (content) => {
|
|
|
309
293
|
return { ...content, role: content.type, type: 'map' };
|
|
310
294
|
};
|
|
311
295
|
const mapToMailingListViewModel = (content, styles) => {
|
|
296
|
+
const boxShadowValue = getBoxShadowValue(styles.buttonStyles);
|
|
312
297
|
const buttonStyles = {
|
|
313
298
|
iconStyle: styles.buttonStyles.iconStyle,
|
|
314
|
-
style:
|
|
299
|
+
style: {
|
|
300
|
+
...styles.buttonStyles.style,
|
|
301
|
+
boxShadow: boxShadowValue,
|
|
302
|
+
},
|
|
315
303
|
selectedButtonStyleId: styles.buttonStyles.selectedButtonStyleId,
|
|
316
304
|
};
|
|
317
305
|
const titleStyle = {
|
|
@@ -368,11 +356,20 @@ const mapToRequestPaymentViewModel = (content, styles) => {
|
|
|
368
356
|
}, styles);
|
|
369
357
|
};
|
|
370
358
|
const mapToContactFormViewModel = (content, styles, brandPageType) => {
|
|
359
|
+
const boxShadowValue = getBoxShadowValue(styles.buttonStyles);
|
|
360
|
+
const buttonStyles = {
|
|
361
|
+
iconStyle: styles.buttonStyles.iconStyle,
|
|
362
|
+
style: {
|
|
363
|
+
...styles.buttonStyles.style,
|
|
364
|
+
boxShadow: boxShadowValue,
|
|
365
|
+
},
|
|
366
|
+
selectedButtonStyleId: styles.buttonStyles.selectedButtonStyleId,
|
|
367
|
+
};
|
|
371
368
|
return applyViewModelTextStyles({
|
|
372
369
|
...content,
|
|
373
370
|
role: content.type,
|
|
374
371
|
type: 'contact-form',
|
|
375
|
-
buttonStyles:
|
|
372
|
+
buttonStyles: buttonStyles,
|
|
376
373
|
buttonTextStyle: {
|
|
377
374
|
...content.buttonTextStyle,
|
|
378
375
|
},
|
|
@@ -659,7 +656,7 @@ export const mapToViewModel = (styles, brandPageType) => (content) => {
|
|
|
659
656
|
case 'website':
|
|
660
657
|
case 'phone':
|
|
661
658
|
case 'facebook':
|
|
662
|
-
case '
|
|
659
|
+
case 'x':
|
|
663
660
|
case 'instagram':
|
|
664
661
|
case 'youtube':
|
|
665
662
|
case 'linkedin':
|
package/lib/src/brand-page-maker/components/admin-logo-settings/AdminLogoSettings.mixin.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
2
2
|
templates: import("vue").ComputedRef<import("../../stores/admin-logo-settings").AdminPreviewLogoTemplateTemplate[]>;
|
|
3
3
|
items: import("vue").ComputedRef<{
|
|
4
4
|
id: string;
|
|
5
|
-
type: "website" | "image" | "
|
|
5
|
+
type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
|
|
6
6
|
settings: {
|
|
7
7
|
content: {
|
|
8
8
|
id: string;
|
|
9
|
-
type: "website" | "image" | "
|
|
9
|
+
type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
|
|
10
10
|
personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
|
|
11
11
|
imageUrlOverride?: string | undefined;
|
|
12
12
|
imageUrlsOverride?: string | undefined;
|