@designcrowd/library.brand-page 5.12.3 → 5.12.4-ast-booking

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.
Files changed (123) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-BIS4HwLB.js → CreatedOnBrandCrowd-de-de-BQeJ_n6B.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-DxDARay8.js → CreatedOnBrandCrowd-en-us-Cj3iYC5T.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-CooG2xz7.js → CreatedOnBrandCrowd-es-es-Cl7JjVJm.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-CGfs-T2d.js → CreatedOnBrandCrowd-fr-fr-DRomv4BA.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-pt-pt-CVY8SeTl.js → CreatedOnBrandCrowd-pt-pt-DZFEw5Xl.js} +1 -1
  6. package/lib/src/{CreatedOnDcom-de-de-1fdeLt5s.js → CreatedOnDcom-de-de-DZhX2bER.js} +1 -1
  7. package/lib/src/{CreatedOnDcom-en-us-0ItobO75.js → CreatedOnDcom-en-us-Bh9DHJW3.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-es-es-Bss96GRx.js → CreatedOnDcom-es-es-CUkCHVmG.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-fr-fr-CXmnIRMO.js → CreatedOnDcom-fr-fr-CF_tcHWx.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-pt-pt-BDYYHpJa.js → CreatedOnDcom-pt-pt-gyRIp-Wi.js} +1 -1
  11. package/lib/src/brand-page/models/content.model.d.ts +1 -0
  12. package/lib/src/brand-page/models/content.model.js +1 -0
  13. package/lib/src/brand-page/models/index.d.ts +16 -0
  14. package/lib/src/brand-page/utils/style.util.js +1 -1
  15. package/lib/src/brand-page/utils/view-model.util.d.ts +3 -2
  16. package/lib/src/brand-page/utils/view-model.util.js +14 -0
  17. package/lib/src/brand-page/view-models.d.ts +6 -2
  18. package/lib/src/brand-page-maker/assessors/banner-section-description-visibility.assessor.d.ts +4 -4
  19. package/lib/src/brand-page-maker/assessors/banner-section-field.assessor.d.ts +4 -4
  20. package/lib/src/brand-page-maker/components/admin-logo-settings/AdminLogoSettings.mixin.d.ts +2 -2
  21. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +19 -18
  22. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +2 -0
  23. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +20 -20
  24. package/lib/src/brand-page-maker/constants/config-settings-constant.d.ts +2 -1
  25. package/lib/src/brand-page-maker/constants/config-settings-constant.js +101 -1
  26. package/lib/src/brand-page-maker/models/content-settings.d.ts +2 -1
  27. package/lib/src/brand-page-maker/models/content-settings.js +28 -0
  28. package/lib/src/brand-page-maker/validators/section-button.validator.d.ts +3 -3
  29. package/lib/src/bundled-translations-BZJKPEb9.js +155 -0
  30. package/lib/src/bundled-translations.de-DE-gxort83w.js +153 -0
  31. package/lib/src/bundled-translations.es-ES-BuDFNpDO.js +153 -0
  32. package/lib/src/bundled-translations.fr-FR-B1h4iGcU.js +153 -0
  33. package/lib/src/bundled-translations.pt-PT-DWXOT8W0.js +153 -0
  34. package/lib/src/bundles/bundled-translations.de-DE.json +10 -2
  35. package/lib/src/bundles/bundled-translations.es-ES.json +10 -2
  36. package/lib/src/bundles/bundled-translations.fr-FR.json +10 -2
  37. package/lib/src/bundles/bundled-translations.json +18 -3
  38. package/lib/src/bundles/bundled-translations.pt-PT.json +10 -2
  39. package/lib/src/composables/useTranslate.d.ts +3 -1
  40. package/lib/src/composables/useTranslate.js +3 -1
  41. package/lib/src/css/library.brand-page-brandCrowd.min.css +14 -9
  42. package/lib/src/css/library.brand-page-brandPage.min.css +14 -9
  43. package/lib/src/css/library.brand-page-designCom.min.css +14 -9
  44. package/lib/src/css/library.brand-page-preview.min.css +14 -9
  45. package/lib/src/index.mjs +176 -175
  46. package/lib/src/{lib-B3W7JSHn.js → lib-Dsso3HKV.js} +21386 -21063
  47. package/lib/src/shared/confirm-modal/ConfirmModal.mixin.d.ts +1 -0
  48. package/lib/src/shared/confirm-modal/ConfirmModal.mixin.js +2 -0
  49. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +20 -20
  50. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +21 -21
  51. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +20 -20
  52. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +18 -18
  53. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.js +1 -1
  54. package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +18 -18
  55. package/lib/src/shared/content-settings/components/url-field/UrlField.mixin.d.ts +39 -2
  56. package/lib/src/shared/content-settings/components/url-field/UrlField.mixin.js +32 -0
  57. package/lib/src/shared/content-settings/store/content-settings-store.d.ts +18 -18
  58. package/lib/src/shared/font-family-selector/FontFamilySelector.mixin.d.ts +3 -2
  59. package/lib/src/shared/font-family-selector/FontFamilySelector.mixin.js +16 -9
  60. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +22 -22
  61. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +20 -20
  62. package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +1 -1
  63. package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.js +11 -1
  64. package/package.json +1 -1
  65. package/src/brand-page/components/booking-section/BookingSection.vue +240 -0
  66. package/src/brand-page/components/map/Map.vue +17 -9
  67. package/src/brand-page/components/page/PageComponent.vue +2 -0
  68. package/src/brand-page/models/content.model.ts +1 -0
  69. package/src/brand-page/models/index.ts +17 -0
  70. package/src/brand-page/utils/style.util.ts +1 -1
  71. package/src/brand-page/utils/view-model.util.ts +27 -0
  72. package/src/brand-page/view-models.ts +10 -1
  73. package/src/brand-page-maker/assessors/banner-section-description-visibility.assessor.ts +7 -4
  74. package/src/brand-page-maker/assessors/banner-section-field.assessor.ts +7 -4
  75. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +2 -0
  76. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.vue +1 -1
  77. package/src/brand-page-maker/components/google-analytics/GoogleAnalytics.vue +3 -3
  78. package/src/brand-page-maker/constants/config-settings-constant.ts +107 -0
  79. package/src/brand-page-maker/models/content-settings.ts +32 -0
  80. package/src/brand-page-maker/validators/section-button.validator.ts +7 -6
  81. package/src/bundles/bundled-translations.de-DE.json +10 -2
  82. package/src/bundles/bundled-translations.es-ES.json +10 -2
  83. package/src/bundles/bundled-translations.fr-FR.json +10 -2
  84. package/src/bundles/bundled-translations.json +18 -3
  85. package/src/bundles/bundled-translations.pt-PT.json +10 -2
  86. package/src/composables/useTranslate.ts +5 -0
  87. package/src/shared/common/i18n/common.de-DE.json +2 -1
  88. package/src/shared/common/i18n/common.es-ES.json +2 -1
  89. package/src/shared/common/i18n/common.fr-FR.json +2 -1
  90. package/src/shared/common/i18n/common.json +3 -1
  91. package/src/shared/common/i18n/common.pt-PT.json +2 -1
  92. package/src/shared/confirm-modal/ConfirmModal.mixin.ts +2 -0
  93. package/src/shared/confirm-modal/ConfirmModal.vue +5 -3
  94. package/src/shared/confirm-modal/i18n/confirm-modal.de-DE.json +7 -0
  95. package/src/shared/confirm-modal/i18n/confirm-modal.es-ES.json +7 -0
  96. package/src/shared/confirm-modal/i18n/confirm-modal.fr-FR.json +7 -0
  97. package/src/shared/confirm-modal/i18n/confirm-modal.json +7 -0
  98. package/src/shared/confirm-modal/i18n/confirm-modal.pt-PT.json +7 -0
  99. package/src/shared/content-settings/components/content-settings/i18n/content-settings.json +5 -1
  100. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.ts +1 -1
  101. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.vue +1 -1
  102. package/src/shared/content-settings/components/payment-config-field/PaymentConfigOptionField.vue +4 -1
  103. package/src/shared/content-settings/components/url-field/UrlField.mixin.ts +38 -0
  104. package/src/shared/content-settings/components/url-field/UrlField.vue +12 -0
  105. package/src/shared/content-settings/components/url-field/i18n/url-field.json +5 -0
  106. package/src/shared/font-family-selector/FontFamilySelector.mixin.ts +21 -11
  107. package/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.ts +14 -3
  108. package/src/shared/publish-brand-page-with-state/i18n/publish-brand-page-modal-with-state.de-DE.json +4 -2
  109. package/src/shared/publish-brand-page-with-state/i18n/publish-brand-page-modal-with-state.es-ES.json +4 -2
  110. package/src/shared/publish-brand-page-with-state/i18n/publish-brand-page-modal-with-state.fr-FR.json +4 -2
  111. package/src/shared/publish-brand-page-with-state/i18n/publish-brand-page-modal-with-state.json +4 -2
  112. package/src/shared/publish-brand-page-with-state/i18n/publish-brand-page-modal-with-state.pt-PT.json +4 -2
  113. package/lib/src/brand-page/components/map/Map.mixin.d.ts +0 -50
  114. package/lib/src/brand-page/components/map/Map.mixin.js +0 -20
  115. package/lib/src/bundled-translations-DE2UZ_8B.js +0 -151
  116. package/lib/src/bundled-translations.de-DE-BawsKiJ9.js +0 -151
  117. package/lib/src/bundled-translations.es-ES-BZijuSLY.js +0 -151
  118. package/lib/src/bundled-translations.fr-FR-hqcn5AfG.js +0 -151
  119. package/lib/src/bundled-translations.pt-PT-Bnt_n1_N.js +0 -151
  120. package/src/brand-page/components/logo/test.json +0 -866
  121. package/src/brand-page/components/logo/test2.json +0 -765
  122. package/src/brand-page/components/logo/test3.json +0 -749
  123. package/src/brand-page/components/map/Map.mixin.ts +0 -24
