@designcrowd/library.brand-page 5.16.3-background-7 → 5.16.3-contact-1

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 (94) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-YFZqI0x7.js → CreatedOnBrandCrowd-de-de-CjTkWjbu.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-oCydCj0r.js → CreatedOnBrandCrowd-en-us-BTWvzrdZ.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-8LWCIMUL.js → CreatedOnBrandCrowd-es-es-9UbwEQL1.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-HZ_V70no.js → CreatedOnBrandCrowd-fr-ca-4rEZ91Cd.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-HZ_V70no.js → CreatedOnBrandCrowd-fr-fr-4rEZ91Cd.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-7jPL-cgd.js → CreatedOnBrandCrowd-pt-br-BotkL5zF.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-7jPL-cgd.js → CreatedOnBrandCrowd-pt-pt-BotkL5zF.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-D-SliPlT.js → CreatedOnDcom-de-de-GZHy0fXf.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-DWB_vdQE.js → CreatedOnDcom-en-us-C4edzsrP.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-DMuIffFr.js → CreatedOnDcom-es-es-BHJ4ztAW.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-DM8vq9tc.js → CreatedOnDcom-fr-ca-hAvFIPy4.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-8yITfFk9.js → CreatedOnDcom-fr-fr-BRGdIwlq.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-BlTWg3Np.js → CreatedOnDcom-pt-br-WRd5Sscx.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-L8gg-C55.js → CreatedOnDcom-pt-pt-CfB_QDWq.js} +1 -1
  15. package/lib/src/brand-page/components/page/Page.mixin.js +15 -19
  16. package/lib/src/brand-page/components/page/Page.stories.js +2 -2
  17. package/lib/src/brand-page/models/index.d.ts +3 -1
  18. package/lib/src/brand-page/models/index.js +3 -2
  19. package/lib/src/brand-page/utils/view-model.util.d.ts +1 -2
  20. package/lib/src/brand-page/utils/view-model.util.js +2 -27
  21. package/lib/src/brand-page/view-models.d.ts +2 -17
  22. package/lib/src/brand-page-maker/components/admin-background-settings/AdminBackgroundSettings.mixin.d.ts +2 -7
  23. package/lib/src/brand-page-maker/components/preview/Preview.stories.js +2 -2
  24. package/lib/src/brand-page-maker/constants/config-settings-constant.js +39 -18
  25. package/lib/src/brand-page-maker/models/content-settings.js +21 -0
  26. package/lib/src/bundled-translations-D9v_x3a1.js +161 -0
  27. package/lib/src/{bundled-translations.de-DE-DW3iDx_G.js → bundled-translations.de-DE-BoSwOfFn.js} +14 -14
  28. package/lib/src/{bundled-translations.es-ES-C9I8wDyq.js → bundled-translations.es-ES-DSAAb1QV.js} +22 -22
  29. package/lib/src/{bundled-translations.fr-CA-C0NN8DsO.js → bundled-translations.fr-CA-D2IlFarH.js} +25 -25
  30. package/lib/src/{bundled-translations.fr-FR-oKV5NyE1.js → bundled-translations.fr-FR-_5zbwKjk.js} +21 -21
  31. package/lib/src/{bundled-translations.pt-BR-CTvCfv1X.js → bundled-translations.pt-BR-DL1ZtRSd.js} +14 -14
  32. package/lib/src/{bundled-translations.pt-PT-CbwxwRY1.js → bundled-translations.pt-PT-CoAEDuid.js} +32 -32
  33. package/lib/src/bundles/bundled-translations.de-DE.json +12 -1
  34. package/lib/src/bundles/bundled-translations.es-ES.json +12 -1
  35. package/lib/src/bundles/bundled-translations.fr-CA.json +12 -1
  36. package/lib/src/bundles/bundled-translations.fr-FR.json +12 -1
  37. package/lib/src/bundles/bundled-translations.json +13 -4
  38. package/lib/src/bundles/bundled-translations.pt-BR.json +12 -1
  39. package/lib/src/bundles/bundled-translations.pt-PT.json +12 -1
  40. package/lib/src/css/library.brand-page-brandCrowd.min.css +15 -21
  41. package/lib/src/css/library.brand-page-brandPage.min.css +15 -21
  42. package/lib/src/css/library.brand-page-designCom.min.css +15 -21
  43. package/lib/src/css/library.brand-page-preview.min.css +15 -21
  44. package/lib/src/index.mjs +1 -1
  45. package/lib/src/{lib-BdYJIcz_.js → lib-Ceyq_7_v.js} +12824 -12751
  46. package/lib/src/shared/background-settings/components/background-shapes/BackgroundShapeSettings.mixin.d.ts +2 -7
  47. package/lib/src/shared/background-settings/store/background-settings-store.d.ts +0 -3
  48. package/lib/src/shared/background-settings/store/background-settings-store.js +2 -43
  49. package/lib/src/shared/content-settings/components/form-fields-field/FormFieldsField.mixin.d.ts +34 -1
  50. package/lib/src/shared/content-settings/components/form-fields-field/FormFieldsField.mixin.js +41 -1
  51. package/lib/src/shared/content-settings/components/image-field/ImageField.mixin.js +1 -3
  52. package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +0 -2
  53. package/package.json +1 -1
  54. package/src/brand-page/components/page/Page.mixin.ts +15 -23
  55. package/src/brand-page/components/page/Page.stories.ts +1 -2
  56. package/src/brand-page/components/page/Page.vue +1 -17
  57. package/src/brand-page/models/index.ts +3 -2
  58. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +0 -3
  59. package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +0 -1
  60. package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +0 -2
  61. package/src/brand-page/utils/view-model.util.ts +2 -42
  62. package/src/brand-page/view-models.ts +1 -23
  63. package/src/brand-page-maker/components/preview/Preview.stories.ts +1 -2
  64. package/src/brand-page-maker/constants/config-settings-constant.ts +40 -18
  65. package/src/brand-page-maker/models/content-settings.ts +21 -0
  66. package/src/bundles/bundled-translations.de-DE.json +12 -1
  67. package/src/bundles/bundled-translations.es-ES.json +12 -1
  68. package/src/bundles/bundled-translations.fr-CA.json +12 -1
  69. package/src/bundles/bundled-translations.fr-FR.json +12 -1
  70. package/src/bundles/bundled-translations.json +13 -4
  71. package/src/bundles/bundled-translations.pt-BR.json +12 -1
  72. package/src/bundles/bundled-translations.pt-PT.json +12 -1
  73. package/src/shared/background-settings/components/BackgroundSettings.vue +8 -25
  74. package/src/shared/background-settings/components/ReplaceImageSettingsForBackgroundSettings.vue +1 -13
  75. package/src/shared/background-settings/components/i18n/background-settings.json +1 -3
  76. package/src/shared/background-settings/store/background-settings-store.ts +2 -60
  77. package/src/shared/content-settings/components/content-settings/i18n/content-settings.de-DE.json +2 -0
  78. package/src/shared/content-settings/components/content-settings/i18n/content-settings.es-ES.json +2 -0
  79. package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-CA.json +2 -0
  80. package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-FR.json +2 -0
  81. package/src/shared/content-settings/components/content-settings/i18n/content-settings.json +2 -0
  82. package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-BR.json +2 -0
  83. package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-PT.json +2 -0
  84. package/src/shared/content-settings/components/form-fields-field/FormFieldsField.mixin.ts +45 -1
  85. package/src/shared/content-settings/components/form-fields-field/FormFieldsField.vue +106 -32
  86. package/src/shared/content-settings/components/form-fields-field/i18n/form-fields.de-DE.json +10 -1
  87. package/src/shared/content-settings/components/form-fields-field/i18n/form-fields.es-ES.json +10 -1
  88. package/src/shared/content-settings/components/form-fields-field/i18n/form-fields.fr-CA.json +10 -1
  89. package/src/shared/content-settings/components/form-fields-field/i18n/form-fields.fr-FR.json +10 -1
  90. package/src/shared/content-settings/components/form-fields-field/i18n/form-fields.json +10 -1
  91. package/src/shared/content-settings/components/form-fields-field/i18n/form-fields.pt-BR.json +10 -1
  92. package/src/shared/content-settings/components/form-fields-field/i18n/form-fields.pt-PT.json +10 -1
  93. package/src/shared/content-settings/components/image-field/ImageField.mixin.ts +1 -4
  94. package/lib/src/bundled-translations-DEk3SiLd.js +0 -161
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BdYJIcz_.js";
2
+ import { _ as t } from "./lib-Ceyq_7_v.js";
3
3
  const i = {}, h = {
4
4
  width: "275",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BdYJIcz_.js";
2
+ import { _ as t } from "./lib-Ceyq_7_v.js";
3
3
  const i = {}, h = {
4
4
  width: "251",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BdYJIcz_.js";
2
+ import { _ as t } from "./lib-Ceyq_7_v.js";
3
3
  const i = {}, h = {
4
4
  width: "250",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BdYJIcz_.js";
2
+ import { _ as t } from "./lib-Ceyq_7_v.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BdYJIcz_.js";
2
+ import { _ as t } from "./lib-Ceyq_7_v.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BdYJIcz_.js";
2
+ import { _ as t } from "./lib-Ceyq_7_v.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BdYJIcz_.js";
2
+ import { _ as t } from "./lib-Ceyq_7_v.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-BdYJIcz_.js";
2
+ import { _ as e } from "./lib-Ceyq_7_v.js";
3
3
  const M = {}, Z = {
4
4
  width: "242",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-BdYJIcz_.js";
2
+ import { _ as e } from "./lib-Ceyq_7_v.js";
3
3
  const i = {}, M = {
4
4
  width: "231",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-BdYJIcz_.js";
2
+ import { _ as e } from "./lib-Ceyq_7_v.js";
3
3
  const M = {}, Z = {
4
4
  width: "230",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-BdYJIcz_.js";
2
+ import { _ as e } from "./lib-Ceyq_7_v.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-BdYJIcz_.js";
2
+ import { _ as e } from "./lib-Ceyq_7_v.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-BdYJIcz_.js";
2
+ import { _ as M } from "./lib-Ceyq_7_v.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-BdYJIcz_.js";
2
+ import { _ as M } from "./lib-Ceyq_7_v.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -79,18 +79,15 @@ export default defineComponent({
79
79
  },
80
80
  backgroundShapes() {
81
81
  const backgroundShapes = [
82
- ...(this.viewModel?.styles?.backgroundStylesViewModel
83
- ?.backgroundShapes || []),
82
+ ...(this.viewModel?.styles?.backgroundStyles?.backgroundShapes || []),
84
83
  ];
85
84
  // TODO: create style viewmodel object to include backgroundImageContent attribute only on viewmodel
86
85
  // p.s backgroundImageUrl can be url or SVG content string
87
- if (this.viewModel.styles?.backgroundStylesViewModel?.backgroundImageUrl) {
86
+ if (this.viewModel.styles?.backgroundStyles?.backgroundImageUrl) {
88
87
  backgroundShapes.splice(0, 0, {
89
- name: this.viewModel.styles.backgroundStylesViewModel
90
- .backgroundImageUrl,
88
+ name: this.viewModel.styles.backgroundStyles.backgroundImageUrl,
91
89
  style: {
92
- ...this.viewModel.styles.backgroundStylesViewModel
93
- .backgroundShapeStyle,
90
+ ...this.viewModel.styles.backgroundStyles.backgroundShapeStyle,
94
91
  width: `100%`,
95
92
  height: `100%`,
96
93
  },
@@ -100,11 +97,10 @@ export default defineComponent({
100
97
  },
101
98
  rootElementStyles() {
102
99
  let styles = {};
103
- if (!this.viewModel?.styles?.backgroundStylesViewModel
104
- ?.backgroundImageUrl &&
105
- this.viewModel?.styles?.backgroundStylesViewModel?.style) {
100
+ if (!this.viewModel?.styles?.backgroundStyles?.backgroundImageUrl &&
101
+ this.viewModel?.styles?.backgroundStyles?.style) {
106
102
  styles = {
107
- ...this.viewModel?.styles?.backgroundStylesViewModel?.style,
103
+ ...this.viewModel?.styles?.backgroundStyles?.style,
108
104
  };
109
105
  }
110
106
  Object.assign(styles, this.viewModel?.styles?.textStyles?.style);
@@ -121,26 +117,26 @@ export default defineComponent({
121
117
  },
122
118
  rootBackgroundStyles() {
123
119
  const styles = {
124
- ...(this.viewModel?.styles?.backgroundStylesViewModel?.style || {}),
120
+ ...(this.viewModel?.styles?.backgroundStyles?.style || {}),
125
121
  };
126
122
  delete styles.backgroundAttachment;
127
- if (this.viewModel.styles?.backgroundStylesViewModel?.backgroundImageUrl &&
128
- (this.viewModel.styles.backgroundStylesViewModel.backgroundImageUrl.endsWith(`.svg`) ||
129
- !this.viewModel.styles?.backgroundStylesViewModel?.backgroundImageUrl.startsWith('http'))) {
123
+ if (this.viewModel.styles?.backgroundStyles?.backgroundImageUrl &&
124
+ (this.viewModel.styles.backgroundStyles.backgroundImageUrl.endsWith(`.svg`) ||
125
+ !this.viewModel.styles?.backgroundStyles?.backgroundImageUrl.startsWith('http'))) {
130
126
  // Any backgroundImageUrl that handles svg file, svg markup is handled as BackgroundShape object
131
127
  delete styles.backgroundImage;
132
128
  }
133
- else if (this.viewModel?.styles?.backgroundStylesViewModel?.backgroundImageUrl) {
129
+ else if (this.viewModel?.styles?.backgroundStyles?.backgroundImageUrl) {
134
130
  // if background is a gradient
135
- if (this.viewModel?.styles?.backgroundStylesViewModel?.style?.background?.startsWith('linear-gradient')) {
131
+ if (this.viewModel?.styles?.backgroundStyles?.style?.background?.startsWith('linear-gradient')) {
136
132
  // combine image and gradient into the `background` property
137
- styles.backgroundImage = `url(${this.viewModel?.styles?.backgroundStylesViewModel?.backgroundImageUrl}), ${this.viewModel?.styles?.backgroundStylesViewModel?.style?.background}`;
133
+ styles.backgroundImage = `url(${this.viewModel?.styles?.backgroundStyles?.backgroundImageUrl}), ${this.viewModel?.styles?.backgroundStyles?.style?.background}`;
138
134
  delete styles.background;
139
135
  }
140
136
  else {
141
137
  // background is a solid color
142
138
  styles.backgroundColor = styles.background;
143
- styles.backgroundImage = `url(${this.viewModel?.styles?.backgroundStylesViewModel?.backgroundImageUrl})`;
139
+ styles.backgroundImage = `url(${this.viewModel?.styles?.backgroundStyles?.backgroundImageUrl})`;
144
140
  delete styles.background;
145
141
  }
146
142
  }
@@ -1,6 +1,6 @@
1
1
  import { defineComponent } from 'vue';
2
2
  import Page from './Page.vue';
3
- import { mapToPageFooterViewModel, mapToPageHeaderViewModel, mapToPageStyleViewModel, mapToViewModel, } from '../../utils';
3
+ import { mapToPageFooterViewModel, mapToPageHeaderViewModel, mapToViewModel, } from '../../utils';
4
4
  import { BRAND_PAGE_TYPES, BrandPageModel, SENSITIVE_CONTENT_TYPES, VIEWPORTS, } from '../../models';
5
5
  export default {
6
6
  title: 'Components/BrandPage/Page',
@@ -17,7 +17,7 @@ const pages = brandPageModel.pages.map((p) => ({
17
17
  }));
18
18
  const viewModel = {
19
19
  showBrandCrowdLogo: true,
20
- styles: mapToPageStyleViewModel(brandPageModel.styles, {}),
20
+ styles: brandPageModel.styles,
21
21
  headerViewModelDesktop: mapToPageHeaderViewModel(brandPageModel.pageHeaderDesktop, brandPageModel.styles, pages),
22
22
  headerViewModelMobile: mapToPageHeaderViewModel(brandPageModel.pageHeaderMobile, brandPageModel.styles, pages),
23
23
  footerViewModelDesktop: mapToPageFooterViewModel(brandPageModel.pageFooterDesktop, brandPageModel.styles),
@@ -32,7 +32,6 @@ export declare class BackgroundStyles {
32
32
  backgroundImageUrl: string;
33
33
  backgroundShapes: BackgroundShape[];
34
34
  personalisationRole?: PersonalisationRole;
35
- media?: AbstractMedia;
36
35
  constructor(option?: Partial<BackgroundStyles>);
37
36
  }
38
37
  export declare const GALLERY_TYPES: {
@@ -200,6 +199,9 @@ export declare const FORM_FIELD_IDS: {
200
199
  readonly emailAddress: "emailAddress";
201
200
  readonly phoneNumber: "phoneNumber";
202
201
  readonly message: "message";
202
+ readonly customField1: "customField1";
203
+ readonly customField2: "customField2";
204
+ readonly customField3: "customField3";
203
205
  };
204
206
  export declare const BUTTON_LINK_TYPE: {
205
207
  readonly url: "url";
@@ -47,7 +47,6 @@ export class BackgroundStyles {
47
47
  backgroundImageUrl;
48
48
  backgroundShapes;
49
49
  personalisationRole;
50
- media;
51
50
  constructor(option = {}) {
52
51
  this.backgroundImageUrl = option.backgroundImageUrl || '';
53
52
  this.backgroundShapes = (option.backgroundShapes ||
@@ -60,7 +59,6 @@ export class BackgroundStyles {
60
59
  background: '',
61
60
  };
62
61
  this.personalisationRole = option.personalisationRole;
63
- this.media = option.media || undefined;
64
62
  }
65
63
  }
66
64
  export const GALLERY_TYPES = {
@@ -131,6 +129,9 @@ export const FORM_FIELD_IDS = {
131
129
  emailAddress: 'emailAddress',
132
130
  phoneNumber: 'phoneNumber',
133
131
  message: 'message',
132
+ customField1: 'customField1',
133
+ customField2: 'customField2',
134
+ customField3: 'customField3',
134
135
  };
135
136
  export const BUTTON_LINK_TYPE = {
136
137
  url: 'url',
@@ -1,5 +1,5 @@
1
1
  import type { ImageContent, ProfileContent, TextContent, PageStyles, Content, BrandPageModel, ImageGalleryContent, GalleryStyles, BannerSectionContent, ImagesSectionContent, BrandPageType, PageHeaderDesktop, PageFooterDesktop, PageFooterMobile, PageHeaderMobile, LogoImageModel, LogoTemplateImageModel, BookingSectionContent } from '../models';
2
- import type { ImageViewModel, LogoViewModel, ProfileViewModel, TextViewModel, ContentViewModel, BrandPageViewModel, ImageGalleryViewModel, PageViewModel, BannerSectionViewModel, PageHeaderViewModel, PageFooterViewModel, TextImageSectionViewModel, BookingSectionViewModel, PageStylesViewModel } from '../view-models';
2
+ import type { ImageViewModel, LogoViewModel, ProfileViewModel, TextViewModel, ContentViewModel, BrandPageViewModel, ImageGalleryViewModel, PageViewModel, BannerSectionViewModel, PageHeaderViewModel, PageFooterViewModel, TextImageSectionViewModel, BookingSectionViewModel } from '../view-models';
3
3
  export declare const applyViewModelTextStyles: <T extends ContentViewModel>(content: T, styles: PageStyles) => T;
4
4
  export declare const mapToImageViewModel: (content: ImageContent) => ImageViewModel;
5
5
  export declare const mapToImageGalleryViewModel: (content: ImageGalleryContent, globalStyles: GalleryStyles) => ImageGalleryViewModel;
@@ -8,7 +8,6 @@ export declare const mapToTextViewModel: (content: TextContent, styles: PageStyl
8
8
  export declare const mapToBannerSectionViewModel: (content: BannerSectionContent, styles: PageStyles, options: ViewModelMappingOptions) => BannerSectionViewModel;
9
9
  export declare const mapToImagesSectionViewModel: (content: ImagesSectionContent, styles: PageStyles, brandPageType: BrandPageType) => TextImageSectionViewModel;
10
10
  export declare const mapToBookingSectionViewModel: (content: BookingSectionContent, styles: PageStyles) => BookingSectionViewModel;
11
- export declare const mapToPageStyleViewModel: (pageStyles: PageStyles, options: ViewModelMappingOptions) => PageStylesViewModel;
12
11
  export declare const mapToPageHeaderViewModel: (pageHeader: PageHeaderDesktop | PageHeaderMobile, pageStyles: PageStyles, pages: PageViewModel[], useOldLogoRenderSize?: boolean) => PageHeaderViewModel;
13
12
  export declare const mapToPageFooterViewModel: (pageFooter: PageFooterDesktop | PageFooterMobile, pageStyles: PageStyles, useOldLogoRenderSize?: boolean) => PageFooterViewModel;
14
13
  export declare const mapToViewModel: (styles: PageStyles, brandPageType: BrandPageType, options: ViewModelMappingOptions) => (content: Content) => ContentViewModel | undefined;
@@ -604,15 +604,6 @@ export const mapToBookingSectionViewModel = (content, styles) => {
604
604
  isFullWidth: true,
605
605
  }, styles);
606
606
  };
607
- export const mapToPageStyleViewModel = (pageStyles, options) => {
608
- return {
609
- backgroundStylesViewModel: mapBackgroundStylesToViewModel(pageStyles.backgroundStyles, options),
610
- buttonStyles: pageStyles.buttonStyles,
611
- logoStyles: pageStyles.logoStyles,
612
- textStyles: pageStyles.textStyles,
613
- galleryStyles: pageStyles.galleryStyles,
614
- };
615
- };
616
607
  export const mapToPageHeaderViewModel = (pageHeader, pageStyles, pages, useOldLogoRenderSize = false) => {
617
608
  const viewport = pageHeader.viewport;
618
609
  const logoContent = {
@@ -758,22 +749,6 @@ export const mapToViewModel = (styles, brandPageType, options) => (content) => {
758
749
  assertUnreachable();
759
750
  }
760
751
  };
761
- const mapBackgroundStylesToViewModel = (backgroundStyles, options) => {
762
- // TODO(jyao): These need to be mapped to a view model eventually
763
- return {
764
- style: backgroundStyles.style,
765
- backgroundShapeStyle: backgroundStyles.backgroundShapeStyle,
766
- backgroundImageUrl: backgroundStyles.backgroundImageUrl,
767
- backgroundShapes: backgroundStyles.backgroundShapes,
768
- personalisationRole: backgroundStyles.personalisationRole,
769
- mediaViewModel: backgroundStyles.media
770
- ? mapMediaToContentViewModel({
771
- media: backgroundStyles.media,
772
- options,
773
- })
774
- : undefined,
775
- };
776
- };
777
752
  export const getBrandPageViewModelFromBrandPageModel = (model, brandPageToken, showBrandCrowdLogo = true, options) => {
778
753
  const pages = model.pages.map((p) => {
779
754
  const contents = p.contents
@@ -790,7 +765,7 @@ export const getBrandPageViewModelFromBrandPageModel = (model, brandPageToken, s
790
765
  brandPageToken,
791
766
  pages,
792
767
  showBrandCrowdLogo,
793
- styles: mapToPageStyleViewModel(model.styles, options),
768
+ styles: model.styles,
794
769
  headerViewModelDesktop: mapToPageHeaderViewModel(model.pageHeaderDesktop, model.styles, pages, options.useOldLogoRenderSize),
795
770
  headerViewModelMobile: mapToPageHeaderViewModel(model.pageHeaderMobile, model.styles, pages, options.useOldLogoRenderSize),
796
771
  footerViewModelDesktop: mapToPageFooterViewModel(model.pageFooterDesktop, model.styles, options.useOldLogoRenderSize),
@@ -875,7 +850,7 @@ export const getCriticalResourceURLs = (viewModel) => {
875
850
  }
876
851
  }
877
852
  // shapes
878
- const bgShapeFullBg = viewModel.styles?.backgroundStylesViewModel.backgroundImageUrl;
853
+ const bgShapeFullBg = viewModel.styles?.backgroundStyles.backgroundImageUrl;
879
854
  if (typeof bgShapeFullBg !== 'undefined' && isValidSvgUrl(bgShapeFullBg)) {
880
855
  shapes.push(String(bgShapeFullBg));
881
856
  }
@@ -1,4 +1,4 @@
1
- import type { ButtonWithModalContent, ProfileContent, TextContent, VideoContent, ImageContent, ContentType, ButtonStyles, LogoStyles, MapContent, ImageGalleryContent, GalleryStyles, MailingListContent, RequestPaymentContent, ShopContent, SupportMeContent, ContactFormContent, BannerSectionContent, BrandPageType, SocialLinksContent, TestimonialSectionContent, AboutSectionContent, DividerSectionContent, ShapesSectionContent, ButtonLinkType, PageHeaderMobile, PageHeaderDesktop, PageFooterMobile, PageFooterDesktop, TextMediaItem, TextShapeItem, TextStyleDeclaration, AspectRatio, LogoImageModel, LogoTemplateImageModel, CookieOptions, BookingSectionContent, MediaTypes, TextStyles, BackgroundStyle, BackgroundShape, PersonalisationRole } from './models';
1
+ import type { PageStyles, ButtonWithModalContent, ProfileContent, TextContent, VideoContent, ImageContent, ContentType, ButtonStyles, LogoStyles, MapContent, ImageGalleryContent, GalleryStyles, MailingListContent, RequestPaymentContent, ShopContent, SupportMeContent, ContactFormContent, BannerSectionContent, BrandPageType, SocialLinksContent, TestimonialSectionContent, AboutSectionContent, DividerSectionContent, ShapesSectionContent, ButtonLinkType, PageHeaderMobile, PageHeaderDesktop, PageFooterMobile, PageFooterDesktop, TextMediaItem, TextShapeItem, TextStyleDeclaration, AspectRatio, LogoImageModel, LogoTemplateImageModel, CookieOptions, BookingSectionContent, MediaTypes } from './models';
2
2
  import type { ImagesSectionContentDisplayStyle } from './constants';
3
3
  export type ViewModelType = 'button' | 'image' | 'image-gallery' | 'logo' | 'map' | 'mailing-list' | 'profile' | 'support-me' | 'request-payment' | 'text' | 'video' | 'contact-form' | 'banner-section' | 'images-section' | 'about-section' | 'divider-section' | 'testimonial-section' | 'social-links' | 'shapes-section' | 'shop-section' | 'booking-section';
4
4
  export interface ContentViewModel {
@@ -134,25 +134,10 @@ export interface PageHeaderViewModel extends Omit<PageHeaderDesktop | PageHeader
134
134
  export interface PageFooterViewModel extends Omit<PageFooterDesktop | PageFooterMobile, 'logoImage' | 'logoImageStyle' | 'isLogoOptional' | 'viewport' | 'isLogoVisible' | 'logoTemplateImage' | 'logoImageHeight' | 'logoImageWidth'> {
135
135
  logo: LogoViewModel;
136
136
  }
137
- export interface BackgroundStylesViewModel {
138
- style: BackgroundStyle;
139
- backgroundShapeStyle: BackgroundStyle;
140
- backgroundImageUrl: string;
141
- backgroundShapes: BackgroundShape[];
142
- personalisationRole?: PersonalisationRole;
143
- mediaViewModel?: MediaViewModel;
144
- }
145
- export interface PageStylesViewModel {
146
- backgroundStylesViewModel: BackgroundStylesViewModel;
147
- buttonStyles: ButtonStyles;
148
- logoStyles: LogoStyles;
149
- textStyles: TextStyles;
150
- galleryStyles: GalleryStyles;
151
- }
152
137
  export interface BrandPageViewModel {
153
138
  brandPageToken?: string;
154
139
  showBrandCrowdLogo: boolean;
155
- styles: PageStylesViewModel;
140
+ styles: PageStyles;
156
141
  pages: PageViewModel[];
157
142
  brandPageType: BrandPageType;
158
143
  headerViewModelDesktop: PageHeaderViewModel;
@@ -48,6 +48,7 @@ declare const _default: import("vue").DefineComponent<{}, {
48
48
  aspectRatio?: string | undefined;
49
49
  width?: string | undefined;
50
50
  height?: string | undefined;
51
+ textAlign?: string | undefined;
51
52
  backgroundAttachment?: string | undefined;
52
53
  background?: string | undefined;
53
54
  backgroundImage?: string | undefined;
@@ -79,7 +80,6 @@ declare const _default: import("vue").DefineComponent<{}, {
79
80
  overflowWrap?: string | undefined;
80
81
  paddingTop?: string | undefined;
81
82
  position?: string | undefined;
82
- textAlign?: string | undefined;
83
83
  textDecoration?: string | undefined;
84
84
  top?: string | undefined;
85
85
  transform?: string | undefined;
@@ -92,6 +92,7 @@ declare const _default: import("vue").DefineComponent<{}, {
92
92
  aspectRatio?: string | undefined;
93
93
  width?: string | undefined;
94
94
  height?: string | undefined;
95
+ textAlign?: string | undefined;
95
96
  backgroundAttachment?: string | undefined;
96
97
  background?: string | undefined;
97
98
  backgroundImage?: string | undefined;
@@ -123,7 +124,6 @@ declare const _default: import("vue").DefineComponent<{}, {
123
124
  overflowWrap?: string | undefined;
124
125
  paddingTop?: string | undefined;
125
126
  position?: string | undefined;
126
- textAlign?: string | undefined;
127
127
  textDecoration?: string | undefined;
128
128
  top?: string | undefined;
129
129
  transform?: string | undefined;
@@ -181,9 +181,6 @@ declare const _default: import("vue").DefineComponent<{}, {
181
181
  };
182
182
  }[];
183
183
  personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
184
- media?: {
185
- type: import("../../../brand-page").MediaTypes;
186
- } | undefined;
187
184
  }>;
188
185
  uiStore: import("pinia").Store<"ui", import("../../../lib").UIRootState, {
189
186
  endpoints: () => import("../../../lib").Endpoints;
@@ -258,8 +255,6 @@ declare const _default: import("vue").DefineComponent<{}, {
258
255
  setBackgroundMode(payload: {
259
256
  backgroundMode: "images" | "edit";
260
257
  }): void;
261
- setBackgroundMedia(payload: import("src/shared/my-uploads/models").MediaBaseSelectedPayload): void;
262
- removeBackgroundVideo(): void;
263
258
  }>;
264
259
  }, {
265
260
  isColorMatch: {};
@@ -3,7 +3,7 @@ import Preview from './Preview.vue';
3
3
  import { brandPageData } from '../../../brand-page/__fixtures__/brand-page-sample-data';
4
4
  import { PageStyles, BRAND_PAGE_TYPES, PageHeaderDesktop, PageHeaderMobile, PageFooterDesktop, PageFooterMobile, SENSITIVE_CONTENT_TYPES, } from '../../../brand-page';
5
5
  import { setupStoryPinia } from '../brand-page-maker/__fixtures__/store-fixture';
6
- import { mapToPageFooterViewModel, mapToPageHeaderViewModel, mapToPageStyleViewModel, mapToViewModel, } from '../../../brand-page/utils';
6
+ import { mapToPageFooterViewModel, mapToPageHeaderViewModel, mapToViewModel, } from '../../../brand-page/utils';
7
7
  export default {
8
8
  title: 'Components/BrandPageMaker/Preview',
9
9
  component: Preview,
@@ -21,7 +21,7 @@ const pages = [
21
21
  ];
22
22
  const viewModel = {
23
23
  showBrandCrowdLogo: true,
24
- styles: mapToPageStyleViewModel(pageStyles, {}),
24
+ styles: pageStyles,
25
25
  headerViewModelDesktop: mapToPageHeaderViewModel(new PageHeaderDesktop(), pageStyles, pages),
26
26
  headerViewModelMobile: mapToPageHeaderViewModel(new PageHeaderMobile(), pageStyles, pages),
27
27
  footerViewModelDesktop: mapToPageFooterViewModel(new PageFooterDesktop(), pageStyles),
@@ -1665,6 +1665,11 @@ export const SUPPORT_ME_CONTENT_SETTINGS_CONFIG = () => ({
1665
1665
  isLocked: false,
1666
1666
  type: 'support-me',
1667
1667
  });
1668
+ const CONTACT_FORM_GROUPS = {
1669
+ formFields: 'formFields',
1670
+ settings: 'settings',
1671
+ style: 'style',
1672
+ };
1668
1673
  export const CONTACT_FORM_SETTINGS_CONFIG = () => ({
1669
1674
  type: 'contact-form',
1670
1675
  category: 'general',
@@ -1672,25 +1677,41 @@ export const CONTACT_FORM_SETTINGS_CONFIG = () => ({
1672
1677
  defaultIconName: 'form',
1673
1678
  displayMode: CONTENT_SETTINGS_DISPLAY_MODES.focused,
1674
1679
  displayName: contentSettingsTr(`contactFormDisplayName`),
1675
- fieldGroups: SETTINGS_STYLE_FIElD_GROUPS(),
1680
+ fieldGroups: [
1681
+ {
1682
+ id: CONTACT_FORM_GROUPS.settings,
1683
+ displayName: contentSettingsTr(`settingsDisplayName`),
1684
+ isCollapsed: false,
1685
+ },
1686
+ {
1687
+ id: CONTACT_FORM_GROUPS.formFields,
1688
+ displayName: contentSettingsTr(`formFieldsDisplayName`),
1689
+ isCollapsed: false,
1690
+ },
1691
+ {
1692
+ id: CONTACT_FORM_GROUPS.style,
1693
+ displayName: contentSettingsTr(`styleDisplayName`),
1694
+ isCollapsed: true,
1695
+ },
1696
+ ],
1676
1697
  fields: {
1677
1698
  imageUrl: {
1678
1699
  type: 'image',
1679
1700
  replaceImageSettings: contactFormReplaceImageSettings(),
1680
1701
  title: contentSettingsTr(`imageTitle`),
1681
- groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
1702
+ groupId: CONTACT_FORM_GROUPS.settings,
1682
1703
  visibilityAssessor: imageUrlVisibilityAssessor,
1683
1704
  },
1684
1705
  imageUrlOverride: {
1685
1706
  type: 'personalisation-override',
1686
- groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
1707
+ groupId: CONTACT_FORM_GROUPS.settings,
1687
1708
  visibilityAssessor: (c, b) => imageUrlVisibilityAssessor(c, b) &&
1688
1709
  personalisationOverrideVisibility(c, b, 'imageUrl'),
1689
1710
  },
1690
1711
  colorReplacements: {
1691
1712
  type: 'color-replacements',
1692
1713
  title: contentSettingsTr(`shapeColorsTitle`),
1693
- groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
1714
+ groupId: CONTACT_FORM_GROUPS.settings,
1694
1715
  visibilityAssessor: colorReplacementVisibilityTypeAssessor,
1695
1716
  },
1696
1717
  displayStyle: {
@@ -1699,67 +1720,67 @@ export const CONTACT_FORM_SETTINGS_CONFIG = () => ({
1699
1720
  defaultValue: DISPLAY_STYLE_PREVIEW,
1700
1721
  title: contentSettingsTr(`displayStyleTitle`),
1701
1722
  optionsConvertor: displayStyleConvertor,
1702
- groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
1723
+ groupId: CONTACT_FORM_GROUPS.settings,
1703
1724
  visibilityAssessor: displayTypeVisibilityAssessor,
1704
1725
  },
1705
1726
  title: {
1706
1727
  type: 'text',
1707
1728
  placeholder: contentSettingsTr(`titlePlaceholder`),
1708
1729
  title: contentSettingsTr(`titleTitle`),
1709
- groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
1730
+ groupId: CONTACT_FORM_GROUPS.settings,
1710
1731
  maxLength: 200,
1711
1732
  },
1712
1733
  titleOverride: {
1713
1734
  type: 'personalisation-override',
1714
- groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
1735
+ groupId: CONTACT_FORM_GROUPS.settings,
1715
1736
  visibilityAssessor: (c, b) => personalisationOverrideVisibility(c, b, 'title'),
1716
1737
  },
1717
1738
  description: {
1718
1739
  type: 'textarea',
1719
1740
  placeholder: contentSettingsTr(`descriptionPlaceholder`),
1720
1741
  title: contentSettingsTr(`descriptionTitle`),
1721
- groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
1742
+ groupId: CONTACT_FORM_GROUPS.settings,
1722
1743
  maxLength: 1000,
1723
1744
  },
1724
1745
  descriptionOverride: {
1725
1746
  type: 'personalisation-override',
1726
- groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
1747
+ groupId: CONTACT_FORM_GROUPS.settings,
1727
1748
  visibilityAssessor: (c, b) => personalisationOverrideVisibility(c, b, 'description'),
1728
1749
  },
1729
1750
  buttonText: {
1730
1751
  type: 'text',
1731
1752
  title: contentSettingsTr(`buttonTitle`),
1732
- groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
1753
+ groupId: CONTACT_FORM_GROUPS.settings,
1733
1754
  showToggle: false,
1734
1755
  maxLength: 60,
1735
1756
  },
1736
1757
  buttonTextOverride: {
1737
1758
  type: 'personalisation-override',
1738
- groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
1759
+ groupId: CONTACT_FORM_GROUPS.settings,
1739
1760
  visibilityAssessor: (c, b) => personalisationOverrideVisibility(c, b, 'buttonText'),
1740
1761
  },
1741
1762
  fields: {
1742
1763
  type: 'form-fields',
1743
- groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
1764
+ groupId: CONTACT_FORM_GROUPS.formFields,
1744
1765
  },
1745
1766
  successMessage: {
1746
1767
  type: 'textarea',
1747
1768
  placeholder: contentSettingsTr(`successMessagePlaceholder`),
1748
1769
  title: contentSettingsTr(`successMessageTitle`),
1749
- groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
1770
+ groupId: CONTACT_FORM_GROUPS.settings,
1750
1771
  },
1751
1772
  responseEmail: {
1752
1773
  type: 'email',
1753
1774
  title: contentSettingsTr(`sendResponsesToTitle`),
1754
1775
  placeholder: contentSettingsTr(`recipientEmailPlaceholder`),
1755
- groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
1776
+ groupId: CONTACT_FORM_GROUPS.settings,
1756
1777
  },
1757
1778
  layoutStyle: {
1758
1779
  type: 'radio',
1759
1780
  role: 'multi',
1760
1781
  title: contentSettingsTr(`displayStyleTitle`),
1761
1782
  optionsConvertor: contactLayoutStyleConvertor,
1762
- groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.style,
1783
+ groupId: CONTACT_FORM_GROUPS.style,
1763
1784
  variant: 'icon',
1764
1785
  visibilityAssessor: brandSiteTypeVisibilityAssessor,
1765
1786
  },
@@ -1768,7 +1789,7 @@ export const CONTACT_FORM_SETTINGS_CONFIG = () => ({
1768
1789
  buttonTextStyle: DEFAULT_BUTTON_TEXT_STYLE_FIELD(),
1769
1790
  cardStyle: {
1770
1791
  type: 'color',
1771
- groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.style,
1792
+ groupId: CONTACT_FORM_GROUPS.style,
1772
1793
  defaultValue: {},
1773
1794
  isInline: true,
1774
1795
  showToggle: false,
@@ -1779,7 +1800,7 @@ export const CONTACT_FORM_SETTINGS_CONFIG = () => ({
1779
1800
  },
1780
1801
  backgroundStyle: {
1781
1802
  type: 'color',
1782
- groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.style,
1803
+ groupId: CONTACT_FORM_GROUPS.style,
1783
1804
  defaultValue: {},
1784
1805
  isInline: true,
1785
1806
  showToggle: false,
@@ -1788,7 +1809,7 @@ export const CONTACT_FORM_SETTINGS_CONFIG = () => ({
1788
1809
  },
1789
1810
  messageTextColor: {
1790
1811
  type: 'color',
1791
- groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.style,
1812
+ groupId: CONTACT_FORM_GROUPS.style,
1792
1813
  defaultValue: {},
1793
1814
  isInline: true,
1794
1815
  showToggle: false,
@@ -397,6 +397,27 @@ export const createInitialContactFormContent = (options) => {
397
397
  required: true,
398
398
  type: 'text-area',
399
399
  },
400
+ {
401
+ id: FORM_FIELD_IDS.customField1,
402
+ name: contentSettingsTr(`customFieldLabel`),
403
+ enabled: false,
404
+ required: false,
405
+ type: 'text-area',
406
+ },
407
+ {
408
+ id: FORM_FIELD_IDS.customField2,
409
+ name: contentSettingsTr(`customFieldLabel`),
410
+ enabled: false,
411
+ required: false,
412
+ type: 'text-area',
413
+ },
414
+ {
415
+ id: FORM_FIELD_IDS.customField3,
416
+ name: contentSettingsTr(`customFieldLabel`),
417
+ enabled: false,
418
+ required: false,
419
+ type: 'text-area',
420
+ },
400
421
  ],
401
422
  successMessage: contentSettingsTr(`formSuccessMessage`),
402
423
  responseEmail: options?.userState.emailAddress || '',