@designcrowd/library.brand-page 5.12.13-flacky-nav-2 → 5.12.13
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-CJd8myVU.js → CreatedOnBrandCrowd-de-de-BezsFVny.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-D4gZ2H-9.js → CreatedOnBrandCrowd-en-us-ulQgBuU-.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-Cj7neWWa.js → CreatedOnBrandCrowd-es-es-qvD2vIl0.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-CdBtmVE3.js → CreatedOnBrandCrowd-fr-fr-Dd_AMhTv.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-PoPJCQeR.js → CreatedOnBrandCrowd-pt-pt-Cc-MpjqR.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-CaSDNyDq.js → CreatedOnDcom-de-de-XvJi63yz.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-ma0Une6U.js → CreatedOnDcom-en-us-DnMC3nxO.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-BEeZPSgl.js → CreatedOnDcom-es-es-KJxsvnLp.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-j1DtvzYd.js → CreatedOnDcom-fr-fr-7aEPaXkS.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-D1UT2017.js → CreatedOnDcom-pt-pt-CYLmzlvx.js} +1 -1
- package/lib/src/brand-page/components/background-shape/BackgroundShape.mixin.js +1 -0
- package/lib/src/brand-page/components/payment/__fixtures__/request-payment.d.ts +0 -1
- package/lib/src/brand-page/components/payment/__fixtures__/support-me.d.ts +0 -1
- package/lib/src/brand-page/models/brand-page-context.model.d.ts +0 -2
- package/lib/src/brand-page/utils/migration/migration-01.d.ts +1 -1
- package/lib/src/brand-page/utils/migration/migration-01.js +1 -1
- package/lib/src/brand-page/utils/migration/migration-02.d.ts +1 -1
- package/lib/src/brand-page/utils/migration/migration-02.js +1 -1
- package/lib/src/brand-page/utils/migration/migration-03.d.ts +1 -1
- package/lib/src/brand-page/utils/migration/migration-03.js +1 -1
- package/lib/src/brand-page/utils/migration/migration-04.d.ts +1 -1
- package/lib/src/brand-page/utils/migration/migration-04.js +1 -1
- package/lib/src/brand-page/utils/migration/migration-05.d.ts +2 -5
- package/lib/src/brand-page/utils/migration/migration-05.js +1 -1
- package/lib/src/brand-page/utils/migration.util.d.ts +1 -2
- package/lib/src/brand-page/utils/migration.util.js +4 -9
- package/lib/src/brand-page-maker/components/preview/Preview.mixin.js +0 -1
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.js +0 -1
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +1 -1
- package/lib/src/css/library.brand-page-brandCrowd.min.css +5 -11
- package/lib/src/css/library.brand-page-brandPage.min.css +5 -11
- package/lib/src/css/library.brand-page-designCom.min.css +5 -11
- package/lib/src/css/library.brand-page-preview.min.css +5 -11
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-h5MCJKws.js → lib-Ts2IO7tS.js} +16787 -16943
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.js +0 -1
- package/lib/src/shared/page-settings/store/page-settings-store.js +1 -1
- package/lib/src/shared/template-settings/store/template-settings-store.js +1 -1
- package/package.json +1 -1
- package/src/brand-page/components/background-shape/BackgroundShape.mixin.ts +2 -0
- package/src/brand-page/components/logo/Logo.vue +27 -106
- package/src/brand-page/components/logo/LogoRender.vue +4 -15
- package/src/brand-page/models/brand-page-context.model.ts +0 -2
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +3 -3
- package/src/brand-page/utils/migration/logo/migration.util.logo.test.ts +2 -2
- package/src/brand-page/utils/migration/migration-01.ts +2 -2
- package/src/brand-page/utils/migration/migration-02.ts +2 -2
- package/src/brand-page/utils/migration/migration-03.ts +2 -2
- package/src/brand-page/utils/migration/migration-04.ts +2 -2
- package/src/brand-page/utils/migration/migration-05.ts +2 -12
- package/src/brand-page/utils/migration.util.test.ts +108 -155
- package/src/brand-page/utils/migration.util.ts +6 -12
- package/src/brand-page/utils/migration2.util.test.ts +2 -4
- package/src/brand-page-maker/components/preview/Preview.mixin.ts +0 -1
- package/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.ts +0 -1
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +1 -1
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.ts +0 -1
- package/src/shared/page-settings/store/page-settings-store.ts +0 -1
- package/src/shared/template-settings/store/template-settings-store.ts +1 -1
- package/lib/src/brand-page/utils/migration/migration-06.d.ts +0 -4
- package/lib/src/brand-page/utils/migration/migration-06.js +0 -96
- package/src/brand-page/utils/migration/migration-06.test.ts +0 -338
- package/src/brand-page/utils/migration/migration-06.ts +0 -164
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineStore } from 'pinia';
|
|
2
|
-
import { PageHeaderDesktop, PageHeaderMobile, PageFooterDesktop, PageFooterMobile, VIEWPORTS,
|
|
2
|
+
import { PageHeaderDesktop, PageHeaderMobile, PageFooterDesktop, PageFooterMobile, VIEWPORTS, } from '../../../brand-page';
|
|
3
3
|
import { PAGE_SECTIONS } from '../models';
|
|
4
4
|
import { navigateToPageBySlug } from '../../../brand-page-maker/routing';
|
|
5
5
|
import { getPageSlugFromPageTitle } from '../../../brand-page-maker/utils';
|
|
@@ -104,7 +104,7 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
|
|
|
104
104
|
}
|
|
105
105
|
const logoSettingsStore = useUiLogoSettingsStore();
|
|
106
106
|
const templateData = JSON.parse(template.data);
|
|
107
|
-
const brandPageModel =
|
|
107
|
+
const brandPageModel = migrateBrandPageModel(new BrandPageModel(templateData), {
|
|
108
108
|
logoImage: {
|
|
109
109
|
...logoSettingsStore.selectedLogoImage,
|
|
110
110
|
},
|
package/package.json
CHANGED
|
@@ -138,6 +138,8 @@ export default defineComponent({
|
|
|
138
138
|
/\b(width|height)\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+))/gi,
|
|
139
139
|
);
|
|
140
140
|
|
|
141
|
+
console.log('aaaa', widthHeightMatches);
|
|
142
|
+
|
|
141
143
|
if (widthHeightMatches) {
|
|
142
144
|
const widthMatch = widthHeightMatches.find((match) =>
|
|
143
145
|
match.startsWith('width='),
|
|
@@ -3,49 +3,13 @@
|
|
|
3
3
|
v-if="viewModel.isVisible"
|
|
4
4
|
class="logo tw-relative tw-justify-center tw-items-center"
|
|
5
5
|
>
|
|
6
|
-
<div
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<div v-if="!context.isPreview && context.isBrandSite">
|
|
14
|
-
<router-link
|
|
15
|
-
v-if="routes.length >= 1"
|
|
16
|
-
:to="{
|
|
17
|
-
name: routes[0].routeName,
|
|
18
|
-
params: routes[0].routeParams,
|
|
19
|
-
}"
|
|
20
|
-
>
|
|
21
|
-
<LazyHydrationWrapper v-if="context.isServerRender">
|
|
22
|
-
<LogoRender
|
|
23
|
-
:is-preview="context.isPreview"
|
|
24
|
-
:is-brand-site="context.isBrandSite"
|
|
25
|
-
:disable-server-render="context.disableLogoRenderOnServerside"
|
|
26
|
-
:has-margin-bottom="hasMarginBottom"
|
|
27
|
-
:alt-text="altText"
|
|
28
|
-
:view-model="viewModel"
|
|
29
|
-
:context="context"
|
|
30
|
-
/>
|
|
31
|
-
</LazyHydrationWrapper>
|
|
32
|
-
<LogoRender
|
|
33
|
-
v-else
|
|
34
|
-
:is-preview="context.isPreview"
|
|
35
|
-
:is-brand-site="context.isBrandSite"
|
|
36
|
-
:disable-server-render="context.disableLogoRenderOnServerside"
|
|
37
|
-
:has-margin-bottom="hasMarginBottom"
|
|
38
|
-
:alt-text="altText"
|
|
39
|
-
:view-model="viewModel"
|
|
40
|
-
:context="context"
|
|
41
|
-
/>
|
|
42
|
-
</router-link>
|
|
43
|
-
</div>
|
|
44
|
-
<template
|
|
45
|
-
v-if="
|
|
46
|
-
(context.isPreview && context.isBrandSite) ||
|
|
47
|
-
context.isBrandPageOrIsBrandContact
|
|
48
|
-
"
|
|
6
|
+
<div v-if="!context.isPreview && context.isBrandSite">
|
|
7
|
+
<router-link
|
|
8
|
+
v-if="routes.length >= 1"
|
|
9
|
+
:to="{
|
|
10
|
+
name: routes[0].routeName,
|
|
11
|
+
params: routes[0].routeParams,
|
|
12
|
+
}"
|
|
49
13
|
>
|
|
50
14
|
<LazyHydrationWrapper v-if="context.isServerRender">
|
|
51
15
|
<LogoRender
|
|
@@ -55,82 +19,44 @@
|
|
|
55
19
|
:has-margin-bottom="hasMarginBottom"
|
|
56
20
|
:alt-text="altText"
|
|
57
21
|
:view-model="viewModel"
|
|
58
|
-
:context="context"
|
|
59
22
|
/>
|
|
60
23
|
</LazyHydrationWrapper>
|
|
61
24
|
<LogoRender
|
|
62
25
|
v-else
|
|
63
26
|
:is-preview="context.isPreview"
|
|
64
|
-
:disable-server-render="context.disableLogoRenderOnServerside"
|
|
65
27
|
:is-brand-site="context.isBrandSite"
|
|
28
|
+
:disable-server-render="context.disableLogoRenderOnServerside"
|
|
66
29
|
:has-margin-bottom="hasMarginBottom"
|
|
67
30
|
:alt-text="altText"
|
|
68
31
|
:view-model="viewModel"
|
|
69
|
-
:context="context"
|
|
70
32
|
/>
|
|
71
|
-
</
|
|
33
|
+
</router-link>
|
|
72
34
|
</div>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
params: routes[0].routeParams,
|
|
81
|
-
}"
|
|
82
|
-
>
|
|
83
|
-
<LazyHydrationWrapper v-if="context.isServerRender">
|
|
84
|
-
<LogoRender
|
|
85
|
-
:is-preview="context.isPreview"
|
|
86
|
-
:is-brand-site="context.isBrandSite"
|
|
87
|
-
:disable-server-render="context.disableLogoRenderOnServerside"
|
|
88
|
-
:has-margin-bottom="hasMarginBottom"
|
|
89
|
-
:alt-text="altText"
|
|
90
|
-
:view-model="viewModel"
|
|
91
|
-
:context="context"
|
|
92
|
-
/>
|
|
93
|
-
</LazyHydrationWrapper>
|
|
94
|
-
<LogoRender
|
|
95
|
-
v-else
|
|
96
|
-
:is-preview="context.isPreview"
|
|
97
|
-
:is-brand-site="context.isBrandSite"
|
|
98
|
-
:disable-server-render="context.disableLogoRenderOnServerside"
|
|
99
|
-
:has-margin-bottom="hasMarginBottom"
|
|
100
|
-
:alt-text="altText"
|
|
101
|
-
:view-model="viewModel"
|
|
102
|
-
:context="context"
|
|
103
|
-
/>
|
|
104
|
-
</router-link>
|
|
105
|
-
</div>
|
|
106
|
-
<template
|
|
107
|
-
v-if="
|
|
108
|
-
(context.isPreview && context.isBrandSite) ||
|
|
109
|
-
context.isBrandPageOrIsBrandContact
|
|
110
|
-
"
|
|
111
|
-
>
|
|
112
|
-
<LazyHydrationWrapper v-if="context.isServerRender">
|
|
113
|
-
<LogoRender
|
|
114
|
-
:is-preview="context.isPreview"
|
|
115
|
-
:is-brand-site="context.isBrandSite"
|
|
116
|
-
:disable-server-render="context.disableLogoRenderOnServerside"
|
|
117
|
-
:has-margin-bottom="hasMarginBottom"
|
|
118
|
-
:alt-text="altText"
|
|
119
|
-
:view-model="viewModel"
|
|
120
|
-
:context="context"
|
|
121
|
-
/>
|
|
122
|
-
</LazyHydrationWrapper>
|
|
35
|
+
<template
|
|
36
|
+
v-if="
|
|
37
|
+
(context.isPreview && context.isBrandSite) ||
|
|
38
|
+
context.isBrandPageOrIsBrandContact
|
|
39
|
+
"
|
|
40
|
+
>
|
|
41
|
+
<LazyHydrationWrapper v-if="context.isServerRender">
|
|
123
42
|
<LogoRender
|
|
124
|
-
v-else
|
|
125
43
|
:is-preview="context.isPreview"
|
|
126
|
-
:disable-server-render="context.disableLogoRenderOnServerside"
|
|
127
44
|
:is-brand-site="context.isBrandSite"
|
|
45
|
+
:disable-server-render="context.disableLogoRenderOnServerside"
|
|
128
46
|
:has-margin-bottom="hasMarginBottom"
|
|
129
47
|
:alt-text="altText"
|
|
130
48
|
:view-model="viewModel"
|
|
131
|
-
:context="context"
|
|
132
49
|
/>
|
|
133
|
-
</
|
|
50
|
+
</LazyHydrationWrapper>
|
|
51
|
+
<LogoRender
|
|
52
|
+
v-else
|
|
53
|
+
:is-preview="context.isPreview"
|
|
54
|
+
:disable-server-render="context.disableLogoRenderOnServerside"
|
|
55
|
+
:is-brand-site="context.isBrandSite"
|
|
56
|
+
:has-margin-bottom="hasMarginBottom"
|
|
57
|
+
:alt-text="altText"
|
|
58
|
+
:view-model="viewModel"
|
|
59
|
+
/>
|
|
134
60
|
</template>
|
|
135
61
|
</div>
|
|
136
62
|
</template>
|
|
@@ -144,7 +70,6 @@ import {
|
|
|
144
70
|
getRouteParamsByPage,
|
|
145
71
|
} from '../../utils/route.util';
|
|
146
72
|
import { LazyHydrationWrapper } from 'vue3-lazy-hydration';
|
|
147
|
-
import { DEFAULT_LOGO_HEIGHT, DEFAULT_LOGO_WIDTH } from '../../constants';
|
|
148
73
|
|
|
149
74
|
const props = defineProps({
|
|
150
75
|
isPreview: {
|
|
@@ -199,8 +124,4 @@ const routes = computed(
|
|
|
199
124
|
--logo-size: 8rem;
|
|
200
125
|
--logo-spacing: 0.75rem;
|
|
201
126
|
}
|
|
202
|
-
.logo_wrapper {
|
|
203
|
-
margin-top: var(--logo-spacing);
|
|
204
|
-
margin-bottom: var(--logo-spacing);
|
|
205
|
-
}
|
|
206
127
|
</style>
|
|
@@ -11,10 +11,7 @@
|
|
|
11
11
|
<img
|
|
12
12
|
v-if="logoImageUrl"
|
|
13
13
|
data-test-tag="logo"
|
|
14
|
-
|
|
15
|
-
'logo__image',
|
|
16
|
-
(context?.modelVersion ?? 0) <= 5 ? 'logo__image--legacy' : '',
|
|
17
|
-
]"
|
|
14
|
+
class="logo__image"
|
|
18
15
|
:src="logoImageUrl"
|
|
19
16
|
:alt="altText"
|
|
20
17
|
:style="logoStyle"
|
|
@@ -25,7 +22,6 @@
|
|
|
25
22
|
<script setup lang="ts">
|
|
26
23
|
import { computed, ref, watch, onServerPrefetch, onMounted } from 'vue';
|
|
27
24
|
import type { LogoViewModel } from '../../view-models';
|
|
28
|
-
import type { BrandPageContext } from '../../models';
|
|
29
25
|
import { LogoCacheRepository } from '../../repositories';
|
|
30
26
|
import { DEFAULT_LOGO_HEIGHT, DEFAULT_LOGO_WIDTH } from '../../constants';
|
|
31
27
|
|
|
@@ -37,7 +33,6 @@ const props = withDefaults(
|
|
|
37
33
|
isBrandSite: boolean;
|
|
38
34
|
viewModel?: LogoViewModel;
|
|
39
35
|
altText: string;
|
|
40
|
-
context?: BrandPageContext;
|
|
41
36
|
}>(),
|
|
42
37
|
{
|
|
43
38
|
isPreview: false,
|
|
@@ -76,14 +71,11 @@ const logoWidth = computed(() => {
|
|
|
76
71
|
});
|
|
77
72
|
|
|
78
73
|
const logoStyle = computed(() => {
|
|
79
|
-
const isV6OrHigher = (props.context?.modelVersion ?? 0) >= 6;
|
|
80
|
-
|
|
81
74
|
return {
|
|
82
75
|
width: '100%',
|
|
83
76
|
height: '100%',
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
: { 'max-height': logoHeight.value, 'max-width': logoWidth.value }),
|
|
77
|
+
'max-width': logoWidth.value,
|
|
78
|
+
'max-height': logoHeight.value,
|
|
87
79
|
} as any;
|
|
88
80
|
});
|
|
89
81
|
|
|
@@ -134,13 +126,10 @@ onMounted(async () => {
|
|
|
134
126
|
.logo__image {
|
|
135
127
|
display: block;
|
|
136
128
|
object-fit: contain;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.logo__image--legacy {
|
|
140
129
|
height: 6rem;
|
|
141
130
|
}
|
|
142
131
|
|
|
143
|
-
.brand-page .logo__image
|
|
132
|
+
.brand-page .logo__image {
|
|
144
133
|
margin: var(--logo-spacing) auto;
|
|
145
134
|
}
|
|
146
135
|
</style>
|
|
@@ -91,8 +91,6 @@ export interface BrandPageContext {
|
|
|
91
91
|
/** Is brand page rendered for preview */
|
|
92
92
|
isCapturingPreview: boolean;
|
|
93
93
|
disableLogoRenderOnServerside?: boolean;
|
|
94
|
-
/** Model version for conditional rendering */
|
|
95
|
-
modelVersion?: number;
|
|
96
94
|
}
|
|
97
95
|
|
|
98
96
|
const getValueType = (key: string, abtestValue?: string): AbTestResult => {
|
|
@@ -426,7 +426,7 @@ BrandPageModel {
|
|
|
426
426
|
},
|
|
427
427
|
},
|
|
428
428
|
},
|
|
429
|
-
"v":
|
|
429
|
+
"v": 5,
|
|
430
430
|
}
|
|
431
431
|
`;
|
|
432
432
|
|
|
@@ -839,7 +839,7 @@ BrandPageModel {
|
|
|
839
839
|
},
|
|
840
840
|
},
|
|
841
841
|
},
|
|
842
|
-
"v":
|
|
842
|
+
"v": 5,
|
|
843
843
|
}
|
|
844
844
|
`;
|
|
845
845
|
|
|
@@ -1259,6 +1259,6 @@ BrandPageModel {
|
|
|
1259
1259
|
},
|
|
1260
1260
|
},
|
|
1261
1261
|
},
|
|
1262
|
-
"v":
|
|
1262
|
+
"v": 5,
|
|
1263
1263
|
}
|
|
1264
1264
|
`;
|
|
@@ -9,14 +9,14 @@ 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 brandPageModel =
|
|
19
|
+
const brandPageModel = migrateBrandPageModel(
|
|
20
20
|
new BrandPageModel(brandsiteMigrationBrandPageData as any),
|
|
21
21
|
{ isUserDraft: true },
|
|
22
22
|
);
|
|
@@ -1156,13 +1156,13 @@ export const migrateConvertLineHeightOnFooterStyles = (
|
|
|
1156
1156
|
}
|
|
1157
1157
|
};
|
|
1158
1158
|
|
|
1159
|
-
export const migration01 =
|
|
1159
|
+
export const migration01 = (
|
|
1160
1160
|
brandPageModel: BrandPageModel,
|
|
1161
1161
|
options: {
|
|
1162
1162
|
logoImage?: LogoImageModel;
|
|
1163
1163
|
isUserDraft: boolean;
|
|
1164
1164
|
},
|
|
1165
|
-
):
|
|
1165
|
+
): BrandPageModel => {
|
|
1166
1166
|
if (!brandPageModel.brandPageType) {
|
|
1167
1167
|
brandPageModel.brandPageType = BRAND_PAGE_TYPES.default;
|
|
1168
1168
|
}
|
|
@@ -90,13 +90,13 @@ const handleConversion = (
|
|
|
90
90
|
);
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
-
export const migration02 =
|
|
93
|
+
export const migration02 = (
|
|
94
94
|
brandPageModel: BrandPageModel,
|
|
95
95
|
options: {
|
|
96
96
|
logoImage?: LogoImageModel;
|
|
97
97
|
isUserDraft: boolean;
|
|
98
98
|
},
|
|
99
|
-
):
|
|
99
|
+
): BrandPageModel => {
|
|
100
100
|
handleConversion(
|
|
101
101
|
brandPageModel.pageHeaderDesktop?.navigation?.defaultButtonStyle,
|
|
102
102
|
);
|
|
@@ -69,13 +69,13 @@ const migrateApplyAutoScaleProperty = (
|
|
|
69
69
|
brandPageType && brandPageType === BRAND_PAGE_TYPES.brandSite;
|
|
70
70
|
};
|
|
71
71
|
|
|
72
|
-
export const migration03 =
|
|
72
|
+
export const migration03 = (
|
|
73
73
|
brandPageModel: BrandPageModel,
|
|
74
74
|
options: {
|
|
75
75
|
logoImage?: LogoImageModel;
|
|
76
76
|
isUserDraft: boolean;
|
|
77
77
|
},
|
|
78
|
-
):
|
|
78
|
+
): BrandPageModel => {
|
|
79
79
|
handleRecursiveFontSizeMigration(brandPageModel.pageHeaderDesktop);
|
|
80
80
|
handleRecursiveFontSizeMigration(brandPageModel.pageHeaderMobile);
|
|
81
81
|
handleRecursiveFontSizeMigration(brandPageModel.pageFooterDesktop);
|
|
@@ -121,10 +121,10 @@ const updateUserUploadedImageUrls = (content: Content): void => {
|
|
|
121
121
|
}
|
|
122
122
|
};
|
|
123
123
|
|
|
124
|
-
export const migration04 =
|
|
124
|
+
export const migration04 = (
|
|
125
125
|
brandPageModel: BrandPageModel,
|
|
126
126
|
options: { logoImage?: LogoImageModel; isUserDraft: boolean },
|
|
127
|
-
):
|
|
127
|
+
): BrandPageModel => {
|
|
128
128
|
if (
|
|
129
129
|
brandPageModel.faviconUrl &&
|
|
130
130
|
isUserUploadedImage(brandPageModel.faviconUrl)
|
|
@@ -1,17 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type BrandPageModel,
|
|
3
|
-
type TextContent,
|
|
4
|
-
type LogoImageModel,
|
|
5
|
-
} from '../..';
|
|
1
|
+
import { type BrandPageModel, type TextContent } from '../..';
|
|
6
2
|
import { isTextContent } from '../model.util';
|
|
7
3
|
|
|
8
|
-
export const migration05 =
|
|
9
|
-
brandPageModel: BrandPageModel,
|
|
10
|
-
options: {
|
|
11
|
-
logoImage?: LogoImageModel;
|
|
12
|
-
isUserDraft: boolean;
|
|
13
|
-
},
|
|
14
|
-
): Promise<BrandPageModel> => {
|
|
4
|
+
export const migration05 = (brandPageModel: BrandPageModel): BrandPageModel => {
|
|
15
5
|
brandPageModel.pages.forEach((page) => {
|
|
16
6
|
page.contents.forEach((content) => {
|
|
17
7
|
if (isTextContent(content)) {
|