@designcrowd/library.brand-page 5.14.8-flacky-nav-21 → 5.14.8

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 (97) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-C7UP0wnU.js → CreatedOnBrandCrowd-de-de-CiXGpUsj.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-Dn7kLByA.js → CreatedOnBrandCrowd-en-us-BjBeAHIJ.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-BniaWIta.js → CreatedOnBrandCrowd-es-es-COz-dVj5.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-L19SCOKe.js → CreatedOnBrandCrowd-fr-fr-DdRo8IoH.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-pt-pt-yF1hS_QN.js → CreatedOnBrandCrowd-pt-pt-YPxQ1gbj.js} +1 -1
  6. package/lib/src/{CreatedOnDcom-de-de-COoIYzR_.js → CreatedOnDcom-de-de-DeUP5Ur5.js} +1 -1
  7. package/lib/src/{CreatedOnDcom-en-us-DPxw4zug.js → CreatedOnDcom-en-us-BjaQwhMw.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-es-es-B6sdWmmP.js → CreatedOnDcom-es-es-CYexVJc5.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-fr-fr-C_P7GYue.js → CreatedOnDcom-fr-fr-BktbLTrT.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-pt-pt-QAdIC2fu.js → CreatedOnDcom-pt-pt-HnEwifku.js} +1 -1
  11. package/lib/src/brand-page/constants/logo.constants.d.ts +0 -1
  12. package/lib/src/brand-page/constants/logo.constants.js +0 -2
  13. package/lib/src/brand-page/constants/styles.constants.d.ts +2 -2
  14. package/lib/src/brand-page/constants/styles.constants.js +2 -2
  15. package/lib/src/brand-page/utils/migration/migration-01.d.ts +2 -3
  16. package/lib/src/brand-page/utils/migration/migration-01.js +2 -3
  17. package/lib/src/brand-page/utils/migration/migration-01_1.d.ts +3 -4
  18. package/lib/src/brand-page/utils/migration/migration-01_1.js +2 -3
  19. package/lib/src/brand-page/utils/migration/migration-02.d.ts +3 -4
  20. package/lib/src/brand-page/utils/migration/migration-02.js +2 -3
  21. package/lib/src/brand-page/utils/migration/migration-03.d.ts +3 -4
  22. package/lib/src/brand-page/utils/migration/migration-03.js +2 -3
  23. package/lib/src/brand-page/utils/migration/migration-04.d.ts +3 -4
  24. package/lib/src/brand-page/utils/migration/migration-04.js +2 -3
  25. package/lib/src/brand-page/utils/migration/migration-05.d.ts +2 -6
  26. package/lib/src/brand-page/utils/migration/migration-05.js +2 -3
  27. package/lib/src/brand-page/utils/migration/migration-05_1.d.ts +3 -3
  28. package/lib/src/brand-page/utils/migration/migration-05_1.js +3 -3
  29. package/lib/src/brand-page/utils/migration/migration-05_2.d.ts +3 -3
  30. package/lib/src/brand-page/utils/migration/migration-05_2.js +2 -3
  31. package/lib/src/brand-page/utils/migration.util.d.ts +1 -6
  32. package/lib/src/brand-page/utils/migration.util.js +6 -16
  33. package/lib/src/brand-page/utils/view-model.util.d.ts +4 -6
  34. package/lib/src/brand-page/utils/view-model.util.js +13 -14
  35. package/lib/src/brand-page/view-models.d.ts +0 -1
  36. package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +1 -1
  37. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +1 -1
  38. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.d.ts +0 -1
  39. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.js +2 -48
  40. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.d.ts +1 -1
  41. package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.d.ts +0 -1122
  42. package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.js +0 -1058
  43. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +1 -1
  44. package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.d.ts +1 -1
  45. package/lib/src/brand-page-maker/components/google-analytics/GoogleAnalytics.mixin.d.ts +1 -1
  46. package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +1 -1
  47. package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +1 -1
  48. package/lib/src/brand-page-maker/components/social-share/SocialShare.mixin.d.ts +1 -1
  49. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +1 -1
  50. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.d.ts +1 -2
  51. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +2 -3
  52. package/lib/src/css/library.brand-page-brandCrowd.min.css +6 -3
  53. package/lib/src/css/library.brand-page-brandPage.min.css +6 -3
  54. package/lib/src/css/library.brand-page-designCom.min.css +6 -3
  55. package/lib/src/css/library.brand-page-preview.min.css +6 -3
  56. package/lib/src/index.mjs +1 -1
  57. package/lib/src/{lib-BX6A4JdA.js → lib-BXmT_3as.js} +8015 -8149
  58. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +1 -1
  59. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +1 -1
  60. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +1 -1
  61. package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +1 -1
  62. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +1 -1
  63. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +1 -1
  64. package/lib/src/shared/page-settings/store/page-settings-store.js +1 -1
  65. package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +1 -1
  66. package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +1 -1
  67. package/lib/src/shared/template-settings/store/template-settings-store.js +1 -2
  68. package/package.json +1 -1
  69. package/src/brand-page/components/logo/Logo.vue +1 -24
  70. package/src/brand-page/components/logo/LogoRender.vue +20 -56
  71. package/src/brand-page/constants/logo.constants.ts +0 -3
  72. package/src/brand-page/constants/styles.constants.ts +2 -2
  73. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +1112 -1121
  74. package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +413 -416
  75. package/src/brand-page/utils/migration/logo/migration.util.logo.test.ts +3 -3
  76. package/src/brand-page/utils/migration/migration-01.ts +4 -7
  77. package/src/brand-page/utils/migration/migration-01_1.ts +3 -6
  78. package/src/brand-page/utils/migration/migration-02.ts +4 -7
  79. package/src/brand-page/utils/migration/migration-03.ts +4 -7
  80. package/src/brand-page/utils/migration/migration-04.ts +4 -7
  81. package/src/brand-page/utils/migration/migration-05.ts +3 -16
  82. package/src/brand-page/utils/migration/migration-05_1.ts +4 -6
  83. package/src/brand-page/utils/migration/migration-05_2.ts +3 -6
  84. package/src/brand-page/utils/migration.util.test.ts +157 -274
  85. package/src/brand-page/utils/migration.util.ts +9 -26
  86. package/src/brand-page/utils/migration2.util.test.ts +2 -7
  87. package/src/brand-page/utils/view-model.util.ts +7 -26
  88. package/src/brand-page/view-models.ts +0 -1
  89. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.ts +1 -52
  90. package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.ts +0 -1090
  91. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +1 -4
  92. package/src/shared/page-settings/store/page-settings-store.ts +0 -1
  93. package/src/shared/template-settings/store/template-settings-store.ts +1 -2
  94. package/lib/src/brand-page/utils/migration/migration-06.d.ts +0 -4
  95. package/lib/src/brand-page/utils/migration/migration-06.js +0 -60
  96. package/src/brand-page/utils/migration/migration-06.test.ts +0 -384
  97. 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', async () => {
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 { brandPageModel } = await migrateBrandPageModel(
19
+ const brandPageModel = migrateBrandPageModel(
20
20
  new BrandPageModel(brandsiteMigrationBrandPageData as any),
21
- { isUserDraft: true, isServerRender: false },
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 = async (
1159
- migrationResult: MigrationData,
1157
+ export const migration01 = (
1158
+ brandPageModel: BrandPageModel,
1160
1159
  options: {
1161
1160
  isUserDraft: boolean;
1162
1161
  },
1163
- ): Promise<MigrationData> => {
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 migrationResult;
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
- migrationResult: MigrationData,
6
+ brandPageModel: BrandPageModel,
8
7
  options: {
9
8
  logoImage?: LogoImageModel;
10
9
  },
11
- ): MigrationData => {
12
- const { brandPageModel } = migrationResult;
13
-
10
+ ): BrandPageModel => {
14
11
  migrateLogoImage(brandPageModel, options.logoImage);
15
12
 
16
- return migrationResult;
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 = async (
95
- migrationResult: MigrationData,
93
+ export const migration02 = (
94
+ brandPageModel: BrandPageModel,
96
95
  options: {
97
96
  logoImage?: LogoImageModel;
98
97
  isUserDraft: boolean;
99
98
  },
100
- ): Promise<MigrationData> => {
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 migrationResult;
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 = async (
74
- migrationResult: MigrationData,
72
+ export const migration03 = (
73
+ brandPageModel: BrandPageModel,
75
74
  options: {
76
75
  logoImage?: LogoImageModel;
77
76
  isUserDraft: boolean;
78
77
  },
79
- ): Promise<MigrationData> => {
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 migrationResult;
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 = async (
126
- migrationResult: MigrationData,
124
+ export const migration04 = (
125
+ brandPageModel: BrandPageModel,
127
126
  options: { logoImage?: LogoImageModel; isUserDraft: boolean },
128
- ): Promise<MigrationData> => {
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 migrationResult;
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 = async (
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 migrationResult;
19
+ return brandPageModel;
33
20
  };
@@ -1,11 +1,9 @@
1
- import type { MigrationData } from '../migration.util';
1
+ import { type BrandPageModel } from '../..';
2
2
 
3
3
  export const migration05_1 = (
4
- migrationResult: MigrationData,
4
+ brandPageModel: BrandPageModel,
5
5
  options: { isUserDraft: boolean },
6
- ): MigrationData => {
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 migrationResult;
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
- migrationResult: MigrationData,
4
+ brandPageModel: BrandPageModel,
6
5
  options: { isUserDraft: boolean },
7
- ): MigrationData => {
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 migrationResult;
19
+ return brandPageModel;
23
20
  };