@designcrowd/library.brand-page 5.16.11 → 5.16.12-ast-bug-fix

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 (95) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-bzhKDyJv.js → CreatedOnBrandCrowd-de-de-C6dhWzv2.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-j4ZI_pqK.js → CreatedOnBrandCrowd-en-us-DxYr4y0O.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es--kt8fo5B.js → CreatedOnBrandCrowd-es-es-CM43uX9E.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-CiCdKxFb.js → CreatedOnBrandCrowd-fr-ca-a-uDXFqw.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-CiCdKxFb.js → CreatedOnBrandCrowd-fr-fr-a-uDXFqw.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-CgEfKC9V.js → CreatedOnBrandCrowd-pt-br-D1tjQ-oU.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-CgEfKC9V.js → CreatedOnBrandCrowd-pt-pt-D1tjQ-oU.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-CUZ6g2BX.js → CreatedOnDcom-de-de-BloaPUB1.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-Dk3tpBIt.js → CreatedOnDcom-en-us-VSa2rG_S.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-UMt6sl46.js → CreatedOnDcom-es-es-CREP0RRz.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-DB-oAlcL.js → CreatedOnDcom-fr-ca-DAc4utHb.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-DDQ5o8K8.js → CreatedOnDcom-fr-fr-DGDpeWmm.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-Bp6ian7l.js → CreatedOnDcom-pt-br-DYnoh6pR.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-DNRtLje1.js → CreatedOnDcom-pt-pt-COmcB4ZZ.js} +1 -1
  15. package/lib/src/brand-page/clients/brand-page.client.d.ts +2 -0
  16. package/lib/src/brand-page/clients/brand-page.client.js +1 -1
  17. package/lib/src/brand-page/components/contact-form/ContactForm.mixin.js +6 -1
  18. package/lib/src/brand-page/components/image-gallery/masonry/MasonryGallery.mixin.js +8 -5
  19. package/lib/src/brand-page/models/index.d.ts +3 -0
  20. package/lib/src/brand-page/models/index.js +3 -0
  21. package/lib/src/brand-page/utils/migration/migration-09.d.ts +2 -0
  22. package/lib/src/brand-page/utils/migration/migration-09.js +34 -0
  23. package/lib/src/brand-page/utils/migration.util.js +6 -0
  24. package/lib/src/brand-page/utils/validation.util.js +15 -10
  25. package/lib/src/brand-page-maker/constants/config-settings-constant.js +39 -18
  26. package/lib/src/brand-page-maker/models/content-settings.js +21 -0
  27. package/lib/src/{bundled-translations-0k_bW9M3.js → bundled-translations-B0_1x7FR.js} +18 -18
  28. package/lib/src/{bundled-translations.de-DE-alPJDdV5.js → bundled-translations.de-DE-DI_6-gFc.js} +21 -21
  29. package/lib/src/bundled-translations.es-ES-pnVLlL9X.js +163 -0
  30. package/lib/src/bundled-translations.fr-CA-Bu6ZL2ix.js +163 -0
  31. package/lib/src/bundled-translations.fr-FR-DTEQ7K4e.js +163 -0
  32. package/lib/src/bundled-translations.pt-BR-Cr5hOHkN.js +163 -0
  33. package/lib/src/bundled-translations.pt-PT-75HRywbu.js +163 -0
  34. package/lib/src/bundles/bundled-translations.de-DE.json +20 -2
  35. package/lib/src/bundles/bundled-translations.es-ES.json +20 -2
  36. package/lib/src/bundles/bundled-translations.fr-CA.json +20 -2
  37. package/lib/src/bundles/bundled-translations.fr-FR.json +20 -2
  38. package/lib/src/bundles/bundled-translations.json +20 -2
  39. package/lib/src/bundles/bundled-translations.pt-BR.json +20 -2
  40. package/lib/src/bundles/bundled-translations.pt-PT.json +20 -2
  41. package/lib/src/css/library.brand-page-brandCrowd.min.css +3 -6
  42. package/lib/src/css/library.brand-page-brandPage.min.css +3 -6
  43. package/lib/src/css/library.brand-page-designCom.min.css +3 -6
  44. package/lib/src/css/library.brand-page-preview.min.css +3 -6
  45. package/lib/src/index.mjs +1 -1
  46. package/lib/src/{lib-cP7DqVjt.js → lib-6Qbl13IW.js} +16530 -16337
  47. package/lib/src/shared/content-settings/components/form-fields-field/FormFieldsField.mixin.d.ts +34 -1
  48. package/lib/src/shared/content-settings/components/form-fields-field/FormFieldsField.mixin.js +41 -1
  49. package/package.json +1 -1
  50. package/src/brand-page/clients/brand-page.client.ts +3 -1
  51. package/src/brand-page/components/contact-form/ContactForm.mixin.ts +6 -1
  52. package/src/brand-page/components/image-gallery/masonry/MasonryGallery.mixin.ts +8 -5
  53. package/src/brand-page/components/shop/ProductDetailModal.vue +1 -1
  54. package/src/brand-page/models/index.ts +3 -0
  55. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +3 -3
  56. package/src/brand-page/utils/migration/migration-09.ts +43 -0
  57. package/src/brand-page/utils/migration.util.ts +6 -0
  58. package/src/brand-page/utils/validation.util.ts +15 -10
  59. package/src/brand-page-maker/constants/config-settings-constant.ts +40 -18
  60. package/src/brand-page-maker/models/content-settings.ts +21 -0
  61. package/src/bundles/bundled-translations.de-DE.json +20 -2
  62. package/src/bundles/bundled-translations.es-ES.json +20 -2
  63. package/src/bundles/bundled-translations.fr-CA.json +20 -2
  64. package/src/bundles/bundled-translations.fr-FR.json +20 -2
  65. package/src/bundles/bundled-translations.json +20 -2
  66. package/src/bundles/bundled-translations.pt-BR.json +20 -2
  67. package/src/bundles/bundled-translations.pt-PT.json +20 -2
  68. package/src/shared/common/i18n/error.de-DE.json +9 -1
  69. package/src/shared/common/i18n/error.es-ES.json +9 -1
  70. package/src/shared/common/i18n/error.fr-CA.json +9 -1
  71. package/src/shared/common/i18n/error.fr-FR.json +9 -1
  72. package/src/shared/common/i18n/error.json +9 -1
  73. package/src/shared/common/i18n/error.pt-BR.json +9 -1
  74. package/src/shared/common/i18n/error.pt-PT.json +9 -1
  75. package/src/shared/content-settings/components/content-settings/i18n/content-settings.de-DE.json +2 -0
  76. package/src/shared/content-settings/components/content-settings/i18n/content-settings.es-ES.json +2 -0
  77. package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-CA.json +2 -0
  78. package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-FR.json +2 -0
  79. package/src/shared/content-settings/components/content-settings/i18n/content-settings.json +2 -0
  80. package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-BR.json +2 -0
  81. package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-PT.json +2 -0
  82. package/src/shared/content-settings/components/form-fields-field/FormFieldsField.mixin.ts +45 -1
  83. package/src/shared/content-settings/components/form-fields-field/FormFieldsField.vue +107 -32
  84. package/src/shared/content-settings/components/form-fields-field/i18n/form-fields.de-DE.json +10 -1
  85. package/src/shared/content-settings/components/form-fields-field/i18n/form-fields.es-ES.json +10 -1
  86. package/src/shared/content-settings/components/form-fields-field/i18n/form-fields.fr-CA.json +10 -1
  87. package/src/shared/content-settings/components/form-fields-field/i18n/form-fields.fr-FR.json +10 -1
  88. package/src/shared/content-settings/components/form-fields-field/i18n/form-fields.json +10 -1
  89. package/src/shared/content-settings/components/form-fields-field/i18n/form-fields.pt-BR.json +10 -1
  90. package/src/shared/content-settings/components/form-fields-field/i18n/form-fields.pt-PT.json +10 -1
  91. package/lib/src/bundled-translations.es-ES-DvG6dxbl.js +0 -163
  92. package/lib/src/bundled-translations.fr-CA-uKGhZH2y.js +0 -163
  93. package/lib/src/bundled-translations.fr-FR-DsR3NACS.js +0 -163
  94. package/lib/src/bundled-translations.pt-BR-Bh9w3i0j.js +0 -163
  95. package/lib/src/bundled-translations.pt-PT-BzegT--8.js +0 -163
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-cP7DqVjt.js";
2
+ import { _ as t } from "./lib-6Qbl13IW.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-cP7DqVjt.js";
2
+ import { _ as t } from "./lib-6Qbl13IW.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-cP7DqVjt.js";
2
+ import { _ as t } from "./lib-6Qbl13IW.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-cP7DqVjt.js";
2
+ import { _ as t } from "./lib-6Qbl13IW.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-cP7DqVjt.js";
2
+ import { _ as t } from "./lib-6Qbl13IW.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-cP7DqVjt.js";
2
+ import { _ as t } from "./lib-6Qbl13IW.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-cP7DqVjt.js";
2
+ import { _ as t } from "./lib-6Qbl13IW.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-cP7DqVjt.js";
2
+ import { _ as e } from "./lib-6Qbl13IW.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-cP7DqVjt.js";
2
+ import { _ as e } from "./lib-6Qbl13IW.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-cP7DqVjt.js";
2
+ import { _ as e } from "./lib-6Qbl13IW.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-cP7DqVjt.js";
2
+ import { _ as e } from "./lib-6Qbl13IW.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-cP7DqVjt.js";
2
+ import { _ as e } from "./lib-6Qbl13IW.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-cP7DqVjt.js";
2
+ import { _ as M } from "./lib-6Qbl13IW.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-cP7DqVjt.js";
2
+ import { _ as M } from "./lib-6Qbl13IW.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -5,6 +5,8 @@ export interface FormResult {
5
5
  }