@@ -36,6 +36,7 @@ import type {
36
36
  LogoTemplateImageModel,
37
37
  CookieOptions,
38
38
  SensitiveContent,
39
+ BookingSectionContent,
39
40
  } from './models';
40
41
  import type { ImagesSectionContentDisplayStyle } from './constants';
41
42
 
@@ -59,7 +60,8 @@ export type ViewModelType =
59
60
  | 'testimonial-section'
60
61
  | 'social-links'
61
62
  | 'shapes-section'
62
- | 'shop-section';
63
+ | 'shop-section'
64
+ | 'booking-section';
63
65
 
64
66
  export interface ContentViewModel {
65
67
  id: string;
@@ -208,6 +210,13 @@ export interface DividerSectionViewModel
208
210
  isFullWidth: boolean;
209
211
  }
210
212
 
213
+ export interface BookingSectionViewModel
214
+ extends ContentViewModel,
215
+ Omit<BookingSectionContent, 'type'> {
216
+ buttonStyles: ButtonStyles;
217
+ isFullWidth: boolean;
218
+ }
219
+
211
220
  export interface PageHeaderViewModel
212
221
  extends Omit<
213
222
  PageHeaderDesktop | PageHeaderMobile,
@@ -1,4 +1,7 @@
1
- import type { BannerSectionContent } from '../../brand-page';
1
+ import type {
2
+ BannerSectionContent,
3
+ BookingSectionContent,
4
+ } from '../../brand-page';
2
5
  import { BUTTON_LINK_TYPE } from '../../brand-page';
