@designcrowd/library.brand-page 5.13.1 → 5.13.2-jj2

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 (31) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-_LyKBIHs.js → CreatedOnBrandCrowd-de-de-CdNoH19e.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-_kgVLJXq.js → CreatedOnBrandCrowd-en-us-C7op3GnO.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-ffkK8zoY.js → CreatedOnBrandCrowd-es-es-De83ViXC.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-wJtf5nIJ.js → CreatedOnBrandCrowd-fr-fr-QDYJWK3f.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-pt-pt-DpT3mSsl.js → CreatedOnBrandCrowd-pt-pt-DBWAwpMJ.js} +1 -1
  6. package/lib/src/{CreatedOnDcom-de-de-D-yViMaE.js → CreatedOnDcom-de-de-C-Rtk1z6.js} +1 -1
  7. package/lib/src/{CreatedOnDcom-en-us-ICRy3t8I.js → CreatedOnDcom-en-us-BC_feeYZ.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-es-es-DtrYPIRQ.js → CreatedOnDcom-es-es-DFi7JXQ9.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-fr-fr-B84usfrI.js → CreatedOnDcom-fr-fr-B-hAzsPi.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-pt-pt-ChgVsO24.js → CreatedOnDcom-pt-pt-DnfjQ3Dy.js} +1 -1
  11. package/lib/src/brand-page/utils/migration/migration-01.d.ts +1 -2
  12. package/lib/src/brand-page/utils/migration/migration-01.js +0 -2
  13. package/lib/src/brand-page/utils/migration/migration-01_1.d.ts +4 -0
  14. package/lib/src/brand-page/utils/migration/migration-01_1.js +5 -0
  15. package/lib/src/brand-page/utils/migration/{migration-051.d.ts → migration-05_1.d.ts} +1 -1
  16. package/lib/src/brand-page/utils/migration/{migration-051.js → migration-05_1.js} +1 -1
  17. package/lib/src/brand-page/utils/migration.util.js +16 -3
  18. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +1 -0
  19. package/lib/src/index.mjs +1 -1
  20. package/lib/src/{lib-ZZVZ7Oup.js → lib-D1QSP5lK.js} +9637 -9621
  21. package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.js +5 -0
  22. package/lib/src/shared/template-settings/models.d.ts +1 -1
  23. package/lib/src/shared/template-settings/models.js +1 -1
  24. package/package.json +1 -1
  25. package/src/brand-page/utils/migration/migration-01.ts +0 -4
  26. package/src/brand-page/utils/migration/migration-01_1.ts +14 -0
  27. package/src/brand-page/utils/migration/{migration-051.ts → migration-05_1.ts} +1 -1
  28. package/src/brand-page/utils/migration.util.ts +19 -3
  29. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +1 -0
  30. package/src/shared/template-settings/components/TemplatesSettings.mixin.ts +6 -0
  31. package/src/shared/template-settings/models.ts +1 -1
@@ -60,6 +60,11 @@ export default defineComponent({
60
60
  }
61
61
  }
62
62
  },
63
+ async personalisationData(newVal, oldVal) {
64
+ if (newVal && !oldVal) {
65
+ await this.selectTab(TEMPLATE_TAB_DISPLAY_NAMES().AI);
66
+ }
67
+ },
63
68
  },
