@designcrowd/library.brand-page 5.14.17-flacky-test-3 → 5.14.17

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 (107) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-D_Netur8.js → CreatedOnBrandCrowd-de-de-ByNPc8Hb.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-BT1956Lx.js → CreatedOnBrandCrowd-en-us-DmEUyEY8.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-DFolew8L.js → CreatedOnBrandCrowd-es-es-pj4tJF5b.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-sHyUVqsi.js → CreatedOnBrandCrowd-fr-ca-Bk81kSzP.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-sHyUVqsi.js → CreatedOnBrandCrowd-fr-fr-Bk81kSzP.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-Cu-nTK8_.js → CreatedOnBrandCrowd-pt-br-CnVFU3A5.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-Cu-nTK8_.js → CreatedOnBrandCrowd-pt-pt-CnVFU3A5.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-CvXHpsM6.js → CreatedOnDcom-de-de-D8HLLDmb.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-BNHxhIEl.js → CreatedOnDcom-en-us-Dnx_Owbc.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-VAuTuUAi.js → CreatedOnDcom-es-es-DMxVfNN1.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-CTZIVHGo.js → CreatedOnDcom-fr-ca-ByvP9wW6.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-oWkWPMR7.js → CreatedOnDcom-fr-fr-vvM5o0f2.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-B5jf-LsO.js → CreatedOnDcom-pt-br-BKkbOxEh.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-7sbRxkuu.js → CreatedOnDcom-pt-pt-DmEgNPdM.js} +1 -1
  15. package/lib/src/brand-page/constants/logo.constants.d.ts +0 -1
  16. package/lib/src/brand-page/constants/logo.constants.js +0 -2
  17. package/lib/src/brand-page/constants/styles.constants.d.ts +2 -2
  18. package/lib/src/brand-page/constants/styles.constants.js +2 -2
  19. package/lib/src/brand-page/utils/logo.util.js +3 -3
  20. package/lib/src/brand-page/utils/migration/migration-01.d.ts +2 -3
  21. package/lib/src/brand-page/utils/migration/migration-01.js +2 -3
  22. package/lib/src/brand-page/utils/migration/migration-01_1.d.ts +3 -4
  23. package/lib/src/brand-page/utils/migration/migration-01_1.js +2 -3
  24. package/lib/src/brand-page/utils/migration/migration-02.d.ts +3 -4
  25. package/lib/src/brand-page/utils/migration/migration-02.js +2 -3
  26. package/lib/src/brand-page/utils/migration/migration-03.d.ts +3 -4
  27. package/lib/src/brand-page/utils/migration/migration-03.js +2 -3
  28. package/lib/src/brand-page/utils/migration/migration-04.d.ts +3 -4
  29. package/lib/src/brand-page/utils/migration/migration-04.js +2 -3
  30. package/lib/src/brand-page/utils/migration/migration-05.d.ts +2 -6
  31. package/lib/src/brand-page/utils/migration/migration-05.js +2 -3
  32. package/lib/src/brand-page/utils/migration/migration-05_1.d.ts +3 -3
  33. package/lib/src/brand-page/utils/migration/migration-05_1.js +3 -3
  34. package/lib/src/brand-page/utils/migration/migration-05_2.d.ts +3 -3
  35. package/lib/src/brand-page/utils/migration/migration-05_2.js +2 -3
  36. package/lib/src/brand-page/utils/migration/migration-06.d.ts +2 -2
  37. package/lib/src/brand-page/utils/migration/migration-06.js +2 -3
  38. package/lib/src/brand-page/utils/migration.util.d.ts +1 -6
  39. package/lib/src/brand-page/utils/migration.util.js +7 -18
  40. package/lib/src/brand-page/utils/view-model.util.d.ts +4 -6
  41. package/lib/src/brand-page/utils/view-model.util.js +13 -14
  42. package/lib/src/brand-page/view-models.d.ts +0 -1
  43. package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +1 -1
  44. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +1 -1
  45. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.d.ts +0 -1
  46. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.js +2 -48
  47. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.d.ts +1 -1
  48. package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.d.ts +0 -1122
  49. package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.js +0 -1058
  50. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +1 -1
  51. package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.d.ts +1 -1
  52. package/lib/src/brand-page-maker/components/google-analytics/GoogleAnalytics.mixin.d.ts +1 -1
  53. package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +1 -1
  54. package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +1 -1
  55. package/lib/src/brand-page-maker/components/social-share/SocialShare.mixin.d.ts +1 -1
  56. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +1 -1
  57. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.d.ts +1 -2
  58. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +2 -3
  59. package/lib/src/css/library.brand-page-brandCrowd.min.css +6 -3
  60. package/lib/src/css/library.brand-page-brandPage.min.css +6 -3
  61. package/lib/src/css/library.brand-page-designCom.min.css +6 -3
  62. package/lib/src/css/library.brand-page-preview.min.css +6 -3
  63. package/lib/src/index.mjs +1 -1
  64. package/lib/src/{lib-T70Kkdpn.js → lib-BnLnBPH_.js} +16196 -16334
  65. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +1 -1
  66. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +1 -1
  67. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +1 -1
  68. package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +1 -1
  69. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +1 -1
  70. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +1 -1
  71. package/lib/src/shared/page-settings/store/page-settings-store.js +1 -1
  72. package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +1 -1
  73. package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +1 -1
  74. package/lib/src/shared/template-settings/store/template-settings-store.js +1 -2
  75. package/package.json +1 -1
  76. package/src/brand-page/components/logo/Logo.vue +1 -25
  77. package/src/brand-page/components/logo/LogoRender.vue +20 -56
  78. package/src/brand-page/constants/logo.constants.ts +0 -3
  79. package/src/brand-page/constants/styles.constants.ts +2 -2
  80. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +1112 -1121
  81. package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +413 -416
  82. package/src/brand-page/utils/logo.util.test.ts +3 -3
  83. package/src/brand-page/utils/logo.util.ts +3 -3
  84. package/src/brand-page/utils/migration/logo/migration.util.logo.test.ts +3 -3
  85. package/src/brand-page/utils/migration/migration-01.ts +4 -7
  86. package/src/brand-page/utils/migration/migration-01_1.ts +3 -6
  87. package/src/brand-page/utils/migration/migration-02.ts +4 -7
  88. package/src/brand-page/utils/migration/migration-03.ts +4 -7
  89. package/src/brand-page/utils/migration/migration-04.ts +4 -7
  90. package/src/brand-page/utils/migration/migration-05.ts +3 -16
  91. package/src/brand-page/utils/migration/migration-05_1.ts +4 -6
  92. package/src/brand-page/utils/migration/migration-05_2.ts +3 -6
  93. package/src/brand-page/utils/migration/migration-06.ts +2 -5
  94. package/src/brand-page/utils/migration.util.test.ts +157 -274
  95. package/src/brand-page/utils/migration.util.ts +10 -29
  96. package/src/brand-page/utils/migration2.util.test.ts +2 -7
  97. package/src/brand-page/utils/view-model.util.ts +7 -26
  98. package/src/brand-page/view-models.ts +0 -1
  99. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.ts +1 -52
  100. package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.ts +0 -1090
  101. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +1 -4
  102. package/src/shared/page-settings/store/page-settings-store.ts +0 -1
  103. package/src/shared/template-settings/store/template-settings-store.ts +1 -2
  104. package/lib/src/brand-page/utils/migration/migration-07.d.ts +0 -4
  105. package/lib/src/brand-page/utils/migration/migration-07.js +0 -60
  106. package/src/brand-page/utils/migration/migration-07.test.ts +0 -384
  107. package/src/brand-page/utils/migration/migration-07.ts +0 -107
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-T70Kkdpn.js";
2
+ import { _ as t } from "./lib-BnLnBPH_.js";
3
3
  const i = {}, h = {
4
4
  width: "275",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-T70Kkdpn.js";
2
+ import { _ as t } from "./lib-BnLnBPH_.js";
3
3
  const i = {}, h = {
4
4
  width: "251",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-T70Kkdpn.js";
2
+ import { _ as t } from "./lib-BnLnBPH_.js";
3
3
  const i = {}, h = {
4
4
  width: "250",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-T70Kkdpn.js";
2
+ import { _ as t } from "./lib-BnLnBPH_.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-T70Kkdpn.js";
2
+ import { _ as t } from "./lib-BnLnBPH_.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-T70Kkdpn.js";
2
+ import { _ as t } from "./lib-BnLnBPH_.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-T70Kkdpn.js";
2
+ import { _ as t } from "./lib-BnLnBPH_.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-T70Kkdpn.js";
2
+ import { _ as e } from "./lib-BnLnBPH_.js";
3
3
  const M = {}, Z = {
4
4
  width: "242",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-T70Kkdpn.js";
2
+ import { _ as e } from "./lib-BnLnBPH_.js";
3
3
  const i = {}, M = {
4
4
  width: "231",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-T70Kkdpn.js";
2
+ import { _ as e } from "./lib-BnLnBPH_.js";
3
3
  const M = {}, Z = {
4
4
  width: "230",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-T70Kkdpn.js";
2
+ import { _ as e } from "./lib-BnLnBPH_.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-T70Kkdpn.js";
2
+ import { _ as e } from "./lib-BnLnBPH_.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-T70Kkdpn.js";
2
+ import { _ as M } from "./lib-BnLnBPH_.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-T70Kkdpn.js";
2
+ import { _ as M } from "./lib-BnLnBPH_.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -5,4 +5,3 @@ export declare const LOGO_VARIATION: {
5
5
  TEXT_ONLY_WITH_TRANSPARENT_BACKGROUND: number;
6
6
  };
7
7
  export declare const DEFAULT_LOGO_VARIATION: number;
8
- export declare const LOGO_MIGRATION_VERSION = 6;
@@ -5,5 +5,3 @@ export const LOGO_VARIATION = {
5
5
  TEXT_ONLY_WITH_TRANSPARENT_BACKGROUND: 3,
6
6
  };
7
7
  export const DEFAULT_LOGO_VARIATION = LOGO_VARIATION.LOGO_WITH_TRANSPARENT_BACKGROUND;
8
- // migrating logo images to a fixed height
9
- export const LOGO_MIGRATION_VERSION = 6;
@@ -16,9 +16,9 @@ export declare const defaultHamburgerNavigation: {
16
16
  export declare const OLD_DEFAULT_LOGO_HEIGHT = "6rem";
17
17
  export declare const DEFAULT_LOGO_HEIGHT = "9rem";
18
18
  export declare const DEFAULT_LOGO_WIDTH = "9rem";
19
- export declare const LOGO_SLIDER_DESKTOP_MIN = 1;
19
+ export declare const LOGO_SLIDER_DESKTOP_MIN = 5;
20
20
  export declare const LOGO_SLIDER_DESKTOP_MAX = 20;
21
- export declare const LOGO_SLIDER_MOBILE_MIN = 1;
21
+ export declare const LOGO_SLIDER_MOBILE_MIN = 4;
22
22
  export declare const LOGO_SLIDER_MOBILE_MAX = 13;
23
23
  export declare const CONTENT_TEXT_STYLE_PROPERTY_KEYS: {
24
24
  readonly descriptionStyle: "descriptionStyle";
@@ -18,9 +18,9 @@ export const OLD_DEFAULT_LOGO_HEIGHT = '6rem';
18
18
  export const DEFAULT_LOGO_HEIGHT = '9rem';
19
19
  export const DEFAULT_LOGO_WIDTH = '9rem';
20
20
  // Logo slider values are unit of rem
21
- export const LOGO_SLIDER_DESKTOP_MIN = 1;
21
+ export const LOGO_SLIDER_DESKTOP_MIN = 5;
22
22
  export const LOGO_SLIDER_DESKTOP_MAX = 20;
23
- export const LOGO_SLIDER_MOBILE_MIN = 1;
23
+ export const LOGO_SLIDER_MOBILE_MIN = 4;
24
24
  export const LOGO_SLIDER_MOBILE_MAX = 13;
25
25
  export const CONTENT_TEXT_STYLE_PROPERTY_KEYS = {
26
26
  descriptionStyle: 'descriptionStyle',
@@ -175,9 +175,9 @@ export const getOptimalLogoSize = (width, height, currentSize) => {
175
175
  if (!parseFloat(`${aspectRatio}`) || aspectRatio <= 1) {
176
176
  return currentSize;
177
177
  }
178
- const newSize = parseFloat(currentSize) + (aspectRatio - 1) * 4.5;
179
- if (newSize > 11) {
180
- return '11rem';
178
+ const newSize = parseFloat(currentSize) + (aspectRatio - 1) * 10;
179
+ if (newSize > 16) {
180
+ return '16rem';
181
181
  }
182
182
  else {
183
183
  return `${Math.round(newSize)}rem`;
@@ -1,5 +1,4 @@
1
1
  import type { BrandPageModel } from '../../';
2
- import { type MigrationData } from '../../utils';
3
2
  export declare const applyTextContentTextToTextItemsMigration: (brandPageModel: BrandPageModel) => void;
4
3
  export declare const migrateProfileContentToHaveTextStyles: (brandPageModel: BrandPageModel) => void;
5
4
  export declare const migrateMailingListContentToHaveTextStyles: (brandPageModel: BrandPageModel) => void;
@@ -18,6 +17,6 @@ export declare const migrateNewLogoLogic: (brandPageModel: BrandPageModel, isUse
18
17
  export declare const migrateGlobalTextStylesToHaveMissingStyles: (brandPageModel: BrandPageModel) => void;
19
18
  export declare const migrateConvertLineHeightOnNavigationStyles: (brandPageModel: BrandPageModel) => void;
20
19
  export declare const migrateConvertLineHeightOnFooterStyles: (brandPageModel: BrandPageModel) => void;
21
- export declare const migration01: (migrationResult: MigrationData, options: {
20
+ export declare const migration01: (brandPageModel: BrandPageModel, options: {
22
21
  isUserDraft: boolean;
23
- }) => Promise<MigrationData>;
22
+ }) => BrandPageModel;
@@ -856,8 +856,7 @@ export const migrateConvertLineHeightOnFooterStyles = (brandPageModel) => {
856
856
  };
857
857
  }
858
858
  };
859
- export const migration01 = async (migrationResult, options) => {
860
- const { brandPageModel } = migrationResult;
859
+ export const migration01 = (brandPageModel, options) => {
861
860
  if (!brandPageModel.brandPageType) {
862
861
  brandPageModel.brandPageType = BRAND_PAGE_TYPES.default;
863
862
  }
@@ -889,5 +888,5 @@ export const migration01 = async (migrationResult, options) => {
889
888
  migrateGlobalTextStylesToHaveMissingStyles(brandPageModel);
890
889
  migrateConvertLineHeightOnNavigationStyles(brandPageModel);
891
890
  migrateConvertLineHeightOnFooterStyles(brandPageModel);
892
- return migrationResult;
891
+ return brandPageModel;
893
892
  };
@@ -1,5 +1,4 @@
1
- import type { LogoImageModel } from '../..';
2
- import type { MigrationData } from '../migration.util';
3
- export declare const migration01_1: (migrationResult: MigrationData, options: {
1
+ import type { BrandPageModel, LogoImageModel } from '../..';
2
+ export declare const migration01_1: (brandPageModel: BrandPageModel, options: {
4
3
  logoImage?: LogoImageModel;
5
- }) => MigrationData;
4
+ }) => BrandPageModel;
@@ -1,6 +1,5 @@
1
1
  import { migrateLogoImage } from './logo/logo.migration.util';
2
- export const migration01_1 = (migrationResult, options) => {
3
- const { brandPageModel } = migrationResult;
2
+ export const migration01_1 = (brandPageModel, options) => {
4
3
  migrateLogoImage(brandPageModel, options.logoImage);
5
- return migrationResult;
4
+ return brandPageModel;
6
5
  };
@@ -1,7 +1,6 @@
1
- import { type LogoImageModel } from '../..';
2
- import type { MigrationData } from '../migration.util';
1
+ import { type BrandPageModel, type LogoImageModel } from '../..';
3
2
  export declare const convertLetterSpacingRemToEm: (fontSizeInEmOrRem: string | undefined, letterSpacingRemValue: string | undefined) => string | undefined;
4
- export declare const migration02: (migrationResult: MigrationData, options: {
3
+ export declare const migration02: (brandPageModel: BrandPageModel, options: {
5
4
  logoImage?: LogoImageModel;
6
5
  isUserDraft: boolean;
7
- }) => Promise<MigrationData>;
6
+ }) => BrandPageModel;
@@ -31,8 +31,7 @@ const handleConversion = (style) => {
31
31
  }
32
32
  style.letterSpacing = convertLetterSpacingRemToEm(style.fontSize, style.letterSpacing);
33
33
  };
34
- export const migration02 = async (migrationResult, options) => {
35
- const { brandPageModel } = migrationResult;
34
+ export const migration02 = (brandPageModel, options) => {
36
35
  handleConversion(brandPageModel.pageHeaderDesktop?.navigation?.defaultButtonStyle);
37
36
  handleConversion(brandPageModel.pageHeaderMobile?.navigation?.defaultButtonStyle);
38
37
  handleConversion(brandPageModel.pageFooterDesktop?.copyrightStyle);
@@ -128,5 +127,5 @@ export const migration02 = async (migrationResult, options) => {
128
127
  }
129
128
  });
130
129
  });
131
- return migrationResult;
130
+ return brandPageModel;
132
131
  };
@@ -1,6 +1,5 @@
1
- import { type LogoImageModel } from '../..';
2
- import type { MigrationData } from '../migration.util';
3
- export declare const migration03: (migrationResult: MigrationData, options: {
1
+ import { type BrandPageModel, type LogoImageModel } from '../..';
2
+ export declare const migration03: (brandPageModel: BrandPageModel, options: {
4
3
  logoImage?: LogoImageModel;
5
4
  isUserDraft: boolean;
6
- }) => Promise<MigrationData>;
5
+ }) => BrandPageModel;
@@ -28,8 +28,7 @@ const migrateApplyAutoScaleProperty = (brandPageType, textStyle) => {
28
28
  textStyle.applyAutoScale =
29
29
  brandPageType && brandPageType === BRAND_PAGE_TYPES.brandSite;
30
30
  };
31
- export const migration03 = async (migrationResult, options) => {
32
- const { brandPageModel } = migrationResult;
31
+ export const migration03 = (brandPageModel, options) => {
33
32
  handleRecursiveFontSizeMigration(brandPageModel.pageHeaderDesktop);
34
33
  handleRecursiveFontSizeMigration(brandPageModel.pageHeaderMobile);
35
34
  handleRecursiveFontSizeMigration(brandPageModel.pageFooterDesktop);
@@ -117,5 +116,5 @@ export const migration03 = async (migrationResult, options) => {
117
116
  }
118
117
  });
119
118
  });
120
- return migrationResult;
119
+ return brandPageModel;
121
120
  };
@@ -1,6 +1,5 @@
1
- import { type LogoImageModel } from '../..';
2
- import type { MigrationData } from '../migration.util';
3
- export declare const migration04: (migrationResult: MigrationData, options: {
1
+ import { type BrandPageModel, type LogoImageModel } from '../..';
2
+ export declare const migration04: (brandPageModel: BrandPageModel, options: {
4
3
  logoImage?: LogoImageModel;
5
4
  isUserDraft: boolean;
6
- }) => Promise<MigrationData>;
5
+ }) => BrandPageModel;
@@ -86,8 +86,7 @@ const updateUserUploadedImageUrls = (content) => {
86
86
  });
87
87
  }
88
88
  };
89
- export const migration04 = async (migrationResult, options) => {
90
- const { brandPageModel } = migrationResult;
89
+ export const migration04 = (brandPageModel, options) => {
91
90
  if (brandPageModel.faviconUrl &&
92
91
  isUserUploadedImage(brandPageModel.faviconUrl)) {
93
92
  brandPageModel.faviconUrl = removeUserImageExtension(brandPageModel.faviconUrl);
@@ -112,5 +111,5 @@ export const migration04 = async (migrationResult, options) => {
112
111
  }
113
112
  });
114
113
  }
115
- return migrationResult;
114
+ return brandPageModel;
116
115
  };
@@ -1,6 +1,2 @@
1
- import { type LogoImageModel } from '../..';
2
- import type { MigrationData } from '../migration.util';
3
- export declare const migration05: (migrationResult: MigrationData, options: {
4
- logoImage?: LogoImageModel;
5
- isUserDraft: boolean;
6
- }) => Promise<MigrationData>;
1
+ import { type BrandPageModel } from '../..';
2
+ export declare const migration05: (brandPageModel: BrandPageModel) => BrandPageModel;
@@ -1,7 +1,6 @@
1
1
  import {} from '../..';
2
2
  import { isTextContent } from '../model.util';
3
- export const migration05 = async (migrationResult, options) => {
4
- const { brandPageModel } = migrationResult;
3
+ export const migration05 = (brandPageModel) => {
5
4
  brandPageModel.pages.forEach((page) => {
6
5
  page.contents.forEach((content) => {
7
6
  if (isTextContent(content)) {
@@ -14,5 +13,5 @@ export const migration05 = async (migrationResult, options) => {
14
13
  }
15
14
  });
16
15
  });
17
- return migrationResult;
16
+ return brandPageModel;
18
17
  };
@@ -1,4 +1,4 @@
1
- import type { MigrationData } from '../migration.util';
2
- export declare const migration05_1: (migrationResult: MigrationData, options: {
1
+ import { type BrandPageModel } from '../..';
2
+ export declare const migration05_1: (brandPageModel: BrandPageModel, options: {
3
3
  isUserDraft: boolean;
4
- }) => MigrationData;
4
+ }) => BrandPageModel;
@@ -1,5 +1,5 @@
1
- export const migration05_1 = (migrationResult, options) => {
2
- const { brandPageModel } = migrationResult;
1
+ import {} from '../..';
2
+ export const migration05_1 = (brandPageModel, options) => {
3
3
  if (!options.isUserDraft) {
4
4
  brandPageModel.pageFooterDesktop?.socialLinks?.forEach((link) => {
5
5
  if (link.imageUrl === 'twitter') {
@@ -14,5 +14,5 @@ export const migration05_1 = (migrationResult, options) => {
14
14
  }
15
15
  });
16
16
  }
17
- return migrationResult;
17
+ return brandPageModel;
18
18
  };
@@ -1,4 +1,4 @@
1
- import type { MigrationData } from '../migration.util';
2
- export declare const migration05_2: (migrationResult: MigrationData, options: {
1
+ import { type BrandPageModel } from '../..';
2
+ export declare const migration05_2: (brandPageModel: BrandPageModel, options: {
3
3
  isUserDraft: boolean;
4
- }) => MigrationData;
4
+ }) => BrandPageModel;
@@ -1,6 +1,5 @@
1
1
  import {} from '../..';
2
- export const migration05_2 = (migrationResult, options) => {
3
- const { brandPageModel } = migrationResult;
2
+ export const migration05_2 = (brandPageModel, options) => {
4
3
  brandPageModel.pages.forEach((page) => {
5
4
  page.contents.forEach((content) => {
6
5
  // Casting content type to string to avoid adding placeholder types in CONTENT_SETTINGS_CONFIGS
@@ -11,5 +10,5 @@ export const migration05_2 = (migrationResult, options) => {
11
10
  }
12
11
  });
13
12
  });
14
- return migrationResult;
13
+ return brandPageModel;
15
14
  };
@@ -1,2 +1,2 @@
1
- import type { MigrationData } from '../migration.util';
2
- export declare const migration06: (migrationResult: MigrationData) => MigrationData;
1
+ import { type BrandPageModel } from '../..';
2
+ export declare const migration06: (brandPageModel: BrandPageModel) => BrandPageModel;
@@ -1,7 +1,6 @@
1
1
  import {} from '../..';
2
2
  import { isImagesContent } from '../model.util';
3
- export const migration06 = (migrationResult) => {
4
- const { brandPageModel } = migrationResult;
3
+ export const migration06 = (brandPageModel) => {
5
4
  brandPageModel.pages.forEach((page) => {
6
5
  page.contents.forEach((content) => {
7
6
  // Migration for ImagesSection content
@@ -45,5 +44,5 @@ export const migration06 = (migrationResult) => {
45
44
  }
46
45
  });
47
46
  });
48
- return migrationResult;
47
+ return brandPageModel;
49
48
  };
@@ -1,11 +1,6 @@
1
1
  import { type BrandPageModel, type LogoImageModel } from '../models';
2
- export interface MigrationData {
3
- brandPageModel: BrandPageModel;
4
- useOldLogoRenderSize: boolean;
5
- }
6
2
  export declare const GetLatestModelVersion: () => number;
7
3
  export declare const migrateBrandPageModel: (brandPageModel: BrandPageModel, options: {
8
4
  logoImage?: LogoImageModel;
9
5
  isUserDraft: boolean;
10
- isServerRender: boolean;
11
- }) => Promise<MigrationData>;
6
+ }) => BrandPageModel;
@@ -1,4 +1,3 @@
1
- import { LOGO_MIGRATION_VERSION } from '../constants';
2
1
  import {} from '../models';
3
2
  import { migration01 } from './migration/migration-01';
4
3
  import { migration01_1 } from './migration/migration-01_1';
@@ -6,10 +5,9 @@ import { migration02 } from './migration/migration-02';
6
5
  import { migration03 } from './migration/migration-03';
7
6
  import { migration04 } from './migration/migration-04';
8
7
  import { migration05 } from './migration/migration-05';
9
- import { migration06 } from './migration/migration-06';
10
8
  import { migration05_1 } from './migration/migration-05_1';
11
9
  import { migration05_2 } from './migration/migration-05_2';
12
- import { migration07 } from './migration/migration-07';
10
+ import { migration06 } from './migration/migration-06';
13
11
  const MIGRATION_TABLE = [
14
12
  {
15
13
  version: 1,
@@ -57,28 +55,19 @@ const MIGRATION_TABLE = [
57
55
  migrateFn: migration06,
58
56
  description: 'Migrating new fields for images section',
59
57
  },
60
- {
61
- version: 7,
62
- migrateFn: migration07,
63
- description: 'Migrating logo render sizes for logo content, header and footer sections',
64
- },
65
58
  ];
66
59
  export const GetLatestModelVersion = () => Math.max(...MIGRATION_TABLE.map((x) => x.version));
67
- export const migrateBrandPageModel = async (brandPageModel, options) => {
60
+ export const migrateBrandPageModel = (brandPageModel, options) => {
68
61
  let modelVersion = brandPageModel.v;
69
- let migrationResult = {
70
- brandPageModel,
71
- useOldLogoRenderSize: false,
72
- };
73
62
  if (!modelVersion) {
74
63
  modelVersion = 0;
75
64
  }
76
- for (const x of MIGRATION_TABLE) {
65
+ MIGRATION_TABLE.forEach((x) => {
77
66
  if (x.runAlways || modelVersion < x.version) {
78
- migrationResult = await x.migrateFn(migrationResult, options);
67
+ brandPageModel = x.migrateFn(brandPageModel, options);
79
68
  }
80
- }
69
+ });
81
70
  // Set the model to latest version
82
- migrationResult.brandPageModel.v = GetLatestModelVersion();
83
- return migrationResult;
71
+ brandPageModel.v = GetLatestModelVersion();
72
+ return brandPageModel;
84
73
  };
@@ -8,12 +8,10 @@ export declare const mapToTextViewModel: (content: TextContent, styles: PageStyl
8
8
  export declare const mapToBannerSectionViewModel: (content: BannerSectionContent, styles: PageStyles) => BannerSectionViewModel;
9
9
  export declare const mapToImagesSectionViewModel: (content: ImagesSectionContent, styles: PageStyles, brandPageType: BrandPageType) => TextImageSectionViewModel;
10
10
  export declare const mapToBookingSectionViewModel: (content: BookingSectionContent, styles: PageStyles) => BookingSectionViewModel;
11
- export declare const mapToPageHeaderViewModel: (pageHeader: PageHeaderDesktop | PageHeaderMobile, pageStyles: PageStyles, pages: PageViewModel[], useOldLogoRenderSize?: boolean) => PageHeaderViewModel;
12
- export declare const mapToPageFooterViewModel: (pageFooter: PageFooterDesktop | PageFooterMobile, pageStyles: PageStyles, useOldLogoRenderSize?: boolean) => PageFooterViewModel;
13
- export declare const mapToViewModel: (styles: PageStyles, brandPageType: BrandPageType, options?: {
14
- useOldLogoRenderSize: boolean;
15
- }) => (content: Content) => ContentViewModel | undefined;
16
- export declare const getBrandPageViewModelFromBrandPageModel: (model: BrandPageModel, brandPageToken: string | undefined, showBrandCrowdLogo?: boolean, useOldLogoRenderSize?: boolean) => BrandPageViewModel;
11
+ export declare const mapToPageHeaderViewModel: (pageHeader: PageHeaderDesktop | PageHeaderMobile, pageStyles: PageStyles, pages: PageViewModel[]) => PageHeaderViewModel;
12
+ export declare const mapToPageFooterViewModel: (pageFooter: PageFooterDesktop | PageFooterMobile, pageStyles: PageStyles) => PageFooterViewModel;
13
+ export declare const mapToViewModel: (styles: PageStyles, brandPageType: BrandPageType) => (content: Content) => ContentViewModel | undefined;
14
+ export declare const getBrandPageViewModelFromBrandPageModel: (model: BrandPageModel, brandPageToken: string | undefined, showBrandCrowdLogo?: boolean) => BrandPageViewModel;
17
15
  export declare const isLogoViewModel: (viewModel: ContentViewModel) => viewModel is LogoViewModel;
18
16
  /** for service.brand-page website preview by logo draft token */
19
17
  export declare const applyLogoImageToBrandPageViewModel: (viewModel: BrandPageViewModel, logoImage: LogoImageModel) => BrandPageViewModel;
@@ -115,7 +115,7 @@ export const mapToImageGalleryViewModel = (content, globalStyles) => {
115
115
  styles: galleryStyles?.galleryType ? galleryStyles : globalStyles,
116
116
  };
117
117
  };
118
- const mapToLogoViewModel = (content, globalStyles, useOldLogoRenderSize, options) => {
118
+ const mapToLogoViewModel = (content, globalStyles, options) => {
119
119
  let background;
120
120
  if (content.backgroundStyle?.background &&
121
121
  isHexTransparent(content.backgroundStyle.background)) {
@@ -158,7 +158,6 @@ const mapToLogoViewModel = (content, globalStyles, useOldLogoRenderSize, options
158
158
  },
159
159
  },
160
160
  isVisible: content.isLogoVisible,
161
- useOldLogoRenderSize,
162
161
  });
163
162
  };
164
163
  const mapToVideoViewModel = (content, styles) => {
@@ -564,7 +563,7 @@ export const mapToBookingSectionViewModel = (content, styles) => {
564
563
  isFullWidth: true,
565
564
  }, styles);
566
565
  };
567
- export const mapToPageHeaderViewModel = (pageHeader, pageStyles, pages, useOldLogoRenderSize = false) => {
566
+ export const mapToPageHeaderViewModel = (pageHeader, pageStyles, pages) => {
568
567
  const viewport = pageHeader.viewport;
569
568
  const logoContent = {
570
569
  id: 'page-header-logo',
@@ -593,7 +592,7 @@ export const mapToPageHeaderViewModel = (pageHeader, pageStyles, pages, useOldLo
593
592
  }), {});
594
593
  return {
595
594
  displayStyle: pageHeader.displayStyle,
596
- logo: mapToLogoViewModel(logoContent, logoStyles, useOldLogoRenderSize),
595
+ logo: mapToLogoViewModel(logoContent, logoStyles),
597
596
  pages: pages.filter((p) => !p.isHidden),
598
597
  navigation: viewport === VIEWPORTS.mobile
599
598
  ? new NavigationMobile({
@@ -613,7 +612,7 @@ export const mapToPageHeaderViewModel = (pageHeader, pageStyles, pages, useOldLo
613
612
  backgroundColorEnabled: pageHeader.backgroundColorEnabled,
614
613
  };
615
614
  };
616
- export const mapToPageFooterViewModel = (pageFooter, pageStyles, useOldLogoRenderSize = false) => {
615
+ export const mapToPageFooterViewModel = (pageFooter, pageStyles) => {
617
616
  const { logoImageBase64Url, logoImage, logoTemplateImage, logoImageHeight, logoImageWidth, isLogoVisible, } = pageFooter;
618
617
  const logoContent = {
619
618
  id: 'page-header-logo',
@@ -637,12 +636,12 @@ export const mapToPageFooterViewModel = (pageFooter, pageStyles, useOldLogoRende
637
636
  copyrightStyle,
638
637
  displayStyle: pageFooter.displayStyle,
639
638
  iconStyle: Object.assign({ fill: pageStyles.textStyles?.style.color }, pageFooter.iconStyle),
640
- logo: mapToLogoViewModel(logoContent, logoStyles, useOldLogoRenderSize),
639
+ logo: mapToLogoViewModel(logoContent, logoStyles),
641
640
  socialLinks: pageFooter.socialLinks,
642
641
  textFontFamily: pageFooter.textFontFamily,
643
642
  };
644
643
  };
645
- export const mapToViewModel = (styles, brandPageType, options) => (content) => {
644
+ export const mapToViewModel = (styles, brandPageType) => (content) => {
646
645
  switch (content.type) {
647
646
  case 'image':
648
647
  return mapToImageViewModel(content);
@@ -652,7 +651,7 @@ export const mapToViewModel = (styles, brandPageType, options) => (content) => {
652
651
  if (brandPageType === BRAND_PAGE_TYPES.brandSite) {
653
652
  return undefined;
654
653
  }
655
- return mapToLogoViewModel(content, styles.logoStyles, options?.useOldLogoRenderSize || false, {
654
+ return mapToLogoViewModel(content, styles.logoStyles, {
656
655
  height: DEFAULT_LOGO_HEIGHT,
657
656
  width: DEFAULT_LOGO_WIDTH,
658
657
  });
@@ -709,10 +708,10 @@ export const mapToViewModel = (styles, brandPageType, options) => (content) => {
709
708
  assertUnreachable();
710
709
  }
711
710
  };
712
- export const getBrandPageViewModelFromBrandPageModel = (model, brandPageToken, showBrandCrowdLogo = true, useOldLogoRenderSize = false) => {
711
+ export const getBrandPageViewModelFromBrandPageModel = (model, brandPageToken, showBrandCrowdLogo = true) => {
713
712
  const pages = model.pages.map((p) => {
714
713
  const contents = p.contents
715
- .map(mapToViewModel(model.styles, model.brandPageType || BRAND_PAGE_TYPES.default, { useOldLogoRenderSize }))
714
+ .map(mapToViewModel(model.styles, model.brandPageType || BRAND_PAGE_TYPES.default))
716
715
  .filter((c) => c !== undefined);
717
716
  return {
718
717
  title: p.title,
@@ -726,10 +725,10 @@ export const getBrandPageViewModelFromBrandPageModel = (model, brandPageToken, s
726
725
  pages,
727
726
  showBrandCrowdLogo,
728
727
  styles: model.styles,
729
- headerViewModelDesktop: mapToPageHeaderViewModel(model.pageHeaderDesktop, model.styles, pages, useOldLogoRenderSize),
730
- headerViewModelMobile: mapToPageHeaderViewModel(model.pageHeaderMobile, model.styles, pages, useOldLogoRenderSize),
731
- footerViewModelDesktop: mapToPageFooterViewModel(model.pageFooterDesktop, model.styles, useOldLogoRenderSize),
732
- footerViewModelMobile: mapToPageFooterViewModel(model.pageFooterMobile, model.styles, useOldLogoRenderSize),
728
+ headerViewModelDesktop: mapToPageHeaderViewModel(model.pageHeaderDesktop, model.styles, pages),
729
+ headerViewModelMobile: mapToPageHeaderViewModel(model.pageHeaderMobile, model.styles, pages),
730
+ footerViewModelDesktop: mapToPageFooterViewModel(model.pageFooterDesktop, model.styles),
731
+ footerViewModelMobile: mapToPageFooterViewModel(model.pageFooterMobile, model.styles),
733
732
  brandPageType: model.brandPageType || BRAND_PAGE_TYPES.default,
734
733
  faviconUrl: model.faviconUrl,
735
734
  ogImageUrl: model.ogImageUrl,
@@ -32,7 +32,6 @@ export interface LogoViewModel extends ContentViewModel {
32
32
  logoImageWidth: string | undefined;
33
33
  /** @deprecated */
34
34
  imageStyle?: LogoStyles['imageStyle'];
35
- useOldLogoRenderSize?: boolean;
36
35
  }
37
36
  export interface ProfileViewModel extends ContentViewModel, Omit<ProfileContent, 'type'> {
38
37
  containerStyle?: BrandPageCssStyle;
@@ -107,7 +107,7 @@ declare const _default: import("vue").DefineComponent<{}, {
107
107
  setBrandPageType({ brandPageType }: {
108
108
  brandPageType: "default" | "brandSite" | "brandContact";
109
109
  }): void;
110
- initialise({ brandPage, brandPageType, emailAddress, features, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
110
+ initialise({ brandPage, brandPageType, emailAddress, features, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, logoVariationImageUrls, shopConfigData, }: import("../../stores").InitialisePayload): Promise<void>;
111
111
  initialisePages({ pages, sections, }: {
112
112
  pages: import("../../../brand-page").PageModel[];
113
113
  sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
@@ -149,7 +149,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
149
149
  setBrandPageType({ brandPageType }: {
150
150
  brandPageType: "default" | "brandSite" | "brandContact";
151
151
  }): void;
152
- initialise({ brandPage, brandPageType, emailAddress, features, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
152
+ initialise({ brandPage, brandPageType, emailAddress, features, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, logoVariationImageUrls, shopConfigData, }: import("../../stores").InitialisePayload): Promise<void>;
153
153
  initialisePages({ pages, sections, }: {
154
154
  pages: import("../../../brand-page").PageModel[];
155
155
  sections: import("../../../shared/page-settings/store").PageSettingsStateSections;