@designcrowd/library.brand-page 5.12.4-ast-booking → 5.12.4
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-BQeJ_n6B.js → CreatedOnBrandCrowd-de-de-BXfAb_Ly.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-Cj3iYC5T.js → CreatedOnBrandCrowd-en-us-BvCOvRuk.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-Cl7JjVJm.js → CreatedOnBrandCrowd-es-es-eAe6KBvm.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-DRomv4BA.js → CreatedOnBrandCrowd-fr-fr-DVSPg9Qi.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-DZFEw5Xl.js → CreatedOnBrandCrowd-pt-pt-W42s3fa-.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-DZhX2bER.js → CreatedOnDcom-de-de-B_S0e0e_.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-Bh9DHJW3.js → CreatedOnDcom-en-us-Bi-x7Vfr.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-CUkCHVmG.js → CreatedOnDcom-es-es-BlLjTmrS.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-CF_tcHWx.js → CreatedOnDcom-fr-fr-D2UQl6bI.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-gyRIp-Wi.js → CreatedOnDcom-pt-pt-D-x98ymB.js} +1 -1
- package/lib/src/brand-page/models/content.model.d.ts +0 -1
- package/lib/src/brand-page/models/content.model.js +0 -1
- package/lib/src/brand-page/models/index.d.ts +0 -16
- package/lib/src/brand-page/utils/style.util.js +1 -1
- package/lib/src/brand-page/utils/view-model.util.d.ts +2 -3
- package/lib/src/brand-page/utils/view-model.util.js +0 -14
- package/lib/src/brand-page/view-models.d.ts +2 -6
- package/lib/src/brand-page-maker/assessors/banner-section-description-visibility.assessor.d.ts +4 -4
- package/lib/src/brand-page-maker/assessors/banner-section-field.assessor.d.ts +4 -4
- 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 +18 -18
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +20 -20
- package/lib/src/brand-page-maker/constants/config-settings-constant.d.ts +1 -2
- package/lib/src/brand-page-maker/constants/config-settings-constant.js +1 -101
- package/lib/src/brand-page-maker/models/content-settings.d.ts +1 -2
- package/lib/src/brand-page-maker/models/content-settings.js +0 -28
- package/lib/src/brand-page-maker/validators/section-button.validator.d.ts +3 -3
- package/lib/src/{bundled-translations-BZJKPEb9.js → bundled-translations-C4LWPXSH.js} +40 -42
- package/lib/src/bundles/bundled-translations.json +1 -8
- package/lib/src/composables/useTranslate.d.ts +1 -2
- package/lib/src/composables/useTranslate.js +1 -2
- package/lib/src/css/library.brand-page-brandCrowd.min.css +0 -5
- package/lib/src/css/library.brand-page-brandPage.min.css +0 -5
- package/lib/src/css/library.brand-page-designCom.min.css +0 -5
- package/lib/src/css/library.brand-page-preview.min.css +0 -5
- package/lib/src/index.mjs +175 -176
- package/lib/src/{lib-Dsso3HKV.js → lib-CmlX0vVm.js} +21754 -22076
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +20 -20
- 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 -20
- 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 +1 -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/url-field/UrlField.mixin.d.ts +2 -39
- package/lib/src/shared/content-settings/components/url-field/UrlField.mixin.js +0 -32
- package/lib/src/shared/content-settings/store/content-settings-store.d.ts +18 -18
- package/lib/src/shared/font-family-selector/FontFamilySelector.mixin.d.ts +2 -3
- package/lib/src/shared/font-family-selector/FontFamilySelector.mixin.js +9 -16
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +22 -22
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +20 -20
- package/package.json +1 -1
- package/src/brand-page/components/logo/test.json +866 -0
- package/src/brand-page/components/logo/test2.json +765 -0
- package/src/brand-page/components/logo/test3.json +749 -0
- package/src/brand-page/components/page/PageComponent.vue +0 -2
- package/src/brand-page/models/content.model.ts +0 -1
- package/src/brand-page/models/index.ts +0 -17
- package/src/brand-page/utils/style.util.ts +1 -1
- package/src/brand-page/utils/view-model.util.ts +0 -27
- package/src/brand-page/view-models.ts +1 -10
- package/src/brand-page-maker/assessors/banner-section-description-visibility.assessor.ts +4 -7
- package/src/brand-page-maker/assessors/banner-section-field.assessor.ts +4 -7
- package/src/brand-page-maker/constants/config-settings-constant.ts +0 -107
- package/src/brand-page-maker/models/content-settings.ts +0 -32
- package/src/brand-page-maker/validators/section-button.validator.ts +6 -7
- package/src/bundles/bundled-translations.json +1 -8
- package/src/composables/useTranslate.ts +0 -2
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.json +1 -5
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.ts +1 -1
- package/src/shared/content-settings/components/url-field/UrlField.mixin.ts +0 -38
- package/src/shared/content-settings/components/url-field/UrlField.vue +0 -12
- package/src/shared/font-family-selector/FontFamilySelector.mixin.ts +11 -21
- package/src/brand-page/components/booking-section/BookingSection.vue +0 -240
- package/src/shared/content-settings/components/url-field/i18n/url-field.json +0 -5
|
@@ -33,7 +33,6 @@ import DividerSection from '../divider-section/DividerSection.vue';
|
|
|
33
33
|
import ShapesSection from '../shapes-section/ShapesSection.vue';
|
|
34
34
|
import PageComponentMixin from './PageComponent.mixin.ts';
|
|
35
35
|
import Shop from '../shop/Shop.vue';
|
|
36
|
-
import BookingSection from '../booking-section/BookingSection.vue';
|
|
37
36
|
|
|
38
37
|
export default {
|
|
39
38
|
components: {
|
|
@@ -58,7 +57,6 @@ export default {
|
|
|
58
57
|
'bp-divider-section': DividerSection,
|
|
59
58
|
'bp-shapes-section': ShapesSection,
|
|
60
59
|
'bp-shop-section': Shop,
|
|
61
|
-
'bp-booking-section': BookingSection,
|
|
62
60
|
},
|
|
63
61
|
mixins: [PageComponentMixin],
|
|
64
62
|
};
|
|
@@ -581,23 +581,6 @@ export interface DividerSectionContent extends Content {
|
|
|
581
581
|
backgroundStyle?: BrandPageCssStyle;
|
|
582
582
|
}
|
|
583
583
|
|
|
584
|
-
export interface BookingSectionContent extends Content {
|
|
585
|
-
type: 'booking-section';
|
|
586
|
-
title: string;
|
|
587
|
-
description: string;
|
|
588
|
-
buttonText: string;
|
|
589
|
-
url: string;
|
|
590
|
-
email?: string;
|
|
591
|
-
tel?: string;
|
|
592
|
-
titleStyle: TextStyleDeclaration;
|
|
593
|
-
descriptionStyle: TextStyleDeclaration;
|
|
594
|
-
backgroundStyle: BrandPageCssStyle;
|
|
595
|
-
pageSlug: string;
|
|
596
|
-
buttonLinkType: ButtonLinkType;
|
|
597
|
-
buttonTextStyle: TextStyleDeclaration;
|
|
598
|
-
aspectRatio?: number | null;
|
|
599
|
-
}
|
|
600
|
-
|
|
601
584
|
export class PageModel {
|
|
602
585
|
title: string;
|
|
603
586
|
slug: string;
|
|
@@ -372,7 +372,7 @@ const CONTENT_STYLE_PROP_NAME_SUFFIX = [
|
|
|
372
372
|
'Replacements',
|
|
373
373
|
];
|
|
374
374
|
|
|
375
|
-
const RTE_ALLOWED_SECTION_TYPES = ['text', 'banner-section'
|
|
375
|
+
const RTE_ALLOWED_SECTION_TYPES = ['text', 'banner-section'];
|
|
376
376
|
const RTE_ALLOWED_FIELDS = ['title', 'description', 'text', 'textItems'];
|
|
377
377
|
|
|
378
378
|
export const applyLogoThemeToContents = (
|
|
@@ -36,7 +36,6 @@ import type {
|
|
|
36
36
|
LogoTemplateImageModel,
|
|
37
37
|
ShopContent,
|
|
38
38
|
SensitiveContent,
|
|
39
|
-
BookingSectionContent,
|
|
40
39
|
} from '../models';
|
|
41
40
|
import { ButtonStyles, SENSITIVE_CONTENT_TYPES, VIEWPORTS } from '../models';
|
|
42
41
|
import {
|
|
@@ -73,7 +72,6 @@ import type {
|
|
|
73
72
|
DividerSectionViewModel,
|
|
74
73
|
ShapesSectionViewModel,
|
|
75
74
|
ShopViewModel,
|
|
76
|
-
BookingSectionViewModel,
|
|
77
75
|
} from '../view-models';
|
|
78
76
|
import { isHexTransparent, setRgbAlpha } from './color.util';
|
|
79
77
|
import type { ContentTextStylePropertyKey } from '../constants';
|
|
@@ -844,25 +842,6 @@ const mapToSocialLinksViewModel = (
|
|
|
844
842
|
);
|
|
845
843
|
};
|
|
846
844
|
|
|
847
|
-
export const mapToBookingSectionViewModel = (
|
|
848
|
-
content: BookingSectionContent,
|
|
849
|
-
styles: PageStyles,
|
|
850
|
-
): BookingSectionViewModel => {
|
|
851
|
-
return applyViewModelTextStyles(
|
|
852
|
-
{
|
|
853
|
-
...content,
|
|
854
|
-
role: content.type,
|
|
855
|
-
type: 'booking-section',
|
|
856
|
-
buttonStyles: styles.buttonStyles,
|
|
857
|
-
buttonTextStyle: {
|
|
858
|
-
...content.buttonTextStyle,
|
|
859
|
-
},
|
|
860
|
-
isFullWidth: true,
|
|
861
|
-
},
|
|
862
|
-
styles,
|
|
863
|
-
);
|
|
864
|
-
};
|
|
865
|
-
|
|
866
845
|
export const mapToPageHeaderViewModel = (
|
|
867
846
|
pageHeader: PageHeaderDesktop | PageHeaderMobile,
|
|
868
847
|
pageStyles: PageStyles,
|
|
@@ -1069,12 +1048,6 @@ export const mapToViewModel =
|
|
|
1069
1048
|
styles,
|
|
1070
1049
|
);
|
|
1071
1050
|
|
|
1072
|
-
case 'booking-section':
|
|
1073
|
-
return mapToBookingSectionViewModel(
|
|
1074
|
-
content as BookingSectionContent,
|
|
1075
|
-
styles,
|
|
1076
|
-
);
|
|
1077
|
-
|
|
1078
1051
|
case 'about-section':
|
|
1079
1052
|
return mapToAboutSectionViewModel(
|
|
1080
1053
|
content as AboutSectionContent,
|
|
@@ -36,7 +36,6 @@ import type {
|
|
|
36
36
|
LogoTemplateImageModel,
|
|
37
37
|
CookieOptions,
|
|
38
38
|
SensitiveContent,
|
|
39
|
-
BookingSectionContent,
|
|
40
39
|
} from './models';
|
|
41
40
|
import type { ImagesSectionContentDisplayStyle } from './constants';
|
|
42
41
|
|
|
@@ -60,8 +59,7 @@ export type ViewModelType =
|
|
|
60
59
|
| 'testimonial-section'
|
|
61
60
|
| 'social-links'
|
|
62
61
|
| 'shapes-section'
|
|
63
|
-
| 'shop-section'
|
|
64
|
-
| 'booking-section';
|
|
62
|
+
| 'shop-section';
|
|
65
63
|
|
|
66
64
|
export interface ContentViewModel {
|
|
67
65
|
id: string;
|
|
@@ -210,13 +208,6 @@ export interface DividerSectionViewModel
|
|
|
210
208
|
isFullWidth: boolean;
|
|
211
209
|
}
|
|
212
210
|
|
|
213
|
-
export interface BookingSectionViewModel
|
|
214
|
-
extends ContentViewModel,
|
|
215
|
-
Omit<BookingSectionContent, 'type'> {
|
|
216
|
-
buttonStyles: ButtonStyles;
|
|
217
|
-
isFullWidth: boolean;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
211
|
export interface PageHeaderViewModel
|
|
221
212
|
extends Omit<
|
|
222
213
|
PageHeaderDesktop | PageHeaderMobile,
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
BannerSectionContent,
|
|
3
|
-
BookingSectionContent,
|
|
4
|
-
} from '../../brand-page';
|
|
1
|
+
import type { BannerSectionContent } from '../../brand-page';
|
|
5
2
|
import { BUTTON_LINK_TYPE } from '../../brand-page';
|
|
6
3
|
import type { VisibilityAssessor } from '../models';
|
|
7
4
|
import {
|
|
@@ -12,7 +9,7 @@ import {
|
|
|
12
9
|
} from '../../brand-page/constants';
|
|
13
10
|
|
|
14
11
|
export const bannerSectionUrlVisibilityAssessor: VisibilityAssessor<
|
|
15
|
-
BannerSectionContent |
|
|
12
|
+
BannerSectionContent | undefined
|
|
16
13
|
> = (content) => {
|
|
17
14
|
return (
|
|
18
15
|
content?.buttonLinkType !== BUTTON_LINK_TYPE.page &&
|
|
@@ -22,7 +19,7 @@ export const bannerSectionUrlVisibilityAssessor: VisibilityAssessor<
|
|
|
22
19
|
};
|
|
23
20
|
|
|
24
21
|
export const bannerSectionPageVisibilityAssessor: VisibilityAssessor<
|
|
25
|
-
BannerSectionContent |
|
|
22
|
+
BannerSectionContent | undefined
|
|
26
23
|
> = (content) => {
|
|
27
24
|
return (
|
|
28
25
|
content?.buttonLinkType === BUTTON_LINK_TYPE.page &&
|
|
@@ -32,7 +29,7 @@ export const bannerSectionPageVisibilityAssessor: VisibilityAssessor<
|
|
|
32
29
|
};
|
|
33
30
|
|
|
34
31
|
export const bannerLinkTypeVisibilityAssessor: VisibilityAssessor<
|
|
35
|
-
BannerSectionContent |
|
|
32
|
+
BannerSectionContent | undefined
|
|
36
33
|
> = (content) => {
|
|
37
34
|
return content?.buttonText !== '' && content?.buttonText !== false;
|
|
38
35
|
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
BannerSectionContent,
|
|
3
|
-
BookingSectionContent,
|
|
4
|
-
} from '../../brand-page';
|
|
1
|
+
import type { BannerSectionContent } from '../../brand-page';
|
|
5
2
|
import type {
|
|
6
3
|
FieldTypeAssessor,
|
|
7
4
|
ItemFieldType,
|
|
@@ -9,7 +6,7 @@ import type {
|
|
|
9
6
|
} from '../models';
|
|
10
7
|
|
|
11
8
|
export const bannerSectionFieldTypeAssessor: FieldTypeAssessor<
|
|
12
|
-
BannerSectionContent |
|
|
9
|
+
BannerSectionContent | undefined
|
|
13
10
|
> = (content): ItemFieldType => {
|
|
14
11
|
switch (content?.buttonLinkType) {
|
|
15
12
|
case 'url':
|
|
@@ -24,7 +21,7 @@ export const bannerSectionFieldTypeAssessor: FieldTypeAssessor<
|
|
|
24
21
|
};
|
|
25
22
|
|
|
26
23
|
export const bannerSectionRoleTypeAssessor: FieldTypeAssessor<
|
|
27
|
-
BannerSectionContent |
|
|
24
|
+
BannerSectionContent | undefined
|
|
28
25
|
> = (content): ItemFieldType => {
|
|
29
26
|
switch (content?.buttonLinkType) {
|
|
30
27
|
case 'url':
|
|
@@ -39,7 +36,7 @@ export const bannerSectionRoleTypeAssessor: FieldTypeAssessor<
|
|
|
39
36
|
};
|
|
40
37
|
|
|
41
38
|
export const bannerPlaceholderFieldTypeAssessor: PlaceholderTypeAssessor<
|
|
42
|
-
BannerSectionContent |
|
|
39
|
+
BannerSectionContent | undefined
|
|
43
40
|
> = (content): string => {
|
|
44
41
|
switch (content?.buttonLinkType) {
|
|
45
42
|
case 'url':
|
|
@@ -34,7 +34,6 @@ import type {
|
|
|
34
34
|
ShapesSectionContent,
|
|
35
35
|
Content,
|
|
36
36
|
ShopContent,
|
|
37
|
-
BookingSectionContent,
|
|
38
37
|
} from '../../brand-page';
|
|
39
38
|
import {
|
|
40
39
|
SOCIAL_LINKS_ICON_DISPLAY_STYLES,
|
|
@@ -82,7 +81,6 @@ import {
|
|
|
82
81
|
createInitialShapesSectionContent,
|
|
83
82
|
VARIANT_DISPLAY_MODES,
|
|
84
83
|
createInitialShopContent,
|
|
85
|
-
createInitialBookingSectionContent,
|
|
86
84
|
} from '../models';
|
|
87
85
|
import type {
|
|
88
86
|
ContentReplaceImageSettings,
|
|
@@ -3018,110 +3016,6 @@ export const SHOP_SECTION_SETTINGS_CONFIG = (): ContentSettingsConfig<
|
|
|
3018
3016
|
type: 'shop-section',
|
|
3019
3017
|
});
|
|
3020
3018
|
|
|
3021
|
-
export const BOOKING_SECTION_SETTINGS_CONFIG =
|
|
3022
|
-
(): ContentSettingsConfig<BookingSectionContent> => ({
|
|
3023
|
-
type: 'booking-section',
|
|
3024
|
-
category: 'sections',
|
|
3025
|
-
createInitialContent: createInitialBookingSectionContent,
|
|
3026
|
-
displayMode: CONTENT_SETTINGS_DISPLAY_MODES.focused,
|
|
3027
|
-
defaultIconName: 'calendar',
|
|
3028
|
-
displayName: contentSettingsTr(`bookingSectionDisplayName`),
|
|
3029
|
-
fieldGroups: [
|
|
3030
|
-
{
|
|
3031
|
-
id: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
|
|
3032
|
-
displayName: contentSettingsTr(`settingsDisplayName`),
|
|
3033
|
-
isCollapsed: false,
|
|
3034
|
-
},
|
|
3035
|
-
{
|
|
3036
|
-
id: SETTINGS_STYLE_FIELD_GROUP_IDS.style,
|
|
3037
|
-
displayName: contentSettingsTr(`styleDisplayName`),
|
|
3038
|
-
isCollapsed: true,
|
|
3039
|
-
},
|
|
3040
|
-
],
|
|
3041
|
-
fields: {
|
|
3042
|
-
titleStyle: DEFAULT_TITLE_STYLE_SETTINGS_FILED_WITH_TITLE(),
|
|
3043
|
-
descriptionStyle: DEFAULT_DESCRIPTION_STYLE_FILED(),
|
|
3044
|
-
buttonTextStyle: DEFAULT_BUTTON_TEXT_STYLE_FIELD(),
|
|
3045
|
-
title: {
|
|
3046
|
-
type: 'text',
|
|
3047
|
-
placeholder: contentSettingsTr(`titlePlaceholder`),
|
|
3048
|
-
title: contentSettingsTr(`titleTitle`),
|
|
3049
|
-
groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
|
|
3050
|
-
maxLength: 200,
|
|
3051
|
-
},
|
|
3052
|
-
titleOverride: {
|
|
3053
|
-
type: 'personalisation-override',
|
|
3054
|
-
groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
|
|
3055
|
-
visibilityAssessor: (c, b) =>
|
|
3056
|
-
personalisationOverrideVisibility(c, b, 'title'),
|
|
3057
|
-
},
|
|
3058
|
-
description: {
|
|
3059
|
-
type: 'textarea',
|
|
3060
|
-
placeholder: contentSettingsTr(`descriptionPlaceholder`),
|
|
3061
|
-
title: contentSettingsTr(`descriptionTitle`),
|
|
3062
|
-
groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
|
|
3063
|
-
maxLength: 1000,
|
|
3064
|
-
},
|
|
3065
|
-
descriptionOverride: {
|
|
3066
|
-
type: 'personalisation-override',
|
|
3067
|
-
groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
|
|
3068
|
-
visibilityAssessor: (c, b) =>
|
|
3069
|
-
personalisationOverrideVisibility(c, b, 'description'),
|
|
3070
|
-
},
|
|
3071
|
-
buttonText: {
|
|
3072
|
-
type: 'text',
|
|
3073
|
-
placeholder: contentSettingsTr(`getStartedPlaceholder`),
|
|
3074
|
-
title: contentSettingsTr(`buttonTitle`),
|
|
3075
|
-
groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
|
|
3076
|
-
maxLength: 60,
|
|
3077
|
-
},
|
|
3078
|
-
buttonTextOverride: {
|
|
3079
|
-
type: 'personalisation-override',
|
|
3080
|
-
groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
|
|
3081
|
-
visibilityAssessor: (c, b) =>
|
|
3082
|
-
personalisationOverrideVisibility(c, b, 'buttonText'),
|
|
3083
|
-
},
|
|
3084
|
-
backgroundStyle: {
|
|
3085
|
-
type: 'color',
|
|
3086
|
-
groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.style,
|
|
3087
|
-
defaultValue: {},
|
|
3088
|
-
isInline: true,
|
|
3089
|
-
showToggle: false,
|
|
3090
|
-
title: contentSettingsTr(`backgroundColorTitle`),
|
|
3091
|
-
valueConvertor: backgroundColorConvertor,
|
|
3092
|
-
},
|
|
3093
|
-
buttonLinkType: {
|
|
3094
|
-
type: 'radio',
|
|
3095
|
-
role: 'multi',
|
|
3096
|
-
defaultValue: BUTTON_LINK_TYPE.url,
|
|
3097
|
-
title: contentSettingsTr(`buttonLinkTitle`),
|
|
3098
|
-
groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
|
|
3099
|
-
optionsConvertor: buttonLinkStyleConvertor,
|
|
3100
|
-
visibilityAssessor: bannerLinkTypeVisibilityAssessor,
|
|
3101
|
-
},
|
|
3102
|
-
pageSlug: {
|
|
3103
|
-
type: 'page-dropdown',
|
|
3104
|
-
placeholder: contentSettingsTr(`selectAPagePlaceholder`),
|
|
3105
|
-
groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
|
|
3106
|
-
visibilityAssessor: bannerSectionPageVisibilityAssessor,
|
|
3107
|
-
validator: pageValidator,
|
|
3108
|
-
defaultValue: '',
|
|
3109
|
-
},
|
|
3110
|
-
url: {
|
|
3111
|
-
type: 'url',
|
|
3112
|
-
groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
|
|
3113
|
-
fieldTypeAssessor: bannerSectionFieldTypeAssessor,
|
|
3114
|
-
roleAssessor: bannerSectionRoleTypeAssessor,
|
|
3115
|
-
placeholderAssessor: bannerPlaceholderFieldTypeAssessor,
|
|
3116
|
-
visibilityAssessor: bannerSectionUrlVisibilityAssessor,
|
|
3117
|
-
validator: urlValidator,
|
|
3118
|
-
defaultValue: '',
|
|
3119
|
-
},
|
|
3120
|
-
},
|
|
3121
|
-
isEnabled: true,
|
|
3122
|
-
isLocked: false,
|
|
3123
|
-
});
|
|
3124
|
-
|
|
3125
3019
|
export const CONTENT_SETTINGS_CONFIGS = (): Record<
|
|
3126
3020
|
ContentType,
|
|
3127
3021
|
ContentSettingsConfig<any>
|
|
@@ -3157,5 +3051,4 @@ export const CONTENT_SETTINGS_CONFIGS = (): Record<
|
|
|
3157
3051
|
'divider-section': DIVIDER_SECTION_SETTINGS_CONFIG(),
|
|
3158
3052
|
'shapes-section': SHAPES_SECTION_SETTINGS_CONFIG(),
|
|
3159
3053
|
'shop-section': SHOP_SECTION_SETTINGS_CONFIG(),
|
|
3160
|
-
'booking-section': BOOKING_SECTION_SETTINGS_CONFIG(),
|
|
3161
3054
|
});
|
|
@@ -51,7 +51,6 @@ import type {
|
|
|
51
51
|
BrandPageType,
|
|
52
52
|
SupportMeContent,
|
|
53
53
|
ShopContent,
|
|
54
|
-
BookingSectionContent,
|
|
55
54
|
} from '../../brand-page';
|
|
56
55
|
import * as uuid from 'uuid';
|
|
57
56
|
import type { CreateInitialContentFunction } from './content-settings-configs';
|
|
@@ -518,37 +517,6 @@ export const createInitialBannerSectionContent: CreateInitialContentFunction<
|
|
|
518
517
|
};
|
|
519
518
|
};
|
|
520
519
|
|
|
521
|
-
export const createInitialBookingSectionContent: CreateInitialContentFunction<
|
|
522
|
-
BookingSectionContent
|
|
523
|
-
> = (options?: CreateInitialContentOptions) => {
|
|
524
|
-
return {
|
|
525
|
-
id: uuid.v4(),
|
|
526
|
-
title: contentSettingsTr(`defaultBookingTitle`),
|
|
527
|
-
description: contentSettingsTr(`defaultBookingDescription`),
|
|
528
|
-
buttonText: contentSettingsTr(`bookNowLabel`),
|
|
529
|
-
url: '',
|
|
530
|
-
type: 'booking-section',
|
|
531
|
-
descriptionStyle: {
|
|
532
|
-
applyAutoScale: options?.brandPageType === BRAND_PAGE_TYPES.brandSite,
|
|
533
|
-
textStyleType: TEXT_STYLE_TYPES.paragraphs,
|
|
534
|
-
textAlign: 'center',
|
|
535
|
-
},
|
|
536
|
-
titleStyle: {
|
|
537
|
-
applyAutoScale: options?.brandPageType === BRAND_PAGE_TYPES.brandSite,
|
|
538
|
-
textStyleType: TEXT_STYLE_TYPES.titles,
|
|
539
|
-
textAlign: 'center',
|
|
540
|
-
},
|
|
541
|
-
backgroundStyle: {},
|
|
542
|
-
pageSlug: '',
|
|
543
|
-
buttonLinkType: BUTTON_LINK_TYPE.url,
|
|
544
|
-
buttonTextStyle: {
|
|
545
|
-
applyAutoScale: options?.brandPageType === BRAND_PAGE_TYPES.brandSite,
|
|
546
|
-
textStyleType: TEXT_STYLE_TYPES.buttons,
|
|
547
|
-
textAlign: 'center',
|
|
548
|
-
},
|
|
549
|
-
};
|
|
550
|
-
};
|
|
551
|
-
|
|
552
520
|
export const createInitialImagesSectionContent: CreateInitialContentFunction<
|
|
553
521
|
ImagesSectionContent
|
|
554
522
|
> = (options?: CreateInitialContentOptions) => {
|
|
@@ -2,7 +2,6 @@ import { isEmail, isTel, isURL } from '../../utils/validator.util';
|
|
|
2
2
|
import {
|
|
3
3
|
BUTTON_LINK_TYPE,
|
|
4
4
|
type BannerSectionContent,
|
|
5
|
-
type BookingSectionContent,
|
|
6
5
|
} from '../../brand-page/models';
|
|
7
6
|
import type { ContentValidator, ValidateResult } from '../models';
|
|
8
7
|
import { validatorTr } from '../../composables/useTranslate';
|
|
@@ -34,9 +33,9 @@ export const textValidator: ContentValidator<BannerSectionContent> = (
|
|
|
34
33
|
};
|
|
35
34
|
};
|
|
36
35
|
|
|
37
|
-
export const urlValidator: ContentValidator<
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
export const urlValidator: ContentValidator<BannerSectionContent> = (
|
|
37
|
+
section,
|
|
38
|
+
): ValidateResult => {
|
|
40
39
|
if (
|
|
41
40
|
section.buttonLinkType === BUTTON_LINK_TYPE.url &&
|
|
42
41
|
!isURL(section.url) &&
|
|
@@ -80,9 +79,9 @@ export const urlValidator: ContentValidator<
|
|
|
80
79
|
};
|
|
81
80
|
};
|
|
82
81
|
|
|
83
|
-
export const pageValidator: ContentValidator<
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
export const pageValidator: ContentValidator<BannerSectionContent> = (
|
|
83
|
+
section,
|
|
84
|
+
): ValidateResult => {
|
|
86
85
|
if (section.buttonLinkType === BUTTON_LINK_TYPE.page && !section.pageSlug) {
|
|
87
86
|
return {
|
|
88
87
|
message: MISSING_PAGE_SLUG_MESSAGE(),
|
|
@@ -418,7 +418,6 @@
|
|
|
418
418
|
"dividerSectionDisplayName": "Divider",
|
|
419
419
|
"shapesSectionDisplayName": "Shapes",
|
|
420
420
|
"shopSectionDisplayName": "Store",
|
|
421
|
-
"bookingSectionDisplayName": "Booking",
|
|
422
421
|
"settingsDisplayName": "Settings",
|
|
423
422
|
"styleDisplayName": "Style",
|
|
424
423
|
"titleStyleLabel": "Title style",
|
|
@@ -496,8 +495,6 @@
|
|
|
496
495
|
"followUsOnTitle": "Follow us on",
|
|
497
496
|
"shapesTitle": "Shapes",
|
|
498
497
|
"defaultTextValue": "This is a sample text",
|
|
499
|
-
"defaultBookingTitle": "Book an appointment",
|
|
500
|
-
"defaultBookingDescription": "Schedule your appointment today",
|
|
501
498
|
"titlePlaceholder": "Title",
|
|
502
499
|
"successMessagePlaceholder": "Success message",
|
|
503
500
|
"successThanksPlaceholder": "Thank you for your request!",
|
|
@@ -554,8 +551,7 @@
|
|
|
554
551
|
"linkToLabel": "Link to",
|
|
555
552
|
"addLinkButtonText": "Add Link",
|
|
556
553
|
"enterValidUrlError": "Please enter a valid URL",
|
|
557
|
-
"enterTextHerePlaceholder": "Enter text here..."
|
|
558
|
-
"bookNowLabel": "Book Now"
|
|
554
|
+
"enterTextHerePlaceholder": "Enter text here..."
|
|
559
555
|
},
|
|
560
556
|
"formFields": {
|
|
561
557
|
"field": "Field",
|
|
@@ -663,9 +659,6 @@
|
|
|
663
659
|
"textAreaField": {
|
|
664
660
|
"maxLimitReached": "You have reached your maximum limit of characters allowed"
|
|
665
661
|
},
|
|
666
|
-
"urlField": {
|
|
667
|
-
"bookingLabel": "Add your booking link (e.g., <a href=\"https://calendly.com/\" class=\"maker-anchor\">Calendly</a>)"
|
|
668
|
-
},
|
|
669
662
|
"dropzoneUploader": {
|
|
670
663
|
"loadingMessage": "Loading...",
|
|
671
664
|
"dropToUpload": "Drop your files here or click to upload.",
|
|
@@ -124,7 +124,6 @@ const textImageFieldTr = (key) => tr(`textImageField.${key}`);
|
|
|
124
124
|
const textItemsFieldTr = (key) => tr(`textItemsField.${key}`);
|
|
125
125
|
const textStyleFieldTr = (key) => tr(`textStyleField.${key}`);
|
|
126
126
|
const textAreaFieldTr = (key) => tr(`textAreaField.${key}`);
|
|
127
|
-
const urlFieldTr = (key) => tr(`urlField.${key}`);
|
|
128
127
|
const productConfigOptionTr = (key) => tr(`productConfigOption.${key}`);
|
|
129
128
|
const editLogoSettingsTr = (key) => tr(`editLogoSettings.${key}`);
|
|
130
129
|
const myUploadSettingsTr = (key, valuesToInterpolate = {}) =>
|
|
@@ -282,6 +281,5 @@ export {
|
|
|
282
281
|
requestPaymentStripeTr,
|
|
283
282
|
productDetailModalTr,
|
|
284
283
|
videoTr,
|
|
285
|
-
urlFieldTr,
|
|
286
284
|
confirmModalTr,
|
|
287
285
|
};
|
|
@@ -38,7 +38,6 @@
|
|
|
38
38
|
"dividerSectionDisplayName": "Divider",
|
|
39
39
|
"shapesSectionDisplayName": "Shapes",
|
|
40
40
|
"shopSectionDisplayName": "Store",
|
|
41
|
-
"bookingSectionDisplayName": "Booking",
|
|
42
41
|
|
|
43
42
|
"settingsDisplayName": "Settings",
|
|
44
43
|
"styleDisplayName": "Style",
|
|
@@ -124,8 +123,6 @@
|
|
|
124
123
|
"followUsOnTitle": "Follow us on",
|
|
125
124
|
"shapesTitle": "Shapes",
|
|
126
125
|
"defaultTextValue": "This is a sample text",
|
|
127
|
-
"defaultBookingTitle": "Book an appointment",
|
|
128
|
-
"defaultBookingDescription": "Schedule your appointment today",
|
|
129
126
|
|
|
130
127
|
"titlePlaceholder": "Title",
|
|
131
128
|
"successMessagePlaceholder": "Success message",
|
|
@@ -191,7 +188,6 @@
|
|
|
191
188
|
"linkToLabel": "Link to",
|
|
192
189
|
"addLinkButtonText": "Add Link",
|
|
193
190
|
"enterValidUrlError": "Please enter a valid URL",
|
|
194
|
-
"enterTextHerePlaceholder": "Enter text here..."
|
|
195
|
-
"bookNowLabel": "Book Now"
|
|
191
|
+
"enterTextHerePlaceholder": "Enter text here..."
|
|
196
192
|
}
|
|
197
193
|
}
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
import { useUiPageSettingsStore } from '../../../page-settings/store';
|
|
23
23
|
import { PAGE_SECTIONS } from '../../../page-settings/models';
|
|
24
24
|
|
|
25
|
-
const RTE_ALLOWED_SECTION_TYPES = ['banner-section', 'text'
|
|
25
|
+
const RTE_ALLOWED_SECTION_TYPES = ['banner-section', 'text'];
|
|
26
26
|
const RTE_DISALLOWED_STYLE_FIELD_NAMES = [
|
|
27
27
|
'descriptionStyle',
|
|
28
28
|
'titleStyle',
|
|
@@ -2,29 +2,11 @@ import { defineComponent } from 'vue';
|
|
|
2
2
|
import GenericTextInputMixin from '../GenericTextInput.mixin';
|
|
3
3
|
import { URL_RE } from '../../constants';
|
|
4
4
|
import debounce from 'lodash.debounce';
|
|
5
|
-
import {
|
|
6
|
-
useEventTracker,
|
|
7
|
-
EVENTS,
|
|
8
|
-
} from '../../../../brand-page-maker/composables/useEventTracker';
|
|
9
5
|
|
|
10
6
|
const RESIZE_DEBOUNCE_WAIT_IN_MS = 500;
|
|
11
7
|
|
|
12
8
|
export default defineComponent({
|
|
13
|
-
props: {
|
|
14
|
-
brandPageType: {
|
|
15
|
-
type: String,
|
|
16
|
-
required: false,
|
|
17
|
-
default: undefined,
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
9
|
mixins: [GenericTextInputMixin],
|
|
21
|
-
setup() {
|
|
22
|
-
const eventTracker = useEventTracker();
|
|
23
|
-
|
|
24
|
-
return {
|
|
25
|
-
eventTracker,
|
|
26
|
-
};
|
|
27
|
-
},
|
|
28
10
|
data(): Record<string, any> {
|
|
29
11
|
return {
|
|
30
12
|
innerValue: '',
|
|
@@ -53,9 +35,6 @@ export default defineComponent({
|
|
|
53
35
|
|
|
54
36
|
return this.innerValue;
|
|
55
37
|
},
|
|
56
|
-
isBooking(): boolean {
|
|
57
|
-
return this.contentType === 'booking-section';
|
|
58
|
-
},
|
|
59
38
|
},
|
|
60
39
|
watch: {
|
|
61
40
|
value(newVal) {
|
|
@@ -93,22 +72,5 @@ export default defineComponent({
|
|
|
93
72
|
this.text = this.innerValue;
|
|
94
73
|
}
|
|
95
74
|
},
|
|
96
|
-
handleBookingLabelClick(event) {
|
|
97
|
-
if (event.target.tagName === 'A') {
|
|
98
|
-
event.preventDefault();
|
|
99
|
-
const href = event.target.getAttribute('href');
|
|
100
|
-
|
|
101
|
-
if (href) {
|
|
102
|
-
this.eventTracker.sendWebsiteEvent({
|
|
103
|
-
eventName: EVENTS.WEBSITE_MAKER_ADD_CONTENT,
|
|
104
|
-
eventProps: {
|
|
105
|
-
continuation: 'calendly-click',
|
|
106
|
-
},
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
window.open(href, '_blank', 'noopener,noreferrer');
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
75
|
},
|
|
114
76
|
});
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<div
|
|
4
|
-
v-if="isBooking"
|
|
5
|
-
class="tw-text-sm tw-mb-2"
|
|
6
|
-
@click="handleBookingLabelClick"
|
|
7
|
-
v-html="urlFieldTr('bookingLabel')"
|
|
8
|
-
/>
|
|
9
3
|
<TextInput
|
|
10
4
|
:id="`${id}-${name}`"
|
|
11
5
|
v-model="innerValue"
|
|
@@ -27,14 +21,8 @@
|
|
|
27
21
|
</template>
|
|
28
22
|
<script>
|
|
29
23
|
import UrlFieldMixin from './UrlField.mixin.ts';
|
|
30
|
-
import { urlFieldTr } from '../../../../composables/useTranslate';
|
|
31
24
|
|
|
32
25
|
export default {
|
|
33
26
|
mixins: [UrlFieldMixin],
|
|
34
|
-
setup() {
|
|
35
|
-
return {
|
|
36
|
-
urlFieldTr,
|
|
37
|
-
};
|
|
38
|
-
},
|
|
39
27
|
};
|
|
40
28
|
</script>
|
|
@@ -18,9 +18,8 @@ export default defineComponent({
|
|
|
18
18
|
data() {
|
|
19
19
|
return {
|
|
20
20
|
fontFamilyCategories: Object.values(FONT_FAMILY_CATEGORIES()),
|
|
21
|
-
activeFontFamilyCategory:
|
|
22
|
-
|
|
23
|
-
FONT_FAMILY_CATEGORIES().classic.key,
|
|
21
|
+
activeFontFamilyCategory: FONT_FAMILY_CATEGORIES().classic
|
|
22
|
+
.key as FontFamilyCategory,
|
|
24
23
|
FONT_FAMILY_CONFIGS,
|
|
25
24
|
};
|
|
26
25
|
},
|
|
@@ -31,27 +30,18 @@ export default defineComponent({
|
|
|
31
30
|
);
|
|
32
31
|
},
|
|
33
32
|
},
|
|
34
|
-
|
|
35
|
-
value
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
created() {
|
|
34
|
+
if (this.value) {
|
|
35
|
+
const category = Object.values(FONT_FAMILY_CONFIGS).find(
|
|
36
|
+
(x) => x.name === this.value,
|
|
37
|
+
)?.categories[0];
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
immediate: true,
|
|
44
|
-
},
|
|
39
|
+
if (category) {
|
|
40
|
+
this.activeFontFamilyCategory = category;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
45
43
|
},
|
|
46
44
|
methods: {
|
|
47
|
-
getCategoryForFont(fontName: FontFamilyName): FontFamilyCategory | null {
|
|
48
|
-
const fontConfig = Object.values(FONT_FAMILY_CONFIGS).find(
|
|
49
|
-
(config) => config.name === fontName,
|
|
50
|
-
);
|
|
51
|
-
|
|
52
|
-
return fontConfig?.categories[0] || null;
|
|
53
|
-
},
|
|
54
|
-
|
|
55
45
|
onFontFamilyButtonClick(fontFamilyOption: StyleTextFontFamilyOption) {
|
|
56
46
|
this.$emit('on-select', fontFamilyOption);
|
|
57
47
|
},
|