6
6
  export interface ContactFormField {
7
7
  id: string;
8
+ name: string;
9
+ type: string;
8
10
  value: string;
9
11
  }
10
12
  export interface CartForShopRequest {
@@ -33,7 +33,7 @@ const submitContactForm = async (brandPageToken, contentBlockId, values) => {
33
33
  const csrfToken = csrfUtil.getCsrfTokenFromMetaHeader();
34
34
  const formBody = {
35
35
  contentBlockId,
36
- ...values.reduce((b, i) => ({ ...b, [i.id]: i.value }), {}),
36
+ fields: values,
37
37
  };
38
38
  await axios.post(`/api/contact/${brandPageToken}`, formBody, {
39
39
  headers: {
@@ -146,7 +146,12 @@ export default defineComponent({
146
146
  let result;
147
147
  this.isSubmitting = true;
148
148
  try {
149
- result = await brandPageClient.submitContactForm(this.context.brandPageToken, this.viewModel.id, this.values.map((v) => ({ id: v.field.id, value: v.value })));
149
+ result = await brandPageClient.submitContactForm(this.context.brandPageToken, this.viewModel.id, this.values.map((v) => ({
150
+ id: v.field.id,
151
+ name: v.field.name,
152
+ type: v.field.type,
153
+ value: v.value,
154
+ })));
150
155
  }
151
156
  finally {
152
157
  this.isSubmitting = false;
@@ -71,7 +71,10 @@ export default defineComponent({
71
71
  this.resizeObserver = new ResizeObserver(this.resizeDebounceHandler);
72
72
  this.resizeObserver.observe($masonry.$el);
73
73
  }
74
- this.onResize();
74
+ // Initial resize calculation
75
+ this.$nextTick(() => {
76
+ this.onResize();
77
+ });
75
78
  },
76
79
  beforeUnmount() {
77
80
  this.resizeObserver?.disconnect();
@@ -103,10 +106,10 @@ export default defineComponent({
103
106
  const column = containerWidth < CONTAINER_WIDTH_MIN_THRESHOLD
104
107
  ? MIN_COLUMNS
105
108
  : MAX_COLUMNS;
106
- this.columnWidth = containerWidth / column - this.gap;
107
- // Force vue masonry wall to resize when container width changed but document width unchanged
108
- if ($masonry.$el.$children && $masonry.$el.$children[0]) {
109
- $masonry.$el.$children[0].$resize();
109
+ const newColumnWidth = containerWidth / column - this.gap;
110
+ // Only update if the value actually changed to trigger reactivity
111
+ if (this.columnWidth !== newColumnWidth) {
112
+ this.columnWidth = newColumnWidth;
110
113
  }
111
114
  },
112
115
  onImageError(index) {
@@ -200,6 +200,9 @@ export declare const FORM_FIELD_IDS: {
200
200
  readonly emailAddress: "emailAddress";
201
201
  readonly phoneNumber: "phoneNumber";
202
202
  readonly message: "message";
203
+ readonly customField1: "customField1";
204
+ readonly customField2: "customField2";
205
+ readonly customField3: "customField3";
203
206
  };
204
207
  export declare const BUTTON_LINK_TYPE: {
205
208
  readonly url: "url";
@@ -131,6 +131,9 @@ export const FORM_FIELD_IDS = {
131
131
  emailAddress: 'emailAddress',
132
132
  phoneNumber: 'phoneNumber',
133
133
  message: 'message',
134
+ customField1: 'customField1',
135
+ customField2: 'customField2',
136
+ customField3: 'customField3',
134
137
  };
135
138
  export const BUTTON_LINK_TYPE = {
136
139
  url: 'url',
@@ -0,0 +1,2 @@
1
+ import type { MigrationData } from '../migration.util';
2
+ export declare const migration09: (migrationResult: MigrationData) => Promise<MigrationData>;
@@ -0,0 +1,34 @@
1
+ import { FORM_FIELD_IDS } from '../..';
2
+ import { isContact } from '../model.util';
3
+ export const migration09 = async (migrationResult) => {
4
+ const { brandPageModel } = migrationResult;
5
+ brandPageModel.pages.forEach((page) => {
6
+ page.contents.forEach((content) => {
7
+ if (isContact(content)) {
8
+ const contactForm = content;
9
+ contactForm.fields.push({
10
+ id: FORM_FIELD_IDS.customField1,
11
+ name: 'Custom Field',
12
+ enabled: false,
13
+ required: false,
14
+ type: 'text',
15
+ });
16
+ contactForm.fields.push({
17
+ id: FORM_FIELD_IDS.customField2,
18
+ name: 'Custom Field',
19
+ enabled: false,
20
+ required: false,
21
+ type: 'text',
22
+ });
23
+ contactForm.fields.push({
24
+ id: FORM_FIELD_IDS.customField3,
25
+ name: 'Custom Field',
26
+ enabled: false,
27
+ required: false,
28
+ type: 'text',
29
+ });
30
+ }
31
+ });
32
+ });
33
+ return migrationResult;
34
+ };
@@ -11,6 +11,7 @@ import { migration05_1 } from './migration/migration-05_1';
11
11
  import { migration05_2 } from './migration/migration-05_2';
12
12
  import { migration07 } from './migration/migration-07';
13
13
  import { migration08 } from './migration/migration-08';
14
+ import { migration09 } from './migration/migration-09';
14
15
  const MIGRATION_TABLE = [
15
16
  {
16
17
  version: 1,
@@ -68,6 +69,11 @@ const MIGRATION_TABLE = [
68
69
  migrateFn: migration08,
69
70
  description: 'Migrating logo content sizes for brandPage and brandContact',
70
71
  },
72
+ {
73
+ version: 9,
74
+ migrateFn: migration09,
75
+ description: 'Migrating contact form with additional 3 custom fields',
76
+ },
71
77
  ];
72
78
  export const GetLatestModelVersion = () => Math.max(...MIGRATION_TABLE.map((x) => x.version));
73
79
  export const migrateBrandPageModel = async (brandPageModel, options) => {
@@ -1,19 +1,20 @@
1
1
  import { isEmail } from '../../utils/validator.util';
2
+ import { errorTr } from '../../composables/useTranslate';
2
3
  const MAX_EMAIL_LENGTH = 320;
3
4
  const MAX_PHONE_LENGTH = 50;
4
5
  const MAX_NAME_LENGTH = 250;
5
- const MAX_MESSAGE_LENGTH = 600;
6
+ const MAX_MESSAGE_LENGTH = 1000;
6
7
  export const getEmailValidationError = (email, isRequired) => {
7
8
  if (email.trim() === '') {
8
9
  if (isRequired) {
9
- return 'Please enter your email address.';
10
+ return errorTr('contactFormEmailFieldRequired');
10
11
  }
11
12
  }
12
13
  else if (!isEmail(email)) {
13
- return 'The email address you entered is invalid.';
14
+ return errorTr('contactFormEmailFieldInvalid');
14
15
  }
15
16
  else if (email.length >= MAX_EMAIL_LENGTH) {
16
- return 'The email address you entered is too long.';
17
+ return errorTr('contactFormEmailFieldTooLong');
17
18
  }
18
19
  else {
19
20
  return undefined;
@@ -21,25 +22,29 @@ export const getEmailValidationError = (email, isRequired) => {
21
22
  };
22
23
  export const getPhoneValidationError = (phone, isRequired) => {
23
24
  if (phone.trim() === '' && isRequired) {
24
- return 'Please enter your phone number.';
25
+ return errorTr('contactFormPhoneFieldRequired');
25
26
  }
26
27
  else if (phone.length > MAX_PHONE_LENGTH) {
27
- return 'The phone number you entered is too long.';
28
+ return errorTr('contactFormPhoneFieldTooLong');
28
29
  }
29
30
  };
30
31
  export const getNameValidationError = (name, isRequired) => {
31
32
  if (name.trim() === '' && isRequired) {
32
- return 'Please enter your name.';
33
+ return errorTr('contactFormFieldRequired');
33
34
  }
34
35
  else if (name.length > MAX_NAME_LENGTH) {
35
- return 'The name you entered is too long.';
36
+ return errorTr('contactFormFieldTooLong', {
37
+ MAX_LENGTH: MAX_NAME_LENGTH,
38
+ });
36
39
  }
37
40
  };
38
41
  export const getMessageValidationError = (message, isRequired) => {
39
42
  if (message.trim() === '' && isRequired) {
40
- return 'Please enter your message.';
43
+ return errorTr('contactFormFieldRequired');
41
44
  }
42
45
  else if (message.length > MAX_MESSAGE_LENGTH) {
43
- return `The message you entered is too long. The maximum length is ${MAX_MESSAGE_LENGTH}`;
46
+ return errorTr('contactFormFieldTooLong', {
47
+ MAX_LENGTH: MAX_MESSAGE_LENGTH,
48
+ });
44
49
  }
45
50
  };
@@ -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',
406
+ },
407
+ {
408
+ id: FORM_FIELD_IDS.customField2,
409
+ name: contentSettingsTr(`customFieldLabel`),
410
+ enabled: false,
411
+ required: false,
412
+ type: 'text',
413
+ },
414
+ {
415
+ id: FORM_FIELD_IDS.customField3,
416
+ name: contentSettingsTr(`customFieldLabel`),
417
+ enabled: false,
418
+ required: false,
419
+ type: 'text',
420
+ },
400
421
  ],
401
422
  successMessage: contentSettingsTr(`formSuccessMessage`),
402
423
  responseEmail: options?.userState.emailAddress || '',