64
69
  computed: {
65
70
  // typescript cannot resolve typing and throw TS4023
@@ -9,7 +9,7 @@ export type DesignTemplateType = 'Facebook cover' | 'Brand Page' | 'Brand Site'
9
9
  export declare const TEMPLATE_TABS: {
10
10
  readonly all: "all";
11
11
  readonly categories: "categories";
12
- readonly AI: "AI";
12
+ readonly AI: "ai";
13
13
  };
14
14
  export type TemplateTab = keyof typeof TEMPLATE_TABS;
15
15
  export declare const TEMPLATE_TAB_DISPLAY_NAMES: () => {
@@ -2,7 +2,7 @@ import { templateSettingsTr } from '../../composables/useTranslate';
2
2
  export const TEMPLATE_TABS = {
3
3
  all: 'all',
4
4
  categories: 'categories',
5
- AI: 'AI',
5
+ AI: 'ai',
6
6
  };
7
7
  export const TEMPLATE_TAB_DISPLAY_NAMES = () => ({
8
8
  all: templateSettingsTr(`headerAll`),
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.1",
4
+ "version": "5.13.2-jj2",
5
5
  "author": "Design.com Eng",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",
@@ -11,7 +11,6 @@ import type {
11
11
  ContactFormContent,
12
12
  ImagesSectionContent,
13
13
  LogoContent,
14
- LogoImageModel,
15
14
  MailingListContent,
16
15
  ProfileContent,
17
16
  RequestPaymentContent,
@@ -68,7 +67,6 @@ import {
68
67
  isTextContent,
69
68
  } from '../../utils';
70
69
  import { createInitialLogoContent } from '../../../brand-page-maker/models';
71
- import { migrateLogoImage } from './logo/logo.migration.util';
72
70
 
73
71
  export const applyTextContentTextToTextItemsMigration = (
74
72
  brandPageModel: BrandPageModel,
@@ -1159,7 +1157,6 @@ export const migrateConvertLineHeightOnFooterStyles = (
1159
1157
  export const migration01 = (
1160
1158
  brandPageModel: BrandPageModel,
1161
1159
  options: {
1162
- logoImage?: LogoImageModel;
1163
1160
  isUserDraft: boolean;
1164
1161
  },
1165
1162
  ): BrandPageModel => {
@@ -1199,7 +1196,6 @@ export const migration01 = (
1199
1196
  migrateGlobalTextStylesToHaveMissingStyles(brandPageModel);
1200
1197
  migrateConvertLineHeightOnNavigationStyles(brandPageModel);
1201
1198
  migrateConvertLineHeightOnFooterStyles(brandPageModel);
1202
- migrateLogoImage(brandPageModel, options.logoImage);
1203
1199
 
1204
1200
  return brandPageModel;
1205
1201
  };
@@ -0,0 +1,14 @@
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
+ };
@@ -1,6 +1,6 @@
1
1
  import { type BrandPageModel } from '../..';
2
2
 
3
- export const migration051 = (
3
+ export const migration05_1 = (
4
4
  brandPageModel: BrandPageModel,
5
5
  options: { isUserDraft: boolean },
6
6
  ): BrandPageModel => {
@@ -1,10 +1,11 @@
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';
3
4
  import { migration02 } from './migration/migration-02';
4
5
  import { migration03 } from './migration/migration-03';
5
6
  import { migration04 } from './migration/migration-04';
6
7
  import { migration05 } from './migration/migration-05';
7
- import { migration051 } from './migration/migration-051';
8
+ import { migration05_1 } from './migration/migration-05_1';
8
9
 
9
10
  interface MigrationTableItem {
10
11
  version: number;
@@ -15,32 +16,47 @@ interface MigrationTableItem {
15
16
  isUserDraft: boolean;
16
17
  },
17
18
  ) => BrandPageModel;
19
+ description: string;
20
+ runAlways?: boolean;
18
21
  }
19
22
 
20
23
  const MIGRATION_TABLE = [
21
24
  {
22
25
  version: 1,
23
26
  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,
24
34
  },
25
35
  {
26
36
  version: 2,
27
37
  migrateFn: migration02,
38
+ description: 'Migrating letterspacing unit from rem to em',
28
39
  },
29
40
  {
30
41
  version: 3,
31
42
  migrateFn: migration03,
43
+ description:
44
+ 'Migrating font size unit from rem to em to support fluid text',
32
45
  },
33
46
  {
34
47
  version: 4,
35
48
  migrateFn: migration04,
49
+ description: 'Migrating user uploaded image URLs to remove extensions',
36
50
  },
37
51
  {
38
52
  version: 5,
39
53
  migrateFn: migration05,
54
+ description: 'Migrating text item text styles to apply auto scale',
40
55
  },
41
56
  {
42
57
  version: 5.1,
43
- migrateFn: migration051,
58
+ migrateFn: migration05_1,
59
+ description: 'Migrating twitter icon and url to x icon and x.com',
44
60
  },
45
61
  ] as MigrationTableItem[];
46
62
 
@@ -61,7 +77,7 @@ export const migrateBrandPageModel = (
61
77
  }
62
78
 
63
79
  MIGRATION_TABLE.forEach((x) => {
64
- if (modelVersion < x.version) {
80
+ if (x.runAlways || modelVersion < x.version) {
65
81
  brandPageModel = x.migrateFn(brandPageModel, options);
66
82
  }
67
83
  });
@@ -1256,6 +1256,7 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
1256
1256
  const navigation = navigationStyleSettingsStore.navigation;
1257
1257
 
1258
1258
  return {
1259
+ v: GetLatestModelVersion(),
1259
1260
  styles: {
1260
1261
  logoStyles,
1261
1262
  buttonStyles,
@@ -88,6 +88,12 @@ export default defineComponent({
88
88
  }
89
89
  }
90
90
  },
91
+
92
+ async personalisationData(newVal, oldVal) {
93
+ if (newVal && !oldVal) {
94
+ await this.selectTab(TEMPLATE_TAB_DISPLAY_NAMES().AI);
95
+ }
96
+ },
91
97
  },
92
98
  computed: {
93
99
  // typescript cannot resolve typing and throw TS4023
@@ -17,7 +17,7 @@ export type DesignTemplateType =
17
17
  export const TEMPLATE_TABS = {
18
18
  all: 'all',
19
19
  categories: 'categories',
20
- AI: 'AI',
20
+ AI: 'ai',
21
21
  } as const;
22
22
 
23
23
  export type TemplateTab = keyof typeof TEMPLATE_TABS;