@designcrowd/library.brand-page 5.16.11 → 5.16.12-ai-text-imp-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.
- package/lib/src/{CreatedOnBrandCrowd-de-de-bzhKDyJv.js → CreatedOnBrandCrowd-de-de-B9dQIMo-.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-j4ZI_pqK.js → CreatedOnBrandCrowd-en-us-BhqCvkGt.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es--kt8fo5B.js → CreatedOnBrandCrowd-es-es-ByHYKT5d.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-CiCdKxFb.js → CreatedOnBrandCrowd-fr-ca-DBHdliZG.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-CiCdKxFb.js → CreatedOnBrandCrowd-fr-fr-DBHdliZG.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-CgEfKC9V.js → CreatedOnBrandCrowd-pt-br-Btf2W227.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-CgEfKC9V.js → CreatedOnBrandCrowd-pt-pt-Btf2W227.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-CUZ6g2BX.js → CreatedOnDcom-de-de-BcwnEyr8.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-Dk3tpBIt.js → CreatedOnDcom-en-us-CfqEknOt.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-UMt6sl46.js → CreatedOnDcom-es-es-D8V43vML.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-DB-oAlcL.js → CreatedOnDcom-fr-ca-Bo5yR5Mi.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-DDQ5o8K8.js → CreatedOnDcom-fr-fr-CBzLCZpy.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-Bp6ian7l.js → CreatedOnDcom-pt-br-BXrOFbo5.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-DNRtLje1.js → CreatedOnDcom-pt-pt-B9VUVFVV.js} +1 -1
- package/lib/src/brand-page/clients/brand-page.client.d.ts +2 -0
- package/lib/src/brand-page/clients/brand-page.client.js +1 -1
- package/lib/src/brand-page/components/contact-form/ContactForm.mixin.js +6 -1
- package/lib/src/brand-page/models/index.d.ts +3 -0
- package/lib/src/brand-page/models/index.js +3 -0
- package/lib/src/brand-page/utils/migration/migration-09.d.ts +2 -0
- package/lib/src/brand-page/utils/migration/migration-09.js +34 -0
- package/lib/src/brand-page/utils/migration.util.js +6 -0
- package/lib/src/brand-page/utils/validation.util.js +15 -10
- package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +2 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +1 -0
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.js +1 -0
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/social-share/SocialShare.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/constants/config-settings-constant.js +39 -18
- package/lib/src/brand-page-maker/models/content-settings.js +21 -0
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.d.ts +3 -1
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +3 -1
- package/lib/src/{bundled-translations-0k_bW9M3.js → bundled-translations-B0_1x7FR.js} +18 -18
- package/lib/src/{bundled-translations.de-DE-alPJDdV5.js → bundled-translations.de-DE-DI_6-gFc.js} +21 -21
- package/lib/src/bundled-translations.es-ES-pnVLlL9X.js +163 -0
- package/lib/src/bundled-translations.fr-CA-Bu6ZL2ix.js +163 -0
- package/lib/src/bundled-translations.fr-FR-DTEQ7K4e.js +163 -0
- package/lib/src/bundled-translations.pt-BR-Cr5hOHkN.js +163 -0
- package/lib/src/bundled-translations.pt-PT-75HRywbu.js +163 -0
- package/lib/src/bundles/bundled-translations.de-DE.json +20 -2
- package/lib/src/bundles/bundled-translations.es-ES.json +20 -2
- package/lib/src/bundles/bundled-translations.fr-CA.json +20 -2
- package/lib/src/bundles/bundled-translations.fr-FR.json +20 -2
- package/lib/src/bundles/bundled-translations.json +20 -2
- package/lib/src/bundles/bundled-translations.pt-BR.json +20 -2
- package/lib/src/bundles/bundled-translations.pt-PT.json +20 -2
- package/lib/src/clients/design-template-client.d.ts +1 -1
- package/lib/src/clients/design-template-client.js +4 -2
- package/lib/src/composables/useSnapshot.js +1 -1
- package/lib/src/css/library.brand-page-brandCrowd.min.css +20 -23
- package/lib/src/css/library.brand-page-brandPage.min.css +20 -23
- package/lib/src/css/library.brand-page-designCom.min.css +20 -23
- package/lib/src/css/library.brand-page-preview.min.css +20 -23
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-cP7DqVjt.js → lib-DZ1AS7tz.js} +19793 -19606
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/form-fields-field/FormFieldsField.mixin.d.ts +34 -1
- package/lib/src/shared/content-settings/components/form-fields-field/FormFieldsField.mixin.js +41 -1
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +1 -1
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +1 -1
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +1 -1
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +1 -1
- package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +1 -1
- package/package.json +1 -1
- package/src/brand-page/clients/brand-page.client.ts +3 -1
- package/src/brand-page/components/contact-form/ContactForm.mixin.ts +6 -1
- package/src/brand-page/models/index.ts +3 -0
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +3 -3
- package/src/brand-page/utils/migration/migration-09.ts +43 -0
- package/src/brand-page/utils/migration.util.ts +6 -0
- package/src/brand-page/utils/validation.util.ts +15 -10
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +2 -0
- package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.ts +1 -0
- package/src/brand-page-maker/constants/config-settings-constant.ts +40 -18
- package/src/brand-page-maker/models/content-settings.ts +21 -0
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +5 -0
- package/src/bundles/bundled-translations.de-DE.json +20 -2
- package/src/bundles/bundled-translations.es-ES.json +20 -2
- package/src/bundles/bundled-translations.fr-CA.json +20 -2
- package/src/bundles/bundled-translations.fr-FR.json +20 -2
- package/src/bundles/bundled-translations.json +20 -2
- package/src/bundles/bundled-translations.pt-BR.json +20 -2
- package/src/bundles/bundled-translations.pt-PT.json +20 -2
- package/src/clients/design-template-client.ts +5 -1
- package/src/composables/useSnapshot.ts +1 -1
- package/src/shared/common/i18n/error.de-DE.json +9 -1
- package/src/shared/common/i18n/error.es-ES.json +9 -1
- package/src/shared/common/i18n/error.fr-CA.json +9 -1
- package/src/shared/common/i18n/error.fr-FR.json +9 -1
- package/src/shared/common/i18n/error.json +9 -1
- package/src/shared/common/i18n/error.pt-BR.json +9 -1
- package/src/shared/common/i18n/error.pt-PT.json +9 -1
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.de-DE.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.es-ES.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-CA.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-FR.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-BR.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-PT.json +2 -0
- package/src/shared/content-settings/components/form-fields-field/FormFieldsField.mixin.ts +45 -1
- package/src/shared/content-settings/components/form-fields-field/FormFieldsField.vue +107 -32
- package/src/shared/content-settings/components/form-fields-field/i18n/form-fields.de-DE.json +10 -1
- package/src/shared/content-settings/components/form-fields-field/i18n/form-fields.es-ES.json +10 -1
- package/src/shared/content-settings/components/form-fields-field/i18n/form-fields.fr-CA.json +10 -1
- package/src/shared/content-settings/components/form-fields-field/i18n/form-fields.fr-FR.json +10 -1
- package/src/shared/content-settings/components/form-fields-field/i18n/form-fields.json +10 -1
- package/src/shared/content-settings/components/form-fields-field/i18n/form-fields.pt-BR.json +10 -1
- package/src/shared/content-settings/components/form-fields-field/i18n/form-fields.pt-PT.json +10 -1
- package/src/shared/content-settings/components/generate-ai-modal/GenerateAiModal.vue +8 -11
- package/lib/src/bundled-translations.es-ES-DvG6dxbl.js +0 -163
- package/lib/src/bundled-translations.fr-CA-uKGhZH2y.js +0 -163
- package/lib/src/bundled-translations.fr-FR-DsR3NACS.js +0 -163
- package/lib/src/bundled-translations.pt-BR-Bh9w3i0j.js +0 -163
- package/lib/src/bundled-translations.pt-PT-BzegT--8.js +0 -163
|
@@ -33,7 +33,7 @@ const submitContactForm = async (brandPageToken, contentBlockId, values) => {
|
|
|
33
33
|
const csrfToken = csrfUtil.getCsrfTokenFromMetaHeader();
|
|
34
34
|
const formBody = {
|
|
35
35
|
contentBlockId,
|
|
36
|
-
|
|
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) => ({
|
|
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;
|
|
@@ -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,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 =
|
|
6
|
+
const MAX_MESSAGE_LENGTH = 1000;
|
|
6
7
|
export const getEmailValidationError = (email, isRequired) => {
|
|
7
8
|
if (email.trim() === '') {
|
|
8
9
|
if (isRequired) {
|
|
9
|
-
return '
|
|
10
|
+
return errorTr('contactFormEmailFieldRequired');
|
|
10
11
|
}
|
|
11
12
|
}
|
|
12
13
|
else if (!isEmail(email)) {
|
|
13
|
-
return '
|
|
14
|
+
return errorTr('contactFormEmailFieldInvalid');
|
|
14
15
|
}
|
|
15
16
|
else if (email.length >= MAX_EMAIL_LENGTH) {
|
|
16
|
-
return '
|
|
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 '
|
|
25
|
+
return errorTr('contactFormPhoneFieldRequired');
|
|
25
26
|
}
|
|
26
27
|
else if (phone.length > MAX_PHONE_LENGTH) {
|
|
27
|
-
return '
|
|
28
|
+
return errorTr('contactFormPhoneFieldTooLong');
|
|
28
29
|
}
|
|
29
30
|
};
|
|
30
31
|
export const getNameValidationError = (name, isRequired) => {
|
|
31
32
|
if (name.trim() === '' && isRequired) {
|
|
32
|
-
return '
|
|
33
|
+
return errorTr('contactFormFieldRequired');
|
|
33
34
|
}
|
|
34
35
|
else if (name.length > MAX_NAME_LENGTH) {
|
|
35
|
-
return '
|
|
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 '
|
|
43
|
+
return errorTr('contactFormFieldRequired');
|
|
41
44
|
}
|
|
42
45
|
else if (message.length > MAX_MESSAGE_LENGTH) {
|
|
43
|
-
return
|
|
46
|
+
return errorTr('contactFormFieldTooLong', {
|
|
47
|
+
MAX_LENGTH: MAX_MESSAGE_LENGTH,
|
|
48
|
+
});
|
|
44
49
|
}
|
|
45
50
|
};
|
|
@@ -115,7 +115,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
115
115
|
setBrandPageType({ brandPageType }: {
|
|
116
116
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
117
117
|
}): void;
|
|
118
|
-
initialise({ brandPage, brandPageType, emailAddress, features, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
118
|
+
initialise({ brandPage, brandPageType, emailAddress, features, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
119
119
|
initialisePages({ pages, sections, }: {
|
|
120
120
|
pages: import("../../../brand-page").PageModel[];
|
|
121
121
|
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
@@ -22,6 +22,7 @@ export interface BrandPageMakerViewModel {
|
|
|
22
22
|
isPersonalisationEnabled?: boolean;
|
|
23
23
|
brandPageType?: BrandPageType;
|
|
24
24
|
businessName?: string;
|
|
25
|
+
industry?: string;
|
|
25
26
|
}
|
|
26
27
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
27
28
|
viewModel: {
|
|
@@ -157,7 +158,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
157
158
|
setBrandPageType({ brandPageType }: {
|
|
158
159
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
159
160
|
}): void;
|
|
160
|
-
initialise({ brandPage, brandPageType, emailAddress, features, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
161
|
+
initialise({ brandPage, brandPageType, emailAddress, features, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
161
162
|
initialisePages({ pages, sections, }: {
|
|
162
163
|
pages: import("../../../brand-page").PageModel[];
|
|
163
164
|
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
@@ -149,6 +149,7 @@ export default defineComponent({
|
|
|
149
149
|
isPersonalisationEnabled: this.viewModel.isPersonalisationEnabled || false,
|
|
150
150
|
brandPageType: this.viewModel.brandPageType,
|
|
151
151
|
businessName: this.viewModel.businessName,
|
|
152
|
+
industry: this.viewModel.industry,
|
|
152
153
|
logoVariationImageUrls: this.viewModel.logoVariationImageUrls,
|
|
153
154
|
shopConfigData,
|
|
154
155
|
});
|
|
@@ -102,7 +102,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
102
102
|
setBrandPageType({ brandPageType }: {
|
|
103
103
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
104
104
|
}): void;
|
|
105
|
-
initialise({ brandPage, brandPageType, emailAddress, features, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
105
|
+
initialise({ brandPage, brandPageType, emailAddress, features, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
106
106
|
initialisePages({ pages, sections, }: {
|
|
107
107
|
pages: import("../../../lib").PageModel[];
|
|
108
108
|
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.js
CHANGED
|
@@ -2039,6 +2039,7 @@ export const INITIALISE_PAYLOAD = Object.freeze({
|
|
|
2039
2039
|
personalisationData: undefined,
|
|
2040
2040
|
isPersonalisationEnabled: false,
|
|
2041
2041
|
businessName: '',
|
|
2042
|
+
industry: '',
|
|
2042
2043
|
logoImage: { ...EMPTY_LOGO_IMAGE_MODEL },
|
|
2043
2044
|
shopConfigData: '',
|
|
2044
2045
|
});
|
package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts
CHANGED
|
@@ -609,7 +609,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
609
609
|
setBrandPageType({ brandPageType }: {
|
|
610
610
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
611
611
|
}): void;
|
|
612
|
-
initialise({ brandPage, brandPageType, emailAddress, features, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
612
|
+
initialise({ brandPage, brandPageType, emailAddress, features, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
613
613
|
initialisePages({ pages, sections, }: {
|
|
614
614
|
pages: import("../../../brand-page").PageModel[];
|
|
615
615
|
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
@@ -109,7 +109,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
109
109
|
setBrandPageType({ brandPageType }: {
|
|
110
110
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
111
111
|
}): void;
|
|
112
|
-
initialise({ brandPage, brandPageType, emailAddress, features, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
112
|
+
initialise({ brandPage, brandPageType, emailAddress, features, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
113
113
|
initialisePages({ pages, sections, }: {
|
|
114
114
|
pages: import("../../../brand-page").PageModel[];
|
|
115
115
|
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
@@ -346,7 +346,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
346
346
|
setBrandPageType({ brandPageType }: {
|
|
347
347
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
348
348
|
}): void;
|
|
349
|
-
initialise({ brandPage, brandPageType, emailAddress, features, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
349
|
+
initialise({ brandPage, brandPageType, emailAddress, features, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
350
350
|
initialisePages({ pages, sections, }: {
|
|
351
351
|
pages: import("../../../brand-page").PageModel[];
|
|
352
352
|
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
@@ -345,7 +345,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
345
345
|
setBrandPageType({ brandPageType }: {
|
|
346
346
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
347
347
|
}): void;
|
|
348
|
-
initialise({ brandPage, brandPageType, emailAddress, features, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
348
|
+
initialise({ brandPage, brandPageType, emailAddress, features, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
349
349
|
initialisePages({ pages, sections, }: {
|
|
350
350
|
pages: import("../../../brand-page").PageModel[];
|
|
351
351
|
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
@@ -119,7 +119,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
119
119
|
setBrandPageType({ brandPageType }: {
|
|
120
120
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
121
121
|
}): void;
|
|
122
|
-
initialise({ brandPage, brandPageType, emailAddress, features, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
122
|
+
initialise({ brandPage, brandPageType, emailAddress, features, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
123
123
|
initialisePages({ pages, sections, }: {
|
|
124
124
|
pages: import("../../../brand-page").PageModel[];
|
|
125
125
|
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
@@ -400,7 +400,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
400
400
|
setBrandPageType({ brandPageType }: {
|
|
401
401
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
402
402
|
}): void;
|
|
403
|
-
initialise({ brandPage, brandPageType, emailAddress, features, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
403
|
+
initialise({ brandPage, brandPageType, emailAddress, features, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
404
404
|
initialisePages({ pages, sections, }: {
|
|
405
405
|
pages: import("../../../brand-page").PageModel[];
|
|
406
406
|
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
@@ -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:
|
|
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:
|
|
1702
|
+
groupId: CONTACT_FORM_GROUPS.settings,
|
|
1682
1703
|
visibilityAssessor: imageUrlVisibilityAssessor,
|
|
1683
1704
|
},
|
|
1684
1705
|
imageUrlOverride: {
|
|
1685
1706
|
type: 'personalisation-override',
|
|
1686
|
-
groupId:
|
|
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:
|
|
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:
|
|
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:
|
|
1730
|
+
groupId: CONTACT_FORM_GROUPS.settings,
|
|
1710
1731
|
maxLength: 200,
|
|
1711
1732
|
},
|
|
1712
1733
|
titleOverride: {
|
|
1713
1734
|
type: 'personalisation-override',
|
|
1714
|
-
groupId:
|
|
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:
|
|
1742
|
+
groupId: CONTACT_FORM_GROUPS.settings,
|
|
1722
1743
|
maxLength: 1000,
|
|
1723
1744
|
},
|
|
1724
1745
|
descriptionOverride: {
|
|
1725
1746
|
type: 'personalisation-override',
|
|
1726
|
-
groupId:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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 || '',
|