@designcrowd/library.brand-page 5.13.2-jj3 → 5.13.2
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-CeEHfqaI.js → CreatedOnBrandCrowd-de-de-CfG0-858.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-CE7ZxGyI.js → CreatedOnBrandCrowd-en-us-CcJ-jWWD.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-CrSMpcLT.js → CreatedOnBrandCrowd-es-es-CfiRcdwQ.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-CUj3WxaT.js → CreatedOnBrandCrowd-fr-fr-BsplcwEN.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-Dt_J16X6.js → CreatedOnBrandCrowd-pt-pt-C9vHZlGJ.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-Cw8IRb5V.js → CreatedOnDcom-de-de-HOhAr9ML.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-CrrzoBU7.js → CreatedOnDcom-en-us-BxHSRmK8.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-C9JUdGHw.js → CreatedOnDcom-es-es-rUrC1JPi.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-CyFR7MQl.js → CreatedOnDcom-fr-fr-B3kh5Mj2.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-DLebp2Wn.js → CreatedOnDcom-pt-pt-DGzCGnWH.js} +1 -1
- package/lib/src/brand-page/utils/migration/migration-01.d.ts +2 -1
- package/lib/src/brand-page/utils/migration/migration-01.js +2 -0
- package/lib/src/brand-page/utils/migration/{migration-05_1.d.ts → migration-051.d.ts} +1 -1
- package/lib/src/brand-page/utils/migration/{migration-05_1.js → migration-051.js} +1 -1
- package/lib/src/brand-page/utils/migration.util.js +3 -16
- package/lib/src/brand-page-maker/constants/index.d.ts +4 -4
- package/lib/src/brand-page-maker/constants/index.js +4 -4
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +0 -1
- package/lib/src/clients/media-client.js +2 -2
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-29h6IPue.js → lib-na3Nl6DE.js} +12312 -12325
- package/package.json +1 -1
- package/src/brand-page/utils/migration/migration-01.ts +4 -0
- package/src/brand-page/utils/migration/{migration-05_1.ts → migration-051.ts} +1 -1
- package/src/brand-page/utils/migration.util.ts +3 -19
- package/src/brand-page-maker/constants/index.ts +4 -4
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +0 -1
- package/src/clients/media-client.js +2 -2
- package/lib/src/brand-page/utils/migration/migration-01_1.d.ts +0 -4
- package/lib/src/brand-page/utils/migration/migration-01_1.js +0 -5
- package/src/brand-page/utils/migration/migration-01_1.ts +0 -14
package/package.json
CHANGED
|
@@ -11,6 +11,7 @@ import type {
|
|
|
11
11
|
ContactFormContent,
|
|
12
12
|
ImagesSectionContent,
|
|
13
13
|
LogoContent,
|
|
14
|
+
LogoImageModel,
|
|
14
15
|
MailingListContent,
|
|
15
16
|
ProfileContent,
|
|
16
17
|
RequestPaymentContent,
|
|
@@ -67,6 +68,7 @@ import {
|
|
|
67
68
|
isTextContent,
|
|
68
69
|
} from '../../utils';
|
|
69
70
|
import { createInitialLogoContent } from '../../../brand-page-maker/models';
|
|
71
|
+
import { migrateLogoImage } from './logo/logo.migration.util';
|
|
70
72
|
|
|
71
73
|
export const applyTextContentTextToTextItemsMigration = (
|
|
72
74
|
brandPageModel: BrandPageModel,
|
|
@@ -1157,6 +1159,7 @@ export const migrateConvertLineHeightOnFooterStyles = (
|
|
|
1157
1159
|
export const migration01 = (
|
|
1158
1160
|
brandPageModel: BrandPageModel,
|
|
1159
1161
|
options: {
|
|
1162
|
+
logoImage?: LogoImageModel;
|
|
1160
1163
|
isUserDraft: boolean;
|
|
1161
1164
|
},
|
|
1162
1165
|
): BrandPageModel => {
|
|
@@ -1196,6 +1199,7 @@ export const migration01 = (
|
|
|
1196
1199
|
migrateGlobalTextStylesToHaveMissingStyles(brandPageModel);
|
|
1197
1200
|
migrateConvertLineHeightOnNavigationStyles(brandPageModel);
|
|
1198
1201
|
migrateConvertLineHeightOnFooterStyles(brandPageModel);
|
|
1202
|
+
migrateLogoImage(brandPageModel, options.logoImage);
|
|
1199
1203
|
|
|
1200
1204
|
return brandPageModel;
|
|
1201
1205
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { type BrandPageModel, type LogoImageModel } from '../models';
|
|
2
2
|
import { migration01 } from './migration/migration-01';
|
|
3
|
-
import { migration01_1 } from './migration/migration-01_1';
|
|
4
3
|
import { migration02 } from './migration/migration-02';
|
|
5
4
|
import { migration03 } from './migration/migration-03';
|
|
6
5
|
import { migration04 } from './migration/migration-04';
|
|
7
6
|
import { migration05 } from './migration/migration-05';
|
|
8
|
-
import {
|
|
7
|
+
import { migration051 } from './migration/migration-051';
|
|
9
8
|
|
|
10
9
|
interface MigrationTableItem {
|
|
11
10
|
version: number;
|
|
@@ -16,47 +15,32 @@ interface MigrationTableItem {
|
|
|
16
15
|
isUserDraft: boolean;
|
|
17
16
|
},
|
|
18
17
|
) => BrandPageModel;
|
|
19
|
-
description: string;
|
|
20
|
-
runAlways?: boolean;
|
|
21
18
|
}
|
|
22
19
|
|
|
23
20
|
const MIGRATION_TABLE = [
|
|
24
21
|
{
|
|
25
22
|
version: 1,
|
|
26
23
|
migrateFn: migration01,
|
|
27
|
-
description: 'Legacy migration',
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
version: 1.1,
|
|
31
|
-
migrateFn: migration01_1,
|
|
32
|
-
description: 'When loading template assign logo to the metadata',
|
|
33
|
-
runAlways: true,
|
|
34
24
|
},
|
|
35
25
|
{
|
|
36
26
|
version: 2,
|
|
37
27
|
migrateFn: migration02,
|
|
38
|
-
description: 'Migrating letterspacing unit from rem to em',
|
|
39
28
|
},
|
|
40
29
|
{
|
|
41
30
|
version: 3,
|
|
42
31
|
migrateFn: migration03,
|
|
43
|
-
description:
|
|
44
|
-
'Migrating font size unit from rem to em to support fluid text',
|
|
45
32
|
},
|
|
46
33
|
{
|
|
47
34
|
version: 4,
|
|
48
35
|
migrateFn: migration04,
|
|
49
|
-
description: 'Migrating user uploaded image URLs to remove extensions',
|
|
50
36
|
},
|
|
51
37
|
{
|
|
52
38
|
version: 5,
|
|
53
39
|
migrateFn: migration05,
|
|
54
|
-
description: 'Migrating text item text styles to apply auto scale',
|
|
55
40
|
},
|
|
56
41
|
{
|
|
57
42
|
version: 5.1,
|
|
58
|
-
migrateFn:
|
|
59
|
-
description: 'Migrating twitter icon and url to x icon and x.com',
|
|
43
|
+
migrateFn: migration051,
|
|
60
44
|
},
|
|
61
45
|
] as MigrationTableItem[];
|
|
62
46
|
|
|
@@ -77,7 +61,7 @@ export const migrateBrandPageModel = (
|
|
|
77
61
|
}
|
|
78
62
|
|
|
79
63
|
MIGRATION_TABLE.forEach((x) => {
|
|
80
|
-
if (
|
|
64
|
+
if (modelVersion < x.version) {
|
|
81
65
|
brandPageModel = x.migrateFn(brandPageModel, options);
|
|
82
66
|
}
|
|
83
67
|
});
|
|
@@ -14,10 +14,10 @@ export const GET_ALL_USER_MEDIA_ENDPOINT = `/maker/api/users/media`;
|
|
|
14
14
|
export const CREATE_USER_MEDIA_ENDPOINT = '/maker/api/users/media';
|
|
15
15
|
export const DELETE_USER_MEDIA_ENDPOINT = '/maker/api/users/media';
|
|
16
16
|
|
|
17
|
-
export const ADMIN_POLICY_DATA_ENDPOINT = `/maker/
|
|
18
|
-
export const GET_ALL_ADMIN_MEDIA_ENDPOINT = `/maker/
|
|
19
|
-
export const CREATE_ADMIN_MEDIA_ENDPOINT = '/maker/
|
|
20
|
-
export const DELETE_ADMIN_MEDIA_ENDPOINT = '/maker/
|
|
17
|
+
export const ADMIN_POLICY_DATA_ENDPOINT = `/maker/media/upload/request`;
|
|
18
|
+
export const GET_ALL_ADMIN_MEDIA_ENDPOINT = `/maker/media/GetPaginatedAdminMedia`;
|
|
19
|
+
export const CREATE_ADMIN_MEDIA_ENDPOINT = '/maker/media/upload';
|
|
20
|
+
export const DELETE_ADMIN_MEDIA_ENDPOINT = '/maker/media';
|
|
21
21
|
|
|
22
22
|
export const MY_DESIGN_ASSETS_ENDPOINTS = `/maker/api/asset/all`;
|
|
23
23
|
|
|
@@ -32,10 +32,10 @@ import {
|
|
|
32
32
|
|
|
33
33
|
export default class MediaClient {
|
|
34
34
|
findPaginatedAdminMediaEndpoint = (skip, take, videoOnly) =>
|
|
35
|
-
`${this.options.mediaBaseUrl}/maker/
|
|
35
|
+
`${this.options.mediaBaseUrl}/maker/media/GetPaginatedAdminMedia?skip=${skip}&take=${take}&videoOnly=${videoOnly}`;
|
|
36
36
|
|
|
37
37
|
uploadAdminMediaEndpoint = () =>
|
|
38
|
-
`${this.options.mediaBaseUrl}/maker/
|
|
38
|
+
`${this.options.mediaBaseUrl}/maker/media/upload`;
|
|
39
39
|
|
|
40
40
|
userPolicyDataEndpoint = () =>
|
|
41
41
|
`${this.options.mediaBaseUrl}/maker/api/users/policy-data`;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { BrandPageModel, LogoImageModel } from '../..';
|
|
2
|
-
|
|
3
|
-
import { migrateLogoImage } from './logo/logo.migration.util';
|
|
4
|
-
|
|
5
|
-
export const migration01_1 = (
|
|
6
|
-
brandPageModel: BrandPageModel,
|
|
7
|
-
options: {
|
|
8
|
-
logoImage?: LogoImageModel;
|
|
9
|
-
},
|
|
10
|
-
): BrandPageModel => {
|
|
11
|
-
migrateLogoImage(brandPageModel, options.logoImage);
|
|
12
|
-
|
|
13
|
-
return brandPageModel;
|
|
14
|
-
};
|