@designcrowd/library.brand-page 5.14.8-flacky-nav-21 → 5.14.9
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-C7UP0wnU.js → CreatedOnBrandCrowd-de-de-5lGSHeUR.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-Dn7kLByA.js → CreatedOnBrandCrowd-en-us-q6NzpjRy.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-BniaWIta.js → CreatedOnBrandCrowd-es-es-Y6tA9XVi.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-L19SCOKe.js → CreatedOnBrandCrowd-fr-fr-eMjr_GUU.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-yF1hS_QN.js → CreatedOnBrandCrowd-pt-pt-BDkCWJFa.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-COoIYzR_.js → CreatedOnDcom-de-de-DqOF75SZ.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-DPxw4zug.js → CreatedOnDcom-en-us-Cikdxq8F.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-B6sdWmmP.js → CreatedOnDcom-es-es-DDnXD56X.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-C_P7GYue.js → CreatedOnDcom-fr-fr-BpVmVCAd.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-QAdIC2fu.js → CreatedOnDcom-pt-pt-D-Mf6uF4.js} +1 -1
- package/lib/src/brand-page/constants/logo.constants.d.ts +0 -1
- package/lib/src/brand-page/constants/logo.constants.js +0 -2
- package/lib/src/brand-page/constants/styles.constants.d.ts +2 -2
- package/lib/src/brand-page/constants/styles.constants.js +2 -2
- package/lib/src/brand-page/utils/migration/migration-01.d.ts +2 -3
- package/lib/src/brand-page/utils/migration/migration-01.js +2 -3
- package/lib/src/brand-page/utils/migration/migration-01_1.d.ts +3 -4
- package/lib/src/brand-page/utils/migration/migration-01_1.js +2 -3
- package/lib/src/brand-page/utils/migration/migration-02.d.ts +3 -4
- package/lib/src/brand-page/utils/migration/migration-02.js +2 -3
- package/lib/src/brand-page/utils/migration/migration-03.d.ts +3 -4
- package/lib/src/brand-page/utils/migration/migration-03.js +2 -3
- package/lib/src/brand-page/utils/migration/migration-04.d.ts +3 -4
- package/lib/src/brand-page/utils/migration/migration-04.js +2 -3
- package/lib/src/brand-page/utils/migration/migration-05.d.ts +2 -6
- package/lib/src/brand-page/utils/migration/migration-05.js +2 -3
- package/lib/src/brand-page/utils/migration/migration-05_1.d.ts +3 -3
- package/lib/src/brand-page/utils/migration/migration-05_1.js +3 -3
- package/lib/src/brand-page/utils/migration/migration-05_2.d.ts +3 -3
- package/lib/src/brand-page/utils/migration/migration-05_2.js +2 -3
- package/lib/src/brand-page/utils/migration.util.d.ts +1 -6
- package/lib/src/brand-page/utils/migration.util.js +6 -16
- package/lib/src/brand-page/utils/personalisation.util.js +2 -2
- package/lib/src/brand-page/utils/view-model.util.d.ts +4 -6
- package/lib/src/brand-page/utils/view-model.util.js +13 -14
- package/lib/src/brand-page/view-models.d.ts +0 -1
- 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 +1 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.d.ts +0 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.js +2 -48
- 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.d.ts +0 -1122
- package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.js +0 -1058
- 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/google-analytics/GoogleAnalytics.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/stores/brandpage-maker/brandpage-maker-store.d.ts +1 -2
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +2 -3
- package/lib/src/css/library.brand-page-brandCrowd.min.css +6 -3
- package/lib/src/css/library.brand-page-brandPage.min.css +6 -3
- package/lib/src/css/library.brand-page-designCom.min.css +6 -3
- package/lib/src/css/library.brand-page-preview.min.css +6 -3
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-BX6A4JdA.js → lib-DXgTJds-.js} +8015 -8149
- 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/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/page-settings/store/page-settings-store.js +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/lib/src/shared/template-settings/store/template-settings-store.js +1 -2
- package/package.json +1 -1
- package/src/brand-page/components/logo/Logo.vue +1 -24
- package/src/brand-page/components/logo/LogoRender.vue +20 -56
- package/src/brand-page/constants/logo.constants.ts +0 -3
- package/src/brand-page/constants/styles.constants.ts +2 -2
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +1112 -1121
- package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +413 -416
- package/src/brand-page/utils/migration/logo/migration.util.logo.test.ts +3 -3
- package/src/brand-page/utils/migration/migration-01.ts +4 -7
- package/src/brand-page/utils/migration/migration-01_1.ts +3 -6
- package/src/brand-page/utils/migration/migration-02.ts +4 -7
- package/src/brand-page/utils/migration/migration-03.ts +4 -7
- package/src/brand-page/utils/migration/migration-04.ts +4 -7
- package/src/brand-page/utils/migration/migration-05.ts +3 -16
- package/src/brand-page/utils/migration/migration-05_1.ts +4 -6
- package/src/brand-page/utils/migration/migration-05_2.ts +3 -6
- package/src/brand-page/utils/migration.util.test.ts +157 -274
- package/src/brand-page/utils/migration.util.ts +9 -26
- package/src/brand-page/utils/migration2.util.test.ts +2 -7
- package/src/brand-page/utils/personalisation.util.test.ts +9 -9
- package/src/brand-page/utils/personalisation.util.ts +2 -4
- package/src/brand-page/utils/view-model.util.ts +7 -26
- package/src/brand-page/view-models.ts +0 -1
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.ts +1 -52
- package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.ts +0 -1090
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +1 -4
- package/src/shared/page-settings/store/page-settings-store.ts +0 -1
- package/src/shared/template-settings/store/template-settings-store.ts +1 -2
- package/lib/src/brand-page/utils/migration/migration-06.d.ts +0 -4
- package/lib/src/brand-page/utils/migration/migration-06.js +0 -60
- package/src/brand-page/utils/migration/migration-06.test.ts +0 -384
- package/src/brand-page/utils/migration/migration-06.ts +0 -108
|
@@ -9,16 +9,16 @@ import { migrateBrandPageModel } from '../../migration.util';
|
|
|
9
9
|
import { BrandPageModel } from '../../../models';
|
|
10
10
|
|
|
11
11
|
describe('migration.util.logo', () => {
|
|
12
|
-
test('migrateBrandPageModel should migrate logo content when give a brand site data with logo image url',
|
|
12
|
+
test('migrateBrandPageModel should migrate logo content when give a brand site data with logo image url', () => {
|
|
13
13
|
// Arrange
|
|
14
14
|
const logoImage = logoUtil.safeGetLogoImageFromLogoImageUrl(
|
|
15
15
|
brandsiteMigrationBrandPageData.headerStyles.logoImageUrl,
|
|
16
16
|
)!;
|
|
17
17
|
|
|
18
18
|
// Act
|
|
19
|
-
const
|
|
19
|
+
const brandPageModel = migrateBrandPageModel(
|
|
20
20
|
new BrandPageModel(brandsiteMigrationBrandPageData as any),
|
|
21
|
-
{ isUserDraft: true
|
|
21
|
+
{ isUserDraft: true },
|
|
22
22
|
);
|
|
23
23
|
|
|
24
24
|
// Assert
|
|
@@ -65,7 +65,6 @@ import {
|
|
|
65
65
|
isSupportMeContent,
|
|
66
66
|
isTestimonialContent,
|
|
67
67
|
isTextContent,
|
|
68
|
-
type MigrationData,
|
|
69
68
|
} from '../../utils';
|
|
70
69
|
import { createInitialLogoContent } from '../../../brand-page-maker/models';
|
|
71
70
|
|
|
@@ -1155,14 +1154,12 @@ export const migrateConvertLineHeightOnFooterStyles = (
|
|
|
1155
1154
|
}
|
|
1156
1155
|
};
|
|
1157
1156
|
|
|
1158
|
-
export const migration01 =
|
|
1159
|
-
|
|
1157
|
+
export const migration01 = (
|
|
1158
|
+
brandPageModel: BrandPageModel,
|
|
1160
1159
|
options: {
|
|
1161
1160
|
isUserDraft: boolean;
|
|
1162
1161
|
},
|
|
1163
|
-
):
|
|
1164
|
-
const { brandPageModel } = migrationResult;
|
|
1165
|
-
|
|
1162
|
+
): BrandPageModel => {
|
|
1166
1163
|
if (!brandPageModel.brandPageType) {
|
|
1167
1164
|
brandPageModel.brandPageType = BRAND_PAGE_TYPES.default;
|
|
1168
1165
|
}
|
|
@@ -1200,5 +1197,5 @@ export const migration01 = async (
|
|
|
1200
1197
|
migrateConvertLineHeightOnNavigationStyles(brandPageModel);
|
|
1201
1198
|
migrateConvertLineHeightOnFooterStyles(brandPageModel);
|
|
1202
1199
|
|
|
1203
|
-
return
|
|
1200
|
+
return brandPageModel;
|
|
1204
1201
|
};
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import type { BrandPageModel, LogoImageModel } from '../..';
|
|
2
|
-
import type { MigrationData } from '../migration.util';
|
|
3
2
|
|
|
4
3
|
import { migrateLogoImage } from './logo/logo.migration.util';
|
|
5
4
|
|
|
6
5
|
export const migration01_1 = (
|
|
7
|
-
|
|
6
|
+
brandPageModel: BrandPageModel,
|
|
8
7
|
options: {
|
|
9
8
|
logoImage?: LogoImageModel;
|
|
10
9
|
},
|
|
11
|
-
):
|
|
12
|
-
const { brandPageModel } = migrationResult;
|
|
13
|
-
|
|
10
|
+
): BrandPageModel => {
|
|
14
11
|
migrateLogoImage(brandPageModel, options.logoImage);
|
|
15
12
|
|
|
16
|
-
return
|
|
13
|
+
return brandPageModel;
|
|
17
14
|
};
|
|
@@ -19,7 +19,6 @@ import {
|
|
|
19
19
|
type TextContent,
|
|
20
20
|
type TextStyleDeclaration,
|
|
21
21
|
} from '../..';
|
|
22
|
-
import type { MigrationData } from '../migration.util';
|
|
23
22
|
import {
|
|
24
23
|
isAboutContent,
|
|
25
24
|
isBannerContent,
|
|
@@ -91,15 +90,13 @@ const handleConversion = (
|
|
|
91
90
|
);
|
|
92
91
|
};
|
|
93
92
|
|
|
94
|
-
export const migration02 =
|
|
95
|
-
|
|
93
|
+
export const migration02 = (
|
|
94
|
+
brandPageModel: BrandPageModel,
|
|
96
95
|
options: {
|
|
97
96
|
logoImage?: LogoImageModel;
|
|
98
97
|
isUserDraft: boolean;
|
|
99
98
|
},
|
|
100
|
-
):
|
|
101
|
-
const { brandPageModel } = migrationResult;
|
|
102
|
-
|
|
99
|
+
): BrandPageModel => {
|
|
103
100
|
handleConversion(
|
|
104
101
|
brandPageModel.pageHeaderDesktop?.navigation?.defaultButtonStyle,
|
|
105
102
|
);
|
|
@@ -215,5 +212,5 @@ export const migration02 = async (
|
|
|
215
212
|
});
|
|
216
213
|
});
|
|
217
214
|
|
|
218
|
-
return
|
|
215
|
+
return brandPageModel;
|
|
219
216
|
};
|
|
@@ -18,7 +18,6 @@ import {
|
|
|
18
18
|
type TextContent,
|
|
19
19
|
type TextStyleDeclaration,
|
|
20
20
|
} from '../..';
|
|
21
|
-
import type { MigrationData } from '../migration.util';
|
|
22
21
|
import {
|
|
23
22
|
isAboutContent,
|
|
24
23
|
isBannerContent,
|
|
@@ -70,15 +69,13 @@ const migrateApplyAutoScaleProperty = (
|
|
|
70
69
|
brandPageType && brandPageType === BRAND_PAGE_TYPES.brandSite;
|
|
71
70
|
};
|
|
72
71
|
|
|
73
|
-
export const migration03 =
|
|
74
|
-
|
|
72
|
+
export const migration03 = (
|
|
73
|
+
brandPageModel: BrandPageModel,
|
|
75
74
|
options: {
|
|
76
75
|
logoImage?: LogoImageModel;
|
|
77
76
|
isUserDraft: boolean;
|
|
78
77
|
},
|
|
79
|
-
):
|
|
80
|
-
const { brandPageModel } = migrationResult;
|
|
81
|
-
|
|
78
|
+
): BrandPageModel => {
|
|
82
79
|
handleRecursiveFontSizeMigration(brandPageModel.pageHeaderDesktop);
|
|
83
80
|
handleRecursiveFontSizeMigration(brandPageModel.pageHeaderMobile);
|
|
84
81
|
handleRecursiveFontSizeMigration(brandPageModel.pageFooterDesktop);
|
|
@@ -281,5 +278,5 @@ export const migration03 = async (
|
|
|
281
278
|
});
|
|
282
279
|
});
|
|
283
280
|
|
|
284
|
-
return
|
|
281
|
+
return brandPageModel;
|
|
285
282
|
};
|
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
type SocialLinksContent,
|
|
15
15
|
type TestimonialSectionContent,
|
|
16
16
|
} from '../..';
|
|
17
|
-
import type { MigrationData } from '../migration.util';
|
|
18
17
|
import {
|
|
19
18
|
isAboutContent,
|
|
20
19
|
isBannerContent,
|
|
@@ -122,12 +121,10 @@ const updateUserUploadedImageUrls = (content: Content): void => {
|
|
|
122
121
|
}
|
|
123
122
|
};
|
|
124
123
|
|
|
125
|
-
export const migration04 =
|
|
126
|
-
|
|
124
|
+
export const migration04 = (
|
|
125
|
+
brandPageModel: BrandPageModel,
|
|
127
126
|
options: { logoImage?: LogoImageModel; isUserDraft: boolean },
|
|
128
|
-
):
|
|
129
|
-
const { brandPageModel } = migrationResult;
|
|
130
|
-
|
|
127
|
+
): BrandPageModel => {
|
|
131
128
|
if (
|
|
132
129
|
brandPageModel.faviconUrl &&
|
|
133
130
|
isUserUploadedImage(brandPageModel.faviconUrl)
|
|
@@ -164,5 +161,5 @@ export const migration04 = async (
|
|
|
164
161
|
});
|
|
165
162
|
}
|
|
166
163
|
|
|
167
|
-
return
|
|
164
|
+
return brandPageModel;
|
|
168
165
|
};
|
|
@@ -1,20 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type BrandPageModel,
|
|
3
|
-
type TextContent,
|
|
4
|
-
type LogoImageModel,
|
|
5
|
-
} from '../..';
|
|
6
|
-
import type { MigrationData } from '../migration.util';
|
|
1
|
+
import { type BrandPageModel, type TextContent } from '../..';
|
|
7
2
|
import { isTextContent } from '../model.util';
|
|
8
3
|
|
|
9
|
-
export const migration05 =
|
|
10
|
-
migrationResult: MigrationData,
|
|
11
|
-
options: {
|
|
12
|
-
logoImage?: LogoImageModel;
|
|
13
|
-
isUserDraft: boolean;
|
|
14
|
-
},
|
|
15
|
-
): Promise<MigrationData> => {
|
|
16
|
-
const { brandPageModel } = migrationResult;
|
|
17
|
-
|
|
4
|
+
export const migration05 = (brandPageModel: BrandPageModel): BrandPageModel => {
|
|
18
5
|
brandPageModel.pages.forEach((page) => {
|
|
19
6
|
page.contents.forEach((content) => {
|
|
20
7
|
if (isTextContent(content)) {
|
|
@@ -29,5 +16,5 @@ export const migration05 = async (
|
|
|
29
16
|
});
|
|
30
17
|
});
|
|
31
18
|
|
|
32
|
-
return
|
|
19
|
+
return brandPageModel;
|
|
33
20
|
};
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type BrandPageModel } from '../..';
|
|
2
2
|
|
|
3
3
|
export const migration05_1 = (
|
|
4
|
-
|
|
4
|
+
brandPageModel: BrandPageModel,
|
|
5
5
|
options: { isUserDraft: boolean },
|
|
6
|
-
):
|
|
7
|
-
const { brandPageModel } = migrationResult;
|
|
8
|
-
|
|
6
|
+
): BrandPageModel => {
|
|
9
7
|
if (!options.isUserDraft) {
|
|
10
8
|
brandPageModel.pageFooterDesktop?.socialLinks?.forEach((link) => {
|
|
11
9
|
if (link.imageUrl === 'twitter') {
|
|
@@ -22,5 +20,5 @@ export const migration05_1 = (
|
|
|
22
20
|
});
|
|
23
21
|
}
|
|
24
22
|
|
|
25
|
-
return
|
|
23
|
+
return brandPageModel;
|
|
26
24
|
};
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { type BrandPageModel, type ButtonContent } from '../..';
|
|
2
|
-
import type { MigrationData } from '../migration.util';
|
|
3
2
|
|
|
4
3
|
export const migration05_2 = (
|
|
5
|
-
|
|
4
|
+
brandPageModel: BrandPageModel,
|
|
6
5
|
options: { isUserDraft: boolean },
|
|
7
|
-
):
|
|
8
|
-
const { brandPageModel } = migrationResult;
|
|
9
|
-
|
|
6
|
+
): BrandPageModel => {
|
|
10
7
|
brandPageModel.pages.forEach((page) => {
|
|
11
8
|
page.contents.forEach((content) => {
|
|
12
9
|
// Casting content type to string to avoid adding placeholder types in CONTENT_SETTINGS_CONFIGS
|
|
@@ -19,5 +16,5 @@ export const migration05_2 = (
|
|
|
19
16
|
});
|
|
20
17
|
});
|
|
21
18
|
|
|
22
|
-
return
|
|
19
|
+
return brandPageModel;
|
|
23
20
|
};
|