@designcrowd/library.brand-page 5.16.21-jj-3 → 5.16.21
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-HrHMR6O5.js → CreatedOnBrandCrowd-de-de-DgwCYxpo.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-Dzz0sW2t.js → CreatedOnBrandCrowd-en-us-Ce4dtJzF.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-DAwKWoWd.js → CreatedOnBrandCrowd-es-es-DDdbZpFk.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-Dtg5Gjhl.js → CreatedOnBrandCrowd-fr-ca-PqYlFJIq.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-Dtg5Gjhl.js → CreatedOnBrandCrowd-fr-fr-PqYlFJIq.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-D1cIuDBl.js → CreatedOnBrandCrowd-pt-br-J-uo_wBq.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-D1cIuDBl.js → CreatedOnBrandCrowd-pt-pt-J-uo_wBq.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-CFDw1ywD.js → CreatedOnDcom-de-de-DqXE51XT.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-ChnrK3_N.js → CreatedOnDcom-en-us-BxrSQ6H4.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-D3V-7jbe.js → CreatedOnDcom-es-es-tJ59EfOu.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-B6ZzNIW9.js → CreatedOnDcom-fr-ca-CDtK8MUu.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-C58R5laB.js → CreatedOnDcom-fr-fr-DbotQbN2.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-CVICOJSe.js → CreatedOnDcom-pt-br-ClzylsH_.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-Dk-B6B5h.js → CreatedOnDcom-pt-pt-BF3m2X2_.js} +1 -1
- package/lib/src/brand-page/components/page-header/PageHeader.mixin.js +5 -4
- package/lib/src/brand-page/constants/logo.constants.d.ts +1 -0
- package/lib/src/brand-page/constants/logo.constants.js +2 -0
- package/lib/src/brand-page/models/index.d.ts +1 -0
- package/lib/src/brand-page/models/index.js +5 -0
- package/lib/src/brand-page/utils/logo.util.d.ts +1 -4
- package/lib/src/brand-page/utils/logo.util.js +18 -21
- package/lib/src/brand-page/utils/migration/migration-07.d.ts +4 -2
- package/lib/src/brand-page/utils/migration/migration-07.js +1 -1
- package/lib/src/brand-page/utils/migration/migration-08.d.ts +5 -2
- package/lib/src/brand-page/utils/migration/migration-08.js +5 -2
- package/lib/src/brand-page/utils/migration.util.d.ts +3 -5
- package/lib/src/brand-page/utils/migration.util.js +1 -6
- package/lib/src/brand-page/utils/view-model.util.js +1 -0
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.d.ts +0 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.js +3 -8
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +3 -12
- package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.js +6 -17
- package/lib/src/brand-page-maker/constants/template-constants.d.ts +0 -1
- package/lib/src/brand-page-maker/constants/template-constants.js +0 -1
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +5 -6
- package/lib/src/bundled-translations-Dp4KzW9M.js +165 -0
- package/lib/src/bundled-translations.de-DE-CMNy5LEQ.js +165 -0
- package/lib/src/bundled-translations.es-ES-B20ONBTs.js +165 -0
- package/lib/src/bundled-translations.fr-CA-DwBf1MZ8.js +165 -0
- package/lib/src/bundled-translations.fr-FR-3GhDgrC4.js +165 -0
- package/lib/src/bundled-translations.pt-BR-DuzEDMF5.js +165 -0
- package/lib/src/bundled-translations.pt-PT-CtT4FOlX.js +165 -0
- package/lib/src/bundles/bundled-translations.de-DE.json +1 -9
- package/lib/src/bundles/bundled-translations.es-ES.json +1 -9
- package/lib/src/bundles/bundled-translations.fr-CA.json +1 -9
- package/lib/src/bundles/bundled-translations.fr-FR.json +1 -9
- package/lib/src/bundles/bundled-translations.json +0 -8
- package/lib/src/bundles/bundled-translations.pt-BR.json +1 -9
- package/lib/src/bundles/bundled-translations.pt-PT.json +1 -9
- package/lib/src/composables/useTranslate.d.ts +1 -2
- package/lib/src/composables/useTranslate.js +1 -2
- package/lib/src/css/library.brand-page-brandCrowd.min.css +82 -84
- package/lib/src/css/library.brand-page-brandPage.min.css +82 -84
- package/lib/src/css/library.brand-page-designCom.min.css +82 -84
- package/lib/src/css/library.brand-page-preview.min.css +82 -84
- package/lib/src/index.mjs +105 -106
- package/lib/src/{lib-Dn6AgtmB.js → lib-CAvMr_zk.js} +13710 -13785
- 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/page-dropdown-field/PageDropdownField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +1 -1
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +1 -1
- package/lib/src/shared/page-settings/components/new-page-modal/NewPageModal.mixin.d.ts +1 -1
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +3 -1
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +3 -1
- package/package.json +1 -1
- package/src/brand-page/components/page-header/HeaderLayout.vue +3 -5
- package/src/brand-page/components/page-header/PageHeader.mixin.ts +6 -4
- package/src/brand-page/components/save-contact/i18n/save-contact.de-DE.json +1 -1
- package/src/brand-page/components/save-contact/i18n/save-contact.es-ES.json +1 -1
- package/src/brand-page/components/save-contact/i18n/save-contact.fr-CA.json +1 -1
- package/src/brand-page/components/save-contact/i18n/save-contact.fr-FR.json +1 -1
- package/src/brand-page/components/save-contact/i18n/save-contact.pt-BR.json +1 -1
- package/src/brand-page/components/save-contact/i18n/save-contact.pt-PT.json +1 -1
- package/src/brand-page/constants/logo.constants.ts +3 -0
- package/src/brand-page/models/index.ts +6 -0
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +9 -3
- package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +2 -0
- package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +4 -0
- package/src/brand-page/utils/logo.util.test.ts +37 -0
- package/src/brand-page/utils/logo.util.ts +31 -28
- package/src/brand-page/utils/migration/migration-07.test.ts +8 -32
- package/src/brand-page/utils/migration/migration-07.ts +3 -3
- package/src/brand-page/utils/migration/migration-08.test.ts +10 -38
- package/src/brand-page/utils/migration/migration-08.ts +14 -4
- package/src/brand-page/utils/migration.util.ts +11 -16
- package/src/brand-page/utils/view-model.util.ts +1 -0
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.ts +2 -12
- package/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.ts +6 -20
- package/src/brand-page-maker/components/seo-settings/UrlSettings.vue +8 -9
- package/src/brand-page-maker/constants/template-constants.ts +0 -1
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +6 -7
- package/src/bundles/bundled-translations.de-DE.json +1 -9
- package/src/bundles/bundled-translations.es-ES.json +1 -9
- package/src/bundles/bundled-translations.fr-CA.json +1 -9
- package/src/bundles/bundled-translations.fr-FR.json +1 -9
- package/src/bundles/bundled-translations.json +0 -8
- package/src/bundles/bundled-translations.pt-BR.json +1 -9
- package/src/bundles/bundled-translations.pt-PT.json +1 -9
- package/src/composables/useTranslate.ts +0 -3
- package/lib/src/brand-page/utils/migration/migration-11.d.ts +0 -8
- package/lib/src/brand-page/utils/migration/migration-11.js +0 -36
- package/lib/src/bundled-translations-DAA_muNW.js +0 -167
- package/lib/src/bundled-translations.de-DE-DmZSAEA4.js +0 -167
- package/lib/src/bundled-translations.es-ES-CGUGm_zy.js +0 -167
- package/lib/src/bundled-translations.fr-CA-UkcZ1_qS.js +0 -167
- package/lib/src/bundled-translations.fr-FR-D43nbl6A.js +0 -167
- package/lib/src/bundled-translations.pt-BR-B0o-8NGd.js +0 -167
- package/lib/src/bundled-translations.pt-PT-Cx-eIl9m.js +0 -167
- package/src/brand-page/utils/migration/migration-11.ts +0 -49
- package/src/brand-page-maker/components/seo-settings/DeleteDomainModal.vue +0 -66
- package/src/brand-page-maker/components/seo-settings/i18n/delete-domain-modal.de-DE.json +0 -10
- package/src/brand-page-maker/components/seo-settings/i18n/delete-domain-modal.es-ES.json +0 -10
- package/src/brand-page-maker/components/seo-settings/i18n/delete-domain-modal.fr-CA.json +0 -10
- package/src/brand-page-maker/components/seo-settings/i18n/delete-domain-modal.fr-FR.json +0 -10
- package/src/brand-page-maker/components/seo-settings/i18n/delete-domain-modal.json +0 -10
- package/src/brand-page-maker/components/seo-settings/i18n/delete-domain-modal.pt-BR.json +0 -10
- package/src/brand-page-maker/components/seo-settings/i18n/delete-domain-modal.pt-PT.json +0 -10
|
@@ -27,11 +27,12 @@ export default defineComponent({
|
|
|
27
27
|
},
|
|
28
28
|
computed: {
|
|
29
29
|
containerCss() {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
const backgroundStyle = this.viewModel.backgroundColorEnabled
|
|
31
|
+
? this.viewModel.backgroundStyle
|
|
32
|
+
: null;
|
|
33
|
+
return Object.assign({}, backgroundStyle, this.viewModel.style, {
|
|
33
34
|
padding: '1.5rem 0', // var(--page-padding) 0
|
|
34
|
-
};
|
|
35
|
+
});
|
|
35
36
|
},
|
|
36
37
|
showNav() {
|
|
37
38
|
return this.viewModel.pages.length > 1;
|
|
@@ -461,6 +461,7 @@ export declare abstract class AbstractPageHeaderStyles {
|
|
|
461
461
|
backgroundStyle: BrandPageCssStyle;
|
|
462
462
|
style: BrandPageCssStyle;
|
|
463
463
|
viewport: ViewportsType;
|
|
464
|
+
backgroundColorEnabled?: boolean;
|
|
464
465
|
protected constructor(options?: AbstractPageHeaderStylesType);
|
|
465
466
|
}
|
|
466
467
|
export declare class PageHeaderDesktop extends AbstractPageHeaderStyles {
|
|
@@ -199,6 +199,7 @@ export class AbstractPageHeaderStyles {
|
|
|
199
199
|
backgroundStyle;
|
|
200
200
|
style;
|
|
201
201
|
viewport;
|
|
202
|
+
backgroundColorEnabled;
|
|
202
203
|
constructor(options = {}) {
|
|
203
204
|
if (typeof options.viewport === 'undefined') {
|
|
204
205
|
throw new Error('"viewport" is required');
|
|
@@ -226,6 +227,10 @@ export class AbstractPageHeaderStyles {
|
|
|
226
227
|
this.logoVariation = options.logoVariation || 0;
|
|
227
228
|
this.style = options.style || {};
|
|
228
229
|
this.backgroundStyle = options.backgroundStyle || {};
|
|
230
|
+
this.backgroundColorEnabled =
|
|
231
|
+
typeof options.backgroundColorEnabled === 'undefined'
|
|
232
|
+
? true
|
|
233
|
+
: options.backgroundColorEnabled;
|
|
229
234
|
}
|
|
230
235
|
}
|
|
231
236
|
export class PageHeaderDesktop extends AbstractPageHeaderStyles {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { BrandPageType } from '../models';
|
|
2
1
|
import { type BrandPageModel, type LogoImageModel, type LogoTemplateImageModel, type LogoVariation } from '../models';
|
|
3
2
|
import { type LogoOutputFormat } from '../../clients/fabric-render-client';
|
|
4
3
|
export declare const getLogoDraftTokenFromLogoImageUrl: (variationUrl?: string) => string;
|
|
@@ -13,9 +12,7 @@ export declare const applyLogoImageBase64UrlToBrandPageTemplateModel: (model: Br
|
|
|
13
12
|
export declare const applyLogoTemplateImageToBrandPageTemplateModel: (model: BrandPageModel, logoTemplateImage: LogoTemplateImageModel) => BrandPageModel;
|
|
14
13
|
export declare const getLogoVariationUrlByLogoImage: (logoImage: LogoImageModel) => string | undefined;
|
|
15
14
|
export declare const getLogoTemplateUrlByLogoTemplateImage: (logoTemplateImage: LogoTemplateImageModel) => string;
|
|
16
|
-
export declare const getOptimalLogoSize: (
|
|
17
|
-
newLogoSize: string;
|
|
18
|
-
};
|
|
15
|
+
export declare const getOptimalLogoSize: (width: number, height: number, currentSize: string) => string;
|
|
19
16
|
export declare const calculateLogoDimensions: (logoData: {
|
|
20
17
|
width: number;
|
|
21
18
|
height: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_LOGO_VARIATION, LOGO_VARIATION } from '../constants';
|
|
1
|
+
import { DEFAULT_LOGO_VARIATION, LOGO_VARIATION, DEFAULT_LOGO_WIDTH, DEFAULT_LOGO_HEIGHT, } from '../constants';
|
|
2
2
|
import { BRAND_PAGE_TYPES, } from '../models';
|
|
3
3
|
import { FabricRenderClient, LogoVariationDefinitions, } from '../../clients/fabric-render-client';
|
|
4
4
|
import { isLogoContent } from './model.util';
|
|
@@ -167,26 +167,21 @@ export const getLogoVariationUrlByLogoImage = (logoImage) => {
|
|
|
167
167
|
export const getLogoTemplateUrlByLogoTemplateImage = (logoTemplateImage) => {
|
|
168
168
|
return FabricRenderClient.getInstance().getLogoTemplateUrlByLogoTemplateImage(logoTemplateImage);
|
|
169
169
|
};
|
|
170
|
-
export const getOptimalLogoSize = (
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
170
|
+
export const getOptimalLogoSize = (width, height, currentSize) => {
|
|
171
|
+
if (parseFloat(currentSize) >= 16) {
|
|
172
|
+
return currentSize;
|
|
173
|
+
}
|
|
174
|
+
const aspectRatio = width / height;
|
|
175
|
+
if (!parseFloat(`${aspectRatio}`) || aspectRatio <= 1) {
|
|
176
|
+
return currentSize;
|
|
177
|
+
}
|
|
178
|
+
const newSize = parseFloat(currentSize) + (aspectRatio - 1) * 4.5;
|
|
179
|
+
if (newSize > 11) {
|
|
180
|
+
return '11rem';
|
|
182
181
|
}
|
|
183
182
|
else {
|
|
184
|
-
|
|
185
|
-
newLogoSize = '8rem';
|
|
183
|
+
return `${Math.round(newSize)}rem`;
|
|
186
184
|
}
|
|
187
|
-
return {
|
|
188
|
-
newLogoSize,
|
|
189
|
-
};
|
|
190
185
|
};
|
|
191
186
|
export const calculateLogoDimensions = (logoData, maxWidth, maxHeight) => {
|
|
192
187
|
const maxWidthRem = parseFloat(maxWidth);
|
|
@@ -254,9 +249,11 @@ export const recalculateLogoContentDimensions = async (pageData, editableLogoVar
|
|
|
254
249
|
}
|
|
255
250
|
// Apply dimensions or fallback logic
|
|
256
251
|
if (logoData && logoData.width && logoData.height) {
|
|
257
|
-
const
|
|
258
|
-
content.logoImageHeight
|
|
259
|
-
|
|
252
|
+
const currentMaxWidth = content.logoImageWidth || DEFAULT_LOGO_WIDTH;
|
|
253
|
+
const currentMaxHeight = content.logoImageHeight || DEFAULT_LOGO_HEIGHT;
|
|
254
|
+
const dimensions = calculateOptimizedLogoDimensions(logoData, currentMaxWidth, currentMaxHeight);
|
|
255
|
+
content.logoImageHeight = dimensions.height;
|
|
256
|
+
content.logoImageWidth = dimensions.width;
|
|
260
257
|
}
|
|
261
258
|
});
|
|
262
259
|
}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
import type { MigrationData
|
|
2
|
-
export declare const migration07: (migrationResult: MigrationData, options:
|
|
1
|
+
import type { MigrationData } from '../migration.util';
|
|
2
|
+
export declare const migration07: (migrationResult: MigrationData, options: {
|
|
3
|
+
isServerRender: boolean;
|
|
4
|
+
}) => Promise<MigrationData>;
|
|
@@ -6,7 +6,7 @@ export const migration07 = async (migrationResult, options) => {
|
|
|
6
6
|
if (brandPageModel.brandPageType !== BRAND_PAGE_TYPES.brandSite) {
|
|
7
7
|
return migrationResult;
|
|
8
8
|
}
|
|
9
|
-
if (options.
|
|
9
|
+
if (options.isServerRender !== undefined && options.isServerRender) {
|
|
10
10
|
migrationResult.useOldLogoRenderSize = true;
|
|
11
11
|
return migrationResult;
|
|
12
12
|
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
import type { MigrationData
|
|
2
|
-
export declare const migration08: (migrationResult: MigrationData, options:
|
|
1
|
+
import type { MigrationData } from '../migration.util';
|
|
2
|
+
export declare const migration08: (migrationResult: MigrationData, options: {
|
|
3
|
+
isServerRender: boolean;
|
|
4
|
+
isUserDraft?: boolean;
|
|
5
|
+
}) => Promise<MigrationData>;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { DEFAULT_LOGO_HEIGHT, DEFAULT_LOGO_WIDTH, BRAND_PAGE_TYPES, } from '../..';
|
|
2
2
|
import { FabricRenderClient } from '../../../clients/fabric-render-client';
|
|
3
3
|
import { isLogoContent } from '../model.util';
|
|
4
|
-
import { calculateLogoDimensions } from '../logo.util';
|
|
4
|
+
import { calculateLogoDimensions, safeGetLogoImageFromLogoImageUrl, } from '../logo.util';
|
|
5
5
|
export const migration08 = async (migrationResult, options) => {
|
|
6
6
|
const { brandPageModel } = migrationResult;
|
|
7
7
|
if (brandPageModel.brandPageType !== BRAND_PAGE_TYPES.default &&
|
|
8
8
|
brandPageModel.brandPageType !== BRAND_PAGE_TYPES.brandContact) {
|
|
9
9
|
return migrationResult;
|
|
10
10
|
}
|
|
11
|
-
if (options.
|
|
11
|
+
if (options.isUserDraft !== undefined && !options.isUserDraft) {
|
|
12
|
+
return migrationResult;
|
|
13
|
+
}
|
|
14
|
+
if (options.isServerRender !== undefined && options.isServerRender) {
|
|
12
15
|
migrationResult.useOldLogoRenderSize = true;
|
|
13
16
|
return migrationResult;
|
|
14
17
|
}
|
|
@@ -3,11 +3,9 @@ export interface MigrationData {
|
|
|
3
3
|
brandPageModel: BrandPageModel;
|
|
4
4
|
useOldLogoRenderSize: boolean;
|
|
5
5
|
}
|
|
6
|
-
export
|
|
6
|
+
export declare const GetLatestModelVersion: () => number;
|
|
7
|
+
export declare const migrateBrandPageModel: (brandPageModel: BrandPageModel, options: {
|
|
7
8
|
logoImage?: LogoImageModel;
|
|
8
9
|
isUserDraft: boolean;
|
|
9
10
|
isServerRender: boolean;
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
export declare const GetLatestModelVersion: () => number;
|
|
13
|
-
export declare const migrateBrandPageModel: (brandPageModel: BrandPageModel, options: MigrationOptions) => Promise<MigrationData>;
|
|
11
|
+
}) => Promise<MigrationData>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LOGO_MIGRATION_VERSION } from '../constants';
|
|
1
2
|
import {} from '../models';
|
|
2
3
|
import { migration01 } from './migration/migration-01';
|
|
3
4
|
import { migration01_1 } from './migration/migration-01_1';
|
|
@@ -12,7 +13,6 @@ import { migration07 } from './migration/migration-07';
|
|
|
12
13
|
import { migration08 } from './migration/migration-08';
|
|
13
14
|
import { migration09 } from './migration/migration-09';
|
|
14
15
|
import { migration10 } from './migration/migration-10';
|
|
15
|
-
import { migration11 } from './migration/migration-11';
|
|
16
16
|
const MIGRATION_TABLE = [
|
|
17
17
|
{
|
|
18
18
|
version: 1,
|
|
@@ -80,11 +80,6 @@ const MIGRATION_TABLE = [
|
|
|
80
80
|
migrateFn: migration10,
|
|
81
81
|
description: 'Migrating promptText to title for mailing list content',
|
|
82
82
|
},
|
|
83
|
-
{
|
|
84
|
-
version: 11,
|
|
85
|
-
migrateFn: migration11,
|
|
86
|
-
description: 'Remove backgroundColorEnabled flag from page headers',
|
|
87
|
-
},
|
|
88
83
|
];
|
|
89
84
|
export const GetLatestModelVersion = () => Math.max(...MIGRATION_TABLE.map((x) => x.version));
|
|
90
85
|
export const migrateBrandPageModel = async (brandPageModel, options) => {
|
|
@@ -659,6 +659,7 @@ export const mapToPageHeaderViewModel = (pageHeader, pageStyles, pages, useOldLo
|
|
|
659
659
|
}),
|
|
660
660
|
style: pageHeader.style,
|
|
661
661
|
backgroundStyle: pageHeader.backgroundStyle,
|
|
662
|
+
backgroundColorEnabled: pageHeader.backgroundColorEnabled,
|
|
662
663
|
};
|
|
663
664
|
};
|
|
664
665
|
export const mapToPageFooterViewModel = (pageFooter, pageStyles, useOldLogoRenderSize = false) => {
|
|
@@ -931,7 +931,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
931
931
|
}): void;
|
|
932
932
|
setPageSettingsSectionValue({ sectionName, propName, index, value, merge, viewport, }: {
|
|
933
933
|
sectionName: "footer" | "header" | "pages";
|
|
934
|
-
propName: "copyrightStyle" | "style" | "iconStyle" | "displayStyle" | "backgroundStyle" | "logoImage" | "logoImageStyle" | "isLogoOptional" | "viewport" | "isLogoVisible" | "logoTemplateImage" | "logoImageHeight" | "logoImageWidth" | "navigationStyles" | "navigation" | "logoImageUrl" | "logoDraftToken" | "logoVariation" | "logoImageBase64Url" | "copyrightText" | "socialLinks" | "textFontFamily";
|
|
934
|
+
propName: "copyrightStyle" | "style" | "iconStyle" | "displayStyle" | "backgroundStyle" | "logoImage" | "logoImageStyle" | "isLogoOptional" | "viewport" | "isLogoVisible" | "logoTemplateImage" | "logoImageHeight" | "logoImageWidth" | "navigationStyles" | "navigation" | "logoImageUrl" | "logoDraftToken" | "logoVariation" | "logoImageBase64Url" | "backgroundColorEnabled" | "copyrightText" | "socialLinks" | "textFontFamily";
|
|
935
935
|
index?: number | undefined;
|
|
936
936
|
value: string | number | boolean | BrandPageCssStyle | import("../../../brand-page").LinksItem[] | Partial<import("../../../brand-page").ImageItem> | null | undefined;
|
|
937
937
|
merge?: boolean | undefined;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
2
|
brandPageType: import("vue").ComputedRef<"default" | "brandSite" | "brandContact">;
|
|
3
3
|
isBrandSite: import("vue").ComputedRef<boolean>;
|
|
4
|
-
isPrePurchase: import("vue").ComputedRef<boolean>;
|
|
5
4
|
isBrandPageOrIsBrandContact: import("vue").ComputedRef<boolean>;
|
|
6
5
|
brandPageMakerStore: import("pinia").Store<"brandPageMaker", import("../../stores").BrandPageMakerState, {
|
|
7
6
|
contentErrorCount(): number;
|
package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { computed, defineComponent } from 'vue';
|
|
2
|
-
import { DESKTOP_HEIGHT, DESKTOP_WIDTH, MOBILE_HEIGHT, MOBILE_WIDTH,
|
|
3
|
-
import { useBrandPageMakerStore
|
|
2
|
+
import { DESKTOP_HEIGHT, DESKTOP_WIDTH, MOBILE_HEIGHT, MOBILE_WIDTH, } from '../../constants';
|
|
3
|
+
import { useBrandPageMakerStore } from '../../../lib';
|
|
4
4
|
export default defineComponent({
|
|
5
5
|
setup() {
|
|
6
6
|
const brandPageMakerStore = useBrandPageMakerStore();
|
|
7
|
-
const brandPageContainerStore = useBrandPageContainerStore();
|
|
8
7
|
return {
|
|
9
8
|
brandPageType: computed(() => brandPageMakerStore.brandPageType),
|
|
10
9
|
isBrandSite: computed(() => brandPageMakerStore.isBrandSite),
|
|
11
|
-
isPrePurchase: computed(() => brandPageContainerStore.isPrePurchase),
|
|
12
10
|
isBrandPageOrIsBrandContact: computed(() => brandPageMakerStore.isBrandPageOrIsBrandContact),
|
|
13
11
|
brandPageMakerStore,
|
|
14
12
|
};
|
|
@@ -21,10 +19,7 @@ export default defineComponent({
|
|
|
21
19
|
return this.isBrandSite ? DESKTOP_WIDTH : MOBILE_WIDTH;
|
|
22
20
|
},
|
|
23
21
|
height() {
|
|
24
|
-
|
|
25
|
-
return DESKTOP_HEIGHT;
|
|
26
|
-
}
|
|
27
|
-
return this.isPrePurchase ? MOBILE_HEIGHT : MOBILE_HEIGHT_POST_PURCHASE;
|
|
22
|
+
return this.isBrandSite ? DESKTOP_HEIGHT : MOBILE_HEIGHT;
|
|
28
23
|
},
|
|
29
24
|
},
|
|
30
25
|
});
|
package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts
CHANGED
|
@@ -941,7 +941,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
941
941
|
}): void;
|
|
942
942
|
setPageSettingsSectionValue({ sectionName, propName, index, value, merge, viewport, }: {
|
|
943
943
|
sectionName: "footer" | "header" | "pages";
|
|
944
|
-
propName: "copyrightStyle" | "style" | "iconStyle" | "displayStyle" | "backgroundStyle" | "logoImage" | "logoImageStyle" | "isLogoOptional" | "viewport" | "isLogoVisible" | "logoTemplateImage" | "logoImageHeight" | "logoImageWidth" | "navigationStyles" | "navigation" | "logoImageUrl" | "logoDraftToken" | "logoVariation" | "logoImageBase64Url" | "copyrightText" | "socialLinks" | "textFontFamily";
|
|
944
|
+
propName: "copyrightStyle" | "style" | "iconStyle" | "displayStyle" | "backgroundStyle" | "logoImage" | "logoImageStyle" | "isLogoOptional" | "viewport" | "isLogoVisible" | "logoTemplateImage" | "logoImageHeight" | "logoImageWidth" | "navigationStyles" | "navigation" | "logoImageUrl" | "logoDraftToken" | "logoVariation" | "logoImageBase64Url" | "backgroundColorEnabled" | "copyrightText" | "socialLinks" | "textFontFamily";
|
|
945
945
|
index?: number | undefined;
|
|
946
946
|
value: string | number | boolean | BrandPageCssStyle | import("../../../brand-page").LinksItem[] | Partial<import("../../../brand-page").ImageItem> | null | undefined;
|
|
947
947
|
merge?: boolean | undefined;
|
|
@@ -23,7 +23,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
23
23
|
dnsConfigurationStatus: "request_expired" | "missing_expected_dns_records" | "invalid_multiple_dns_records_exist" | "unexpected_aaaa_record" | "completed";
|
|
24
24
|
triggerOrigin?: string | undefined;
|
|
25
25
|
} | null>;
|
|
26
|
-
brandPageType: import("vue").ComputedRef<"default" | "brandSite" | "brandContact">;
|
|
27
26
|
isCustomDomainEnabled: import("vue").ComputedRef<boolean>;
|
|
28
27
|
isSellDomainNameEnabled: import("vue").ComputedRef<boolean>;
|
|
29
28
|
designDraftToken: import("vue").ComputedRef<string | undefined>;
|
|
@@ -437,8 +436,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
437
436
|
isCustomDomainNameValid: boolean;
|
|
438
437
|
isBusy: boolean;
|
|
439
438
|
isResetDomainConfirmModalVisible: boolean;
|
|
440
|
-
isDeleteDomainModalVisible: boolean;
|
|
441
|
-
isCustomDomainRequestModalVisible: boolean;
|
|
442
439
|
isUseExistingDomainModalVisible: boolean;
|
|
443
440
|
defaultUSDCurrency: {
|
|
444
441
|
id: number;
|
|
@@ -449,7 +446,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
449
446
|
};
|
|
450
447
|
isPageUrlActionListVisible: boolean;
|
|
451
448
|
isCustomDomainActionListVisible: boolean;
|
|
452
|
-
customDomainRequests: any[];
|
|
453
449
|
CUSTOM_DOMAIN_INSTRUCTION_DNS_HOST_DISPLAY_TEXT: string;
|
|
454
450
|
}, {
|
|
455
451
|
customDomainStatusDisplayText(): string | null;
|
|
@@ -475,16 +471,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
475
471
|
onBrandPageUrlRadioButtonClick(): Promise<void>;
|
|
476
472
|
onCustomDomainRadioButtonClick(): Promise<void>;
|
|
477
473
|
onCustomDomainConnectButtonClick(): Promise<void>;
|
|
478
|
-
onCustomDomainRemoveButtonClick(): void
|
|
479
|
-
confirmDeleteDomain(): Promise<void>;
|
|
480
|
-
cancelDeleteDomain(): void;
|
|
474
|
+
onCustomDomainRemoveButtonClick(): Promise<void>;
|
|
481
475
|
onUseExistingDomainButtonClick(): void;
|
|
482
476
|
onCloseExistingDomainModal(): void;
|
|
483
477
|
onClickPageActionList(): void;
|
|
484
478
|
onClickOutsidePageActionList(): void;
|
|
485
479
|
onClickCustomDomainActionList(): void;
|
|
486
480
|
onClickOutsideCustomDomainActionList(): void;
|
|
487
|
-
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
481
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
488
482
|
isMaker: {
|
|
489
483
|
type: BooleanConstructor;
|
|
490
484
|
required: false;
|
|
@@ -494,10 +488,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
494
488
|
required: false;
|
|
495
489
|
default: boolean;
|
|
496
490
|
};
|
|
497
|
-
}>> & Readonly<{
|
|
498
|
-
"onSlug-change"?: ((...args: any[]) => any) | undefined;
|
|
499
|
-
"onOn-custom-domain-removed"?: ((...args: any[]) => any) | undefined;
|
|
500
|
-
}>, {
|
|
491
|
+
}>> & Readonly<{}>, {
|
|
501
492
|
isDesignCom: boolean;
|
|
502
493
|
isMaker: boolean;
|
|
503
494
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { defineComponent, computed } from 'vue';
|
|
2
2
|
import { BRANDCROWD_MANAGED_TRIGGER_ORIGIN, CUSTOM_DOMAIN_INSTRUCTION_DNS_HOST_DISPLAY_TEXT, CUSTOM_DOMAIN_STATUSES, DNS_CONFIGURATION_STATUSES, } from '../../constants';
|
|
3
|
-
import { useBrandPageContainerStore, useBrandPageMakerStore, useLocalisedRouteStore,
|
|
3
|
+
import { useBrandPageContainerStore, useBrandPageMakerStore, useLocalisedRouteStore, } from '../../stores';
|
|
4
4
|
import { defaultUSDCurrency } from '../../constants/currency-constants';
|
|
5
5
|
import { validateCustomDomainName } from '../../utils';
|
|
6
6
|
import { seoSettingsTr, commonTr } from '../../../composables/useTranslate';
|
|
7
7
|
export default defineComponent({
|
|
8
|
-
emits: ['slug-change', 'on-custom-domain-removed'],
|
|
9
8
|
props: {
|
|
10
9
|
isMaker: {
|
|
11
10
|
type: Boolean,
|
|
@@ -23,7 +22,6 @@ export default defineComponent({
|
|
|
23
22
|
const localisedRouteStore = useLocalisedRouteStore();
|
|
24
23
|
return {
|
|
25
24
|
customDomain: computed(() => brandPageContainer.customDomain),
|
|
26
|
-
brandPageType: computed(() => brandPageMakerStore.brandPageType),
|
|
27
25
|
isCustomDomainEnabled: computed(() => brandPageContainer.isCustomDomainEnabled),
|
|
28
26
|
isSellDomainNameEnabled: computed(() => brandPageContainer.isSellDomainNameEnabled),
|
|
29
27
|
designDraftToken: computed(() => brandPageContainer.designDraftToken),
|
|
@@ -38,13 +36,10 @@ export default defineComponent({
|
|
|
38
36
|
isCustomDomainNameValid: false,
|
|
39
37
|
isBusy: false,
|
|
40
38
|
isResetDomainConfirmModalVisible: false,
|
|
41
|
-
isDeleteDomainModalVisible: false,
|
|
42
|
-
isCustomDomainRequestModalVisible: false,
|
|
43
39
|
isUseExistingDomainModalVisible: false,
|
|
44
40
|
defaultUSDCurrency,
|
|
45
41
|
isPageUrlActionListVisible: false,
|
|
46
42
|
isCustomDomainActionListVisible: false,
|
|
47
|
-
customDomainRequests: [],
|
|
48
43
|
CUSTOM_DOMAIN_INSTRUCTION_DNS_HOST_DISPLAY_TEXT,
|
|
49
44
|
}),
|
|
50
45
|
computed: {
|
|
@@ -166,7 +161,10 @@ export default defineComponent({
|
|
|
166
161
|
}
|
|
167
162
|
items.push({
|
|
168
163
|
title: commonTr('remove'),
|
|
169
|
-
action: this.
|
|
164
|
+
action: this.isCustomDomainRequestConnected ||
|
|
165
|
+
this.isCustomDomainRequestFailed
|
|
166
|
+
? this.onCustomDomainRemoveButtonClick
|
|
167
|
+
: this.onClickCustomDomainReset,
|
|
170
168
|
});
|
|
171
169
|
return items;
|
|
172
170
|
},
|
|
@@ -269,10 +267,7 @@ export default defineComponent({
|
|
|
269
267
|
this.isBusy = false;
|
|
270
268
|
}
|
|
271
269
|
},
|
|
272
|
-
onCustomDomainRemoveButtonClick() {
|
|
273
|
-
this.isDeleteDomainModalVisible = true;
|
|
274
|
-
},
|
|
275
|
-
async confirmDeleteDomain() {
|
|
270
|
+
async onCustomDomainRemoveButtonClick() {
|
|
276
271
|
this.isBusy = true;
|
|
277
272
|
try {
|
|
278
273
|
await this.brandPageContainer.deleteBrandPageCustomDomain({
|
|
@@ -283,17 +278,11 @@ export default defineComponent({
|
|
|
283
278
|
await this.brandPageContainer.updateBrandPageIsCustomDomainEnabled({
|
|
284
279
|
isCustomDomainEnabled: false,
|
|
285
280
|
});
|
|
286
|
-
this.$emit('on-custom-domain-removed');
|
|
287
281
|
}
|
|
288
282
|
finally {
|
|
289
283
|
this.isBusy = false;
|
|
290
|
-
this.isDeleteDomainModalVisible = false;
|
|
291
284
|
}
|
|
292
285
|
},
|
|
293
|
-
cancelDeleteDomain() {
|
|
294
|
-
this.isDeleteDomainModalVisible = false;
|
|
295
|
-
},
|
|
296
|
-
/* Custom Domain Requests Modal */
|
|
297
286
|
onUseExistingDomainButtonClick() {
|
|
298
287
|
this.isUseExistingDomainModalVisible = true;
|
|
299
288
|
},
|
|
@@ -552,14 +552,13 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
552
552
|
? logoPrePurchase
|
|
553
553
|
: logoPostPurchase;
|
|
554
554
|
if (logo && logoImageHeight) {
|
|
555
|
-
const
|
|
556
|
-
pageSettingsStore.sections[PAGE_SECTIONS.header][VIEWPORTS.desktop].logoImageWidth =
|
|
557
|
-
pageSettingsStore.sections[PAGE_SECTIONS.header][VIEWPORTS.desktop].logoImageHeight =
|
|
555
|
+
const newLogoSize = getOptimalLogoSize(logo.width, logo.height, logoImageHeight);
|
|
556
|
+
pageSettingsStore.sections[PAGE_SECTIONS.header][VIEWPORTS.desktop].logoImageWidth = newLogoSize;
|
|
557
|
+
pageSettingsStore.sections[PAGE_SECTIONS.header][VIEWPORTS.desktop].logoImageHeight = newLogoSize;
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
else if (
|
|
561
|
-
|
|
562
|
-
this.isBrandPageOrIsBrandContact) {
|
|
560
|
+
else if (this.isBrandPageOrIsBrandContact &&
|
|
561
|
+
brandPageContainerStore.isPrePurchase) {
|
|
563
562
|
recalculateLogoContentDimensions(pageSettingsStore, editableLogoStore.editableLogoVariations);
|
|
564
563
|
}
|
|
565
564
|
const backgroundStyles = new BackgroundStyles(brandPageModel.styles.backgroundStyles);
|