@designcrowd/library.brand-page 5.13.6 → 5.13.7

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 (19) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-BkWIskLx.js → CreatedOnBrandCrowd-de-de-CrRrXJrT.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-Di3Bscjn.js → CreatedOnBrandCrowd-en-us-CpDUGnHw.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-BouDPfN1.js → CreatedOnBrandCrowd-es-es-C_k7lMHF.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-ex-VCVjf.js → CreatedOnBrandCrowd-fr-fr-CMVohNeY.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-pt-pt-BnxPrMQQ.js → CreatedOnBrandCrowd-pt-pt-BISL94AM.js} +1 -1
  6. package/lib/src/{CreatedOnDcom-de-de-Bwxloguf.js → CreatedOnDcom-de-de-B3E1NohR.js} +1 -1
  7. package/lib/src/{CreatedOnDcom-en-us-CbiXSOCF.js → CreatedOnDcom-en-us-DVIEg9W9.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-es-es-CbkeqCK4.js → CreatedOnDcom-es-es-CHmxVOKZ.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-fr-fr-BrkRGyPq.js → CreatedOnDcom-fr-fr-Jokywtfj.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-pt-pt-Q-46uDXU.js → CreatedOnDcom-pt-pt-BbteAUiV.js} +1 -1
  11. package/lib/src/brand-page/utils/migration/migration-052.d.ts +4 -0
  12. package/lib/src/brand-page/utils/migration/migration-052.js +14 -0
  13. package/lib/src/brand-page/utils/migration.util.js +5 -0
  14. package/lib/src/index.mjs +1 -1
  15. package/lib/src/{lib-DQfmtI-m.js → lib-jPGba9e4.js} +11156 -11145
  16. package/package.json +1 -1
  17. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +3 -3
  18. package/src/brand-page/utils/migration/migration-052.ts +20 -0
  19. package/src/brand-page/utils/migration.util.ts +5 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@designcrowd/library.brand-page",
3
3
  "description": "A collection of Maker/Designer applications",
4
- "version": "5.13.6",
4
+ "version": "5.13.7",
5
5
  "author": "Design.com Eng",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",
@@ -426,7 +426,7 @@ BrandPageModel {
426
426
  },
427
427
  },
428
428
  },
429
- "v": 5.1,
429
+ "v": 5.2,
430
430
  }
431
431
  `;
432
432
 
@@ -839,7 +839,7 @@ BrandPageModel {
839
839
  },
840
840
  },
841
841
  },
842
- "v": 5.1,
842
+ "v": 5.2,
843
843
  }
844
844
  `;
845
845
 
@@ -1259,6 +1259,6 @@ BrandPageModel {
1259
1259
  },
1260
1260
  },
1261
1261
  },
1262
- "v": 5.1,
1262
+ "v": 5.2,
1263
1263
  }
1264
1264
  `;
@@ -0,0 +1,20 @@
1
+ import { type BrandPageModel, type ButtonContent } from '../..';
2
+
3
+ export const migration052 = (
4
+ brandPageModel: BrandPageModel,
5
+ options: { isUserDraft: boolean },
6
+ ): BrandPageModel => {
7
+ brandPageModel.pages.forEach((page) => {
8
+ page.contents.forEach((content) => {
9
+ // Casting content type to string to avoid adding placeholder types in CONTENT_SETTINGS_CONFIGS
10
+ if ((content.type as string) === 'twitter') {
11
+ const buttonContent = content as ButtonContent;
12
+
13
+ buttonContent.iconUrl = 'x';
14
+ buttonContent.type = 'x';
15
+ }
16
+ });
17
+ });
18
+
19
+ return brandPageModel;
20
+ };
@@ -5,6 +5,7 @@ import { migration03 } from './migration/migration-03';
5
5
  import { migration04 } from './migration/migration-04';
6
6
  import { migration05 } from './migration/migration-05';
7
7
  import { migration051 } from './migration/migration-051';
8
+ import { migration052 } from './migration/migration-052';
8
9
 
9
10
  interface MigrationTableItem {
10
11
  version: number;
@@ -42,6 +43,10 @@ const MIGRATION_TABLE = [
42
43
  version: 5.1,
43
44
  migrateFn: migration051,
44
45
  },
46
+ {
47
+ version: 5.2,
48
+ migrateFn: migration052,
49
+ },
45
50
  ] as MigrationTableItem[];
46
51
 
47
52
  export const GetLatestModelVersion = () =>