@designcrowd/library.brand-page 5.10.15 → 5.10.16

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/index.mjs CHANGED
@@ -64895,19 +64895,16 @@ const rt = Qt("uiContentSettings", {
64895
64895
  logoImageBase64Url: void 0
64896
64896
  });
64897
64897
  });
64898
- }), n.pages.forEach((i, r) => {
64899
- n.setPageContents({
64900
- pageIndex: r,
64901
- contents: i.contents.map((s) => {
64902
- if (s.type !== "logo")
64903
- return s;
64904
- const o = { ...s };
64905
- let a = e;
64906
- return t && (a = {
64907
- ...a,
64908
- logoVariation: o.settings.content.logoImage.logoVariation
64909
- }), o.settings.content.logoImage = a, o.settings.content.logoImageBase64Url = void 0, o;
64910
- })
64898
+ }), n.pages.forEach((i) => {
64899
+ i.contents.forEach((r) => {
64900
+ if (r.type !== "logo")
64901
+ return r;
64902
+ const s = { ...r };
64903
+ let o = e;
64904
+ t && (o = {
64905
+ ...o,
64906
+ logoVariation: s.settings.content.logoImage.logoVariation
64907
+ }), s.settings.content.logoImage = o, s.settings.content.logoImageBase64Url = void 0;
64911
64908
  });
64912
64909
  });
64913
64910
  },
@@ -89188,9 +89185,9 @@ const L6e = /* @__PURE__ */ v(T6e, [["render", H6e], ["__scopeId", "data-v-99257
89188
89185
  logoVariation: 0,
89189
89186
  logoLastUpdate: Date.now().toString()
89190
89187
  };
89191
- this.logoSettingStore.setLogoImageToAllContentsAndSections({
89188
+ this.logoSettingsStore.setLogoImageToAllContentsAndSections({
89192
89189
  logoImage: t
89193
- }), this.logoSettingStore.setSelectedLogoImage(t), e.logoDesignAttributes && this.logoSettingStore.applyLogoDesignAttributes(
89190
+ }), this.logoSettingsStore.setSelectedLogoImage(t), e.logoDesignAttributes && this.logoSettingsStore.applyLogoDesignAttributes(
89194
89191
  e.logoDesignAttributes
89195
89192
  );
89196
89193
  }
@@ -39,12 +39,12 @@ export default defineComponent({
39
39
  logoVariation: 0,
40
40
  logoLastUpdate: Date.now().toString(),
41
41
  };
42
- this.logoSettingStore.setLogoImageToAllContentsAndSections({
42
+ this.logoSettingsStore.setLogoImageToAllContentsAndSections({
43
43
  logoImage,
44
44
  });
45
- this.logoSettingStore.setSelectedLogoImage(logoImage);
45
+ this.logoSettingsStore.setSelectedLogoImage(logoImage);
46
46
  if (response.logoDesignAttributes) {
47
- this.logoSettingStore.applyLogoDesignAttributes(response.logoDesignAttributes);
47
+ this.logoSettingsStore.applyLogoDesignAttributes(response.logoDesignAttributes);
48
48
  }
49
49
  },
50
50
  },
@@ -69,25 +69,23 @@ export const useUiLogoSettingsStore = defineStore('uiLogoSettings', {
69
69
  });
70
70
  });
71
71
  // TODO: test me
72
- pageSettingsStore.pages.forEach((p, i) => {
73
- pageSettingsStore.setPageContents({
74
- pageIndex: i,
75
- contents: p.contents.map((c) => {
76
- if (c.type !== 'logo') {
77
- return c;
78
- }
79
- const logoContentItem = { ...c };
80
- let thisLogoImage = logoImage;
81
- if (keepLogoVariation) {
82
- thisLogoImage = {
83
- ...thisLogoImage,
84
- logoVariation: logoContentItem.settings.content.logoImage.logoVariation,
85
- };
86
- }
87
- logoContentItem.settings.content.logoImage = thisLogoImage;
88
- logoContentItem.settings.content.logoImageBase64Url = undefined;
89
- return logoContentItem;
90
- }),
72
+ pageSettingsStore.pages.forEach((p) => {
73
+ // This is modifying the p.contents in memory. Calling map (over forEach) will create a new array
74
+ // causing the content in the page and contents settings store to be out of sync
75
+ p.contents.forEach((c) => {
76
+ if (c.type !== 'logo') {
77
+ return c;
78
+ }
79
+ const logoContentItem = { ...c };
80
+ let thisLogoImage = logoImage;
81
+ if (keepLogoVariation) {
82
+ thisLogoImage = {
83
+ ...thisLogoImage,
84
+ logoVariation: logoContentItem.settings.content.logoImage.logoVariation,
85
+ };
86
+ }
87
+ logoContentItem.settings.content.logoImage = thisLogoImage;
88
+ logoContentItem.settings.content.logoImageBase64Url = undefined;
91
89
  });
92
90
  });
93
91
  },
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.10.15",
4
+ "version": "5.10.16",
5
5
  "author": "Design.com Eng",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",
@@ -55,14 +55,14 @@ export default defineComponent({
55
55
  logoLastUpdate: Date.now().toString(),
56
56
  };
57
57
 
58
- this.logoSettingStore.setLogoImageToAllContentsAndSections({
58
+ this.logoSettingsStore.setLogoImageToAllContentsAndSections({
59
59
  logoImage,
60
60
  });
61
61
 
62
- this.logoSettingStore.setSelectedLogoImage(logoImage);
62
+ this.logoSettingsStore.setSelectedLogoImage(logoImage);
63
63
 
64
64
  if (response.logoDesignAttributes) {
65
- this.logoSettingStore.applyLogoDesignAttributes(
65
+ this.logoSettingsStore.applyLogoDesignAttributes(
66
66
  response.logoDesignAttributes,
67
67
  );
68
68
  }
@@ -134,32 +134,29 @@ export const useUiLogoSettingsStore = defineStore('uiLogoSettings', {
134
134
  });
135
135
 
136
136
  // TODO: test me
137
- pageSettingsStore.pages.forEach((p, i) => {
138
- pageSettingsStore.setPageContents({
139
- pageIndex: i,
140
- contents: p.contents.map((c) => {
141
- if (c.type !== 'logo') {
142
- return c;
143
- }
137
+ pageSettingsStore.pages.forEach((p) => {
138
+ // This is modifying the p.contents in memory. Calling map (over forEach) will create a new array
139
+ // causing the content in the page and contents settings store to be out of sync
140
+ p.contents.forEach((c) => {
141
+ if (c.type !== 'logo') {
142
+ return c;
143
+ }
144
144
 
145
- const logoContentItem = { ...c } as ContentItem<LogoContent>;
145
+ const logoContentItem = { ...c } as ContentItem<LogoContent>;
146
146
 
147
- let thisLogoImage = logoImage;
147
+ let thisLogoImage = logoImage;
148
148
 
149
- if (keepLogoVariation) {
150
- thisLogoImage = {
151
- ...thisLogoImage,
152
- logoVariation:
153
- logoContentItem.settings.content.logoImage.logoVariation,
154
- };
155
- }
149
+ if (keepLogoVariation) {
150
+ thisLogoImage = {
151
+ ...thisLogoImage,
152
+ logoVariation:
153
+ logoContentItem.settings.content.logoImage.logoVariation,
154
+ };
155
+ }
156
156
 
157
- logoContentItem.settings.content.logoImage = thisLogoImage;
157
+ logoContentItem.settings.content.logoImage = thisLogoImage;
158
158
 
159
- logoContentItem.settings.content.logoImageBase64Url = undefined;
160
-
161
- return logoContentItem;
162
- }),
159
+ logoContentItem.settings.content.logoImageBase64Url = undefined;
163
160
  });
164
161
  });
165
162
  },