3
6
  import type { VisibilityAssessor } from '../models';
4
7
  import {
@@ -9,7 +12,7 @@ import {
9
12
  } from '../../brand-page/constants';
10
13
 
11
14
  export const bannerSectionUrlVisibilityAssessor: VisibilityAssessor<
12
- BannerSectionContent | undefined
15
+ BannerSectionContent | BookingSectionContent | undefined
13
16
  > = (content) => {
14
17
  return (
15
18
  content?.buttonLinkType !== BUTTON_LINK_TYPE.page &&
@@ -19,7 +22,7 @@ export const bannerSectionUrlVisibilityAssessor: VisibilityAssessor<
19
22
  };
20
23
 
21
24
  export const bannerSectionPageVisibilityAssessor: VisibilityAssessor<
22
- BannerSectionContent | undefined
25
+ BannerSectionContent | BookingSectionContent | undefined
23
26
  > = (content) => {
24
27
  return (
25
28
  content?.buttonLinkType === BUTTON_LINK_TYPE.page &&
@@ -29,7 +32,7 @@ export const bannerSectionPageVisibilityAssessor: VisibilityAssessor<
29
32
  };
30
33
 
31
34
  export const bannerLinkTypeVisibilityAssessor: VisibilityAssessor<
32
- BannerSectionContent | undefined
35
+ BannerSectionContent | BookingSectionContent | undefined
33
36
  > = (content) => {
34
37
  return content?.buttonText !== '' && content?.buttonText !== false;
35
38
  };
@@ -1,4 +1,7 @@
1
- import type { BannerSectionContent } from '../../brand-page';
1
+ import type {
2
+ BannerSectionContent,
3
+ BookingSectionContent,
4
+ } from '../../brand-page';
2
5
  import type {
3
6
  FieldTypeAssessor,
4
7
  ItemFieldType,
@@ -6,7 +9,7 @@ import type {
6
9
  } from '../models';
7
10
 
8
11
  export const bannerSectionFieldTypeAssessor: FieldTypeAssessor<
9
- BannerSectionContent | undefined
12
+ BannerSectionContent | BookingSectionContent | undefined
10
13
  > = (content): ItemFieldType => {
11
14
  switch (content?.buttonLinkType) {
12
15
  case 'url':
@@ -21,7 +24,7 @@ export const bannerSectionFieldTypeAssessor: FieldTypeAssessor<
21
24
  };
22
25
 
23
26
  export const bannerSectionRoleTypeAssessor: FieldTypeAssessor<
24
- BannerSectionContent | undefined
27
+ BannerSectionContent | BookingSectionContent | undefined
25
28
  > = (content): ItemFieldType => {
26
29
  switch (content?.buttonLinkType) {
27
30
  case 'url':
@@ -36,7 +39,7 @@ export const bannerSectionRoleTypeAssessor: FieldTypeAssessor<
36
39
  };
37
40
 
38
41
  export const bannerPlaceholderFieldTypeAssessor: PlaceholderTypeAssessor<
39
- BannerSectionContent | undefined
42
+ BannerSectionContent | BookingSectionContent | undefined
40
43
  > = (content): string => {
41
44
  switch (content?.buttonLinkType) {
42
45
  case 'url':
@@ -44,6 +44,7 @@ import type { ShopConfigData } from '../../../brand-page/models/shop.model';
44
44
  import { useProductConfigStore } from '../../../brand-page-maker/stores/product-config/product-config-store';
45
45
  import type { UpdateItemValuePayload } from '../../../shared/content-settings/models';
46
46
  import { UPGRADE_CTA_LOCATIONS } from '../../composables/useEventTracker';
47
+ import { commonTr } from '../../../composables/useTranslate';
47
48
 
48
49
  export interface BrandPageMakerViewModel {
49
50
  adminPreviewLogoTemplateModels?: AdminPreviewLogoTemplateModel[];
@@ -85,6 +86,7 @@ export default defineComponent({
85
86
  const localisedRouteStore = useLocalisedRouteStore();
86
87
 
87
88
  return {
89
+ commonTr,
88
90
  currentNotificationMessage: computed(
89
91
  () => brandPageMakerStore.currentNotificationMessage,
90
92
  ),
@@ -89,7 +89,7 @@
89
89
  <!-- Start template change confirm modal -->
90
90
  <ConfirmModal
91
91
  :visible="isChangeTemplateConfirmModalVisible"
92
- description="Changing templates will cause you to lose your changes. All your content will be erased. We recommend you duplicate your site beforehand if you want to retain your changes."
92
+ :description="commonTr('changeTemplateConfirmationMessage')"
93
93
  @confirm="onChangeTemplateConfirmModalConfirm"
94
94
  @cancel="onChangeTemplateConfirmModalCancel"
95
95
  />
@@ -78,8 +78,9 @@
78
78
  @input="onValueChange"
79
79
  />
80
80
 
81
- <div v-if="!hasValue">
81
+ <div class="tw-flex tw-items-center">
82
82
  <Button
83
+ v-if="!hasValue"
83
84
  :label="commonTr('save')"
84
85
  variant="primary"
85
86
  size="small-medium"
@@ -87,9 +88,8 @@
87
88
  :disabled="!isReadyToSave"
88
89
  @on-click.stop="onSlugChangeButtonClicked"
89
90
  />
90
- </div>
91
- <div v-else>
92
91
  <Button
92
+ v-else
93
93
  :label="commonTr('remove')"
94
94
  variant="primary"
95
95
  size="small-medium"
@@ -34,6 +34,7 @@ import type {
34
34
  ShapesSectionContent,
35
35
  Content,
36
36
  ShopContent,
37
+ BookingSectionContent,
37
38
  } from '../../brand-page';
38
39
  import {
39
40
  SOCIAL_LINKS_ICON_DISPLAY_STYLES,
@@ -81,6 +82,7 @@ import {
81
82
  createInitialShapesSectionContent,
82
83
  VARIANT_DISPLAY_MODES,
83
84
  createInitialShopContent,
85
+ createInitialBookingSectionContent,
84
86
  } from '../models';
85
87
  import type {
86
88
  ContentReplaceImageSettings,
@@ -3016,6 +3018,110 @@ export const SHOP_SECTION_SETTINGS_CONFIG = (): ContentSettingsConfig<
3016
3018
  type: 'shop-section',
3017
3019
  });
3018
3020
 
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
+
3019
3125
  export const CONTENT_SETTINGS_CONFIGS = (): Record<
3020
3126
  ContentType,
3021
3127
  ContentSettingsConfig<any>
@@ -3051,4 +3157,5 @@ export const CONTENT_SETTINGS_CONFIGS = (): Record<
3051
3157
  'divider-section': DIVIDER_SECTION_SETTINGS_CONFIG(),
3052
3158
  'shapes-section': SHAPES_SECTION_SETTINGS_CONFIG(),
3053
3159
  'shop-section': SHOP_SECTION_SETTINGS_CONFIG(),
3160
+ 'booking-section': BOOKING_SECTION_SETTINGS_CONFIG(),
3054
3161
  });
@@ -51,6 +51,7 @@ import type {
51
51
  BrandPageType,
52
52
  SupportMeContent,
53
53
  ShopContent,
54
+ BookingSectionContent,
54
55
  } from '../../brand-page';
55
56
  import * as uuid from 'uuid';
56
57
  import type { CreateInitialContentFunction } from './content-settings-configs';
@@ -517,6 +518,37 @@ export const createInitialBannerSectionContent: CreateInitialContentFunction<
517
518
  };
518
519
  };
519
520
 
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
+
520
552
  export const createInitialImagesSectionContent: CreateInitialContentFunction<
521
553
  ImagesSectionContent
522
554
  > = (options?: CreateInitialContentOptions) => {
@@ -2,6 +2,7 @@ import { isEmail, isTel, isURL } from '../../utils/validator.util';
2
2
  import {
3
3
  BUTTON_LINK_TYPE,
4
4
  type BannerSectionContent,
5
+ type BookingSectionContent,
5
6
  } from '../../brand-page/models';
6
7
  import type { ContentValidator, ValidateResult } from '../models';
7
8
  import { validatorTr } from '../../composables/useTranslate';
@@ -33,9 +34,9 @@ export const textValidator: ContentValidator<BannerSectionContent> = (
33
34
  };
34
35
  };
35
36
 
36
- export const urlValidator: ContentValidator<BannerSectionContent> = (
37
- section,
38
- ): ValidateResult => {
37
+ export const urlValidator: ContentValidator<
38
+ BannerSectionContent | BookingSectionContent
39
+ > = (section): ValidateResult => {
39
40
  if (
40
41
  section.buttonLinkType === BUTTON_LINK_TYPE.url &&
41
42
  !isURL(section.url) &&
@@ -79,9 +80,9 @@ export const urlValidator: ContentValidator<BannerSectionContent> = (
79
80
  };
80
81
  };
81
82
 
82
- export const pageValidator: ContentValidator<BannerSectionContent> = (
83
- section,
84
- ): ValidateResult => {
83
+ export const pageValidator: ContentValidator<
84
+ BannerSectionContent | BookingSectionContent
85
+ > = (section): ValidateResult => {
85
86
  if (section.buttonLinkType === BUTTON_LINK_TYPE.page && !section.pageSlug) {
86
87
  return {
87
88
  message: MISSING_PAGE_SLUG_MESSAGE(),
@@ -336,7 +336,8 @@
336
336
  "copyrightTextPlaceholder": "Copyright-Text hier",
337
337
  "continue": "Weiter",
338
338
  "defaultSaveDescription": "Vergessen Sie nicht, Ihre Änderungen zu veröffentlichen, sobald Sie mit Ihrem Design zufrieden sind.",
339
- "saveSuccess": "Gespeichert!"
339
+ "saveSuccess": "Gespeichert!",
340
+ "changeTemplateConfirmationMessage": "Wenn Sie die Vorlagen ändern, gehen Ihre Änderungen verloren. Alle Ihre Inhalte werden gelöscht. Wir empfehlen Ihnen, Ihre Website vorher zu duplizieren, wenn Sie Ihre Änderungen beibehalten möchten."
340
341
  },
341
342
  "error": {
342
343
  "maxCharacters": "Sie haben das Zeichenlimit erreicht",
@@ -366,6 +367,11 @@
366
367
  "mailingListError": "Es ist ein Fehler aufgetreten. Das Abonnieren der Mailingliste ist nicht möglich.",
367
368
  "contactMessageError": "Es ist ein Fehler aufgetreten. Es ist nicht möglich, das Kontaktformular zu abonnieren."
368
369
  },
370
+ "confirmModal": {
371
+ "confirmMessageTitle": "Sind Sie sicher?",
372
+ "noLabel": "Nein",
373
+ "yesLabel": "Ja"
374
+ },
369
375
  "colorField": {
370
376
  "recommendedColors": "Empfohlene Farben",
371
377
  "logoColors": "Logo-Farben",
@@ -730,7 +736,9 @@
730
736
  "domainSearchButtonLabel": "Suche",
731
737
  "customDomainCardDescription": "Wählen Sie eine Domain, die zu Ihrem Unternehmen passt, damit Ihre Kunden Sie problemlos finden",
732
738
  "customDomainLabel": "Benutzerdefinierte Domain",
733
- "recommendedLabel": "Empfohlen"
739
+ "recommendedLabel": "Empfohlen",
740
+ "websiteFriendlyName": "Website",
741
+ "digitalBusinessCardFriendlyName": "Digitale Visitenkarte"
734
742
  },
735
743
  "shapeLibrary": {
736
744
  "loadMoreShapes": "Weitere Formen laden"
@@ -336,7 +336,8 @@
336
336
  "copyrightTextPlaceholder": "Texto de copyright aquí",
337
337
  "continue": "Continuar",
338
338
  "defaultSaveDescription": "No olvides publicar los cambios una vez que tengas un diseño que te guste.",
339
- "saveSuccess": "¡Se ha guardado correctamente!"
339
+ "saveSuccess": "¡Se ha guardado correctamente!",
340
+ "changeTemplateConfirmationMessage": "Cambiar las plantillas hará que pierdas los cambios. Se borrará todo el contenido. Te recomendamos que hagas un duplicado de tu sitio web de antemano si quieres conservar los cambios."
340
341
  },
341
342
  "error": {
342
343
  "maxCharacters": "Has alcanzado tu límite máximo de caracteres permitidos",
@@ -366,6 +367,11 @@
366
367
  "mailingListError": "Se ha producido un error. No es posible suscribirte a la lista de correo.",
367
368
  "contactMessageError": "Se ha producido un error. No es posible suscribirte para enviar el formulario de contacto."
368
369
  },
370
+ "confirmModal": {
371
+ "confirmMessageTitle": "¿Estás seguro?",
372
+ "noLabel": "No",
373
+ "yesLabel": "Sí"
374
+ },
369
375
  "colorField": {
370
376
  "recommendedColors": "Colores recomendados",
371
377
  "logoColors": "Colores del logo",
@@ -730,7 +736,9 @@
730
736
  "domainSearchButtonLabel": "Buscar",
731
737
  "customDomainCardDescription": "Facilita que los clientes te encuentren con un dominio que sea fiel reflejo de tu negocio",
732
738
  "customDomainLabel": "Dominio personalizado",
733
- "recommendedLabel": "Recomendado"
739
+ "recommendedLabel": "Recomendado",
740
+ "websiteFriendlyName": "Sitio web",
741
+ "digitalBusinessCardFriendlyName": "Tarjeta de visita digital"
734
742
  },
735
743
  "shapeLibrary": {
736
744
  "loadMoreShapes": "Cargar más formas"
@@ -336,7 +336,8 @@
336
336
  "copyrightTextPlaceholder": "Texte de copyright ici",
337
337
  "continue": "Continuer",
338
338
  "defaultSaveDescription": "N’oubliez pas de publier vos modifications une fois que votre design vous convient.",
339
- "saveSuccess": "Enregistrement réussi !"
339
+ "saveSuccess": "Enregistrement réussi !",
340
+ "changeTemplateConfirmationMessage": "Si vous changez de modèle, vous perdrez vos modifications et tout votre contenu sera effacé. Nous vous recommandons de dupliquer votre site au préalable si vous souhaitez conserver vos modifications."
340
341
  },
341
342
  "error": {
342
343
  "maxCharacters": "Vous avez atteint la limite maximale de caractères autorisés",
@@ -366,6 +367,11 @@
366
367
  "mailingListError": "Une erreur s'est produite. Impossible de s'abonner à la liste de diffusion.",
367
368
  "contactMessageError": "Une erreur s'est produite. Impossible de s'inscrire pour envoyer le formulaire de contact."
368
369
  },
370
+ "confirmModal": {
371
+ "confirmMessageTitle": "Êtes-vous sûr ?",
372
+ "noLabel": "Non",
373
+ "yesLabel": "Oui"
374
+ },
369
375
  "colorField": {
370
376
  "recommendedColors": "Couleurs recommandées",
371
377
  "logoColors": "Couleurs du logo",
@@ -730,7 +736,9 @@
730
736
  "domainSearchButtonLabel": "Rechercher",
731
737
  "customDomainCardDescription": "Permettez aux clients de vous trouver facilement grâce à un nom de domaine qui correspond à votre entreprise",
732
738
  "customDomainLabel": "Domaine personnalisé",
733
- "recommendedLabel": "Recommandé"
739
+ "recommendedLabel": "Recommandé",
740
+ "websiteFriendlyName": "Site Web",
741
+ "digitalBusinessCardFriendlyName": "Carte de visite numérique"
734
742
  },
735
743
  "shapeLibrary": {
736
744
  "loadMoreShapes": "Charger plus de formes"
@@ -336,7 +336,8 @@
336
336
  "copyrightTextPlaceholder": "Copyright text here",
337
337
  "continue": "Continue",
338
338
  "defaultSaveDescription": "Don’t forget to publish your changes once you are happy with your design.",
339
- "saveSuccess": "Save successful!"
339
+ "saveSuccess": "Save successful!",
340
+ "changeTemplateConfirmationMessage": "Changing templates will cause you to lose your changes. All your content will be erased. We recommend you duplicate your site beforehand if you want to retain your changes."
340
341
  },
341
342
  "error": {
342
343
  "maxCharacters": "You have reached your maximum limit of characters allowed",
@@ -366,6 +367,11 @@
366
367
  "mailingListError": "An error has occurred. Unable to subscribe to mailing list.",
367
368
  "contactMessageError": "An error has occurred. Unable to subscribe to submit contact form."
368
369
  },
370
+ "confirmModal": {
371
+ "confirmMessageTitle": "Are you sure?",
372
+ "noLabel": "No",
373
+ "yesLabel": "Yes"
374
+ },
369
375
  "colorField": {
370
376
  "recommendedColors": "Recommended Colors",
371
377
  "logoColors": "Logo Colors",
@@ -412,6 +418,7 @@
412
418
  "dividerSectionDisplayName": "Divider",
413
419
  "shapesSectionDisplayName": "Shapes",
414
420
  "shopSectionDisplayName": "Store",
421
+ "bookingSectionDisplayName": "Booking",
415
422
  "settingsDisplayName": "Settings",
416
423
  "styleDisplayName": "Style",
417
424
  "titleStyleLabel": "Title style",
@@ -489,6 +496,8 @@
489
496
  "followUsOnTitle": "Follow us on",
490
497
  "shapesTitle": "Shapes",
491
498
  "defaultTextValue": "This is a sample text",
499
+ "defaultBookingTitle": "Book an appointment",
500
+ "defaultBookingDescription": "Schedule your appointment today",
492
501
  "titlePlaceholder": "Title",
493
502
  "successMessagePlaceholder": "Success message",
494
503
  "successThanksPlaceholder": "Thank you for your request!",
@@ -545,7 +554,8 @@
545
554
  "linkToLabel": "Link to",
546
555
  "addLinkButtonText": "Add Link",
547
556
  "enterValidUrlError": "Please enter a valid URL",
548
- "enterTextHerePlaceholder": "Enter text here..."
557
+ "enterTextHerePlaceholder": "Enter text here...",
558
+ "bookNowLabel": "Book Now"
549
559
  },
550
560
  "formFields": {
551
561
  "field": "Field",
@@ -653,6 +663,9 @@
653
663
  "textAreaField": {
654
664
  "maxLimitReached": "You have reached your maximum limit of characters allowed"
655
665
  },
666
+ "urlField": {
667
+ "bookingLabel": "Add your booking link (e.g., <a href=\"https://calendly.com/\" class=\"maker-anchor\">Calendly</a>)"
668
+ },
656
669
  "dropzoneUploader": {
657
670
  "loadingMessage": "Loading...",
658
671
  "dropToUpload": "Drop your files here or click to upload.",
@@ -730,7 +743,9 @@
730
743
  "domainSearchButtonLabel": "Search",
731
744
  "customDomainCardDescription": "Make it easy for customers to find you with a domain that matches your business",
732
745
  "customDomainLabel": "Custom Domain",
733
- "recommendedLabel": "Recommended"
746
+ "recommendedLabel": "Recommended",
747
+ "websiteFriendlyName": "Website",
748
+ "digitalBusinessCardFriendlyName": "Digital Business Card"
734
749
  },
735
750
  "shapeLibrary": {
736
751
  "loadMoreShapes": "Load More Shapes"
@@ -336,7 +336,8 @@
336
336
  "copyrightTextPlaceholder": "Texto de direitos de autor aqui",
337
337
  "continue": "Continuar",
338
338
  "defaultSaveDescription": "Não se esqueça de publicar as suas alterações quando estiver satisfeito com o seu design.",
339
- "saveSuccess": "Gravação bem-sucedida!"
339
+ "saveSuccess": "Gravação bem-sucedida!",
340
+ "changeTemplateConfirmationMessage": "Alterar modelos fará com que perca as suas alterações. Todo o seu conteúdo será apagado. Recomendamos que duplique o seu site previamente, caso pretenda manter as suas alterações."
340
341
  },
341
342
  "error": {
342
343
  "maxCharacters": "Atingiu o limite máximo de caracteres permitido",
@@ -366,6 +367,11 @@
366
367
  "mailingListError": "Ocorreu um erro. Não é possível subscrever a lista de e-mail.",
367
368
  "contactMessageError": "Ocorreu um erro. Não é possível subscrever para enviar o formulário de contacto."
368
369
  },
370
+ "confirmModal": {
371
+ "confirmMessageTitle": "Tem a certeza?",
372
+ "noLabel": "Não",
373
+ "yesLabel": "Sim"
374
+ },
369
375
  "colorField": {
370
376
  "recommendedColors": "Cores recomendadas",
371
377
  "logoColors": "Cores do logótipo",
@@ -730,7 +736,9 @@
730
736
  "domainSearchButtonLabel": "Pesquisar",
731
737
  "customDomainCardDescription": "Permita que os clientes encontrem a sua empresa facilmente com um domínio que corresponda à empresa",
732
738
  "customDomainLabel": "Domínio personalizado",
733
- "recommendedLabel": "Recomendado"
739
+ "recommendedLabel": "Recomendado",
740
+ "websiteFriendlyName": "Website",
741
+ "digitalBusinessCardFriendlyName": "Cartão de visita digital"
734
742
  },
735
743
  "shapeLibrary": {
736
744
  "loadMoreShapes": "Carregar mais formas"
@@ -124,6 +124,7 @@ 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}`);
127
128
  const productConfigOptionTr = (key) => tr(`productConfigOption.${key}`);
128
129
  const editLogoSettingsTr = (key) => tr(`editLogoSettings.${key}`);
129
130
  const myUploadSettingsTr = (key, valuesToInterpolate = {}) =>
@@ -187,6 +188,8 @@ const productDetailModalTr = (key, valuesToInterpolate = {}) =>
187
188
  tr(`productDetailModal.${key}`, valuesToInterpolate);
188
189
  const videoTr = (key, valuesToInterpolate = {}) =>
189
190
  tr(`video.${key}`, valuesToInterpolate);
191
+ const confirmModalTr = (key, valuesToInterpolate = {}) =>
192
+ tr(`confirmModal.${key}`, valuesToInterpolate);
190
193
 
191
194
  const currentLocale = (): LocaleTypes => {
192
195
  const i18 = getI18NextInstance();
@@ -279,4 +282,6 @@ export {
279
282
  requestPaymentStripeTr,
280
283
  productDetailModalTr,
281
284
  videoTr,
285
+ urlFieldTr,
286
+ confirmModalTr,
282
287
  };
@@ -44,6 +44,7 @@
44
44
  "copyrightTextPlaceholder" : "Copyright-Text hier",
45
45
  "continue" : "Weiter",
46
46
  "defaultSaveDescription" : "Vergessen Sie nicht, Ihre Änderungen zu veröffentlichen, sobald Sie mit Ihrem Design zufrieden sind.",
47
- "saveSuccess" : "Gespeichert!"
47
+ "saveSuccess" : "Gespeichert!",
48
+ "changeTemplateConfirmationMessage" : "Wenn Sie die Vorlagen ändern, gehen Ihre Änderungen verloren. Alle Ihre Inhalte werden gelöscht. Wir empfehlen Ihnen, Ihre Website vorher zu duplizieren, wenn Sie Ihre Änderungen beibehalten möchten."
48
49
  }
49
50
  }
@@ -44,6 +44,7 @@
44
44
  "copyrightTextPlaceholder" : "Texto de copyright aquí",
45
45
  "continue" : "Continuar",
46
46
  "defaultSaveDescription" : "No olvides publicar los cambios una vez que tengas un diseño que te guste.",
47
- "saveSuccess" : "¡Se ha guardado correctamente!"
47
+ "saveSuccess" : "¡Se ha guardado correctamente!",
48
+ "changeTemplateConfirmationMessage" : "Cambiar las plantillas hará que pierdas los cambios. Se borrará todo el contenido. Te recomendamos que hagas un duplicado de tu sitio web de antemano si quieres conservar los cambios."
48
49
  }
49
50
  }
@@ -44,6 +44,7 @@
44
44
  "copyrightTextPlaceholder" : "Texte de copyright ici",
45
45
  "continue" : "Continuer",
46
46
  "defaultSaveDescription" : "N’oubliez pas de publier vos modifications une fois que votre design vous convient.",
47
- "saveSuccess" : "Enregistrement réussi !"
47
+ "saveSuccess" : "Enregistrement réussi !",
48
+ "changeTemplateConfirmationMessage" : "Si vous changez de modèle, vous perdrez vos modifications et tout votre contenu sera effacé. Nous vous recommandons de dupliquer votre site au préalable si vous souhaitez conserver vos modifications."
48
49
  }
49
50
  }
@@ -52,6 +52,8 @@
52
52
 
53
53
  "continue": "Continue",
54
54
  "defaultSaveDescription": "Don’t forget to publish your changes once you are happy with your design.",
55
- "saveSuccess": "Save successful!"
55
+ "saveSuccess": "Save successful!",
56
+
57
+ "changeTemplateConfirmationMessage": "Changing templates will cause you to lose your changes. All your content will be erased. We recommend you duplicate your site beforehand if you want to retain your changes."
56
58
  }
57
59
  }
@@ -44,6 +44,7 @@
44
44
  "copyrightTextPlaceholder" : "Texto de direitos de autor aqui",
45
45
  "continue" : "Continuar",
46
46
  "defaultSaveDescription" : "Não se esqueça de publicar as suas alterações quando estiver satisfeito com o seu design.",
47
- "saveSuccess" : "Gravação bem-sucedida!"
47
+ "saveSuccess" : "Gravação bem-sucedida!",
48
+ "changeTemplateConfirmationMessage" : "Alterar modelos fará com que perca as suas alterações. Todo o seu conteúdo será apagado. Recomendamos que duplique o seu site previamente, caso pretenda manter as suas alterações."
48
49
  }
49
50
  }
@@ -1,5 +1,6 @@
1
1
  import { defineComponent, computed } from 'vue';
2
2
  import { useBrandPageContainerStore } from '../../brand-page-maker/stores';
3
+ import { confirmModalTr } from '../../composables/useTranslate';
3
4
 
4
5
  export default defineComponent({
5
6
  props: {
@@ -17,6 +18,7 @@ export default defineComponent({
17
18
  const containerStore = useBrandPageContainerStore();
18
19
 
19
20
  return {
21
+ confirmModalTr,
20
22
  isDesignCom: computed(() => containerStore.isDesignCom),
21
23
  };
22
24
  },