@designcrowd/library.brand-page 5.16.24-pre-temp-6 → 5.16.24-pre-temp-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 (22) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-DAvni3oV.js → CreatedOnBrandCrowd-de-de-CKSMoYph.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-_h70_kCW.js → CreatedOnBrandCrowd-en-us-BE826zG3.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-XGHXUziy.js → CreatedOnBrandCrowd-es-es-BT1_CiIR.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-CBcJPjwh.js → CreatedOnBrandCrowd-fr-ca-Dd7QbEx8.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-CBcJPjwh.js → CreatedOnBrandCrowd-fr-fr-Dd7QbEx8.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-COwdhEVW.js → CreatedOnBrandCrowd-pt-br-Cj3w8Tzr.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-COwdhEVW.js → CreatedOnBrandCrowd-pt-pt-Cj3w8Tzr.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-KvM164QB.js → CreatedOnDcom-de-de-DgG4EwAb.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-BkLn5IJZ.js → CreatedOnDcom-en-us-Zf_zsQD-.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-5k2Supcc.js → CreatedOnDcom-es-es-BI5_Uta1.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-B5gq2Un4.js → CreatedOnDcom-fr-ca-Bwc9B1Ma.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-BXuImC8r.js → CreatedOnDcom-fr-fr-CdUHAhrh.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-ZOa7vMgY.js → CreatedOnDcom-pt-br-CnqCmpYk.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-_xuC5dNp.js → CreatedOnDcom-pt-pt-B20uZkxO.js} +1 -1
  15. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +2 -0
  16. package/lib/src/index.mjs +1 -1
  17. package/lib/src/{lib-CxRe7xow.js → lib-CUR1pqIf.js} +18 -17
  18. package/lib/src/shared/template-settings/store/template-settings-store.js +5 -6
  19. package/package.json +1 -1
  20. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +3 -0
  21. package/src/shared/logo-settings/components/LogoTemplateSearch.vue +14 -12
  22. package/src/shared/template-settings/store/template-settings-store.ts +6 -8
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-CxRe7xow.js";
2
+ import { _ as t } from "./lib-CUR1pqIf.js";
3
3
  const i = {}, h = {
4
4
  width: "275",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-CxRe7xow.js";
2
+ import { _ as t } from "./lib-CUR1pqIf.js";
3
3
  const i = {}, h = {
4
4
  width: "251",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-CxRe7xow.js";
2
+ import { _ as t } from "./lib-CUR1pqIf.js";
3
3
  const i = {}, h = {
4
4
  width: "250",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-CxRe7xow.js";
2
+ import { _ as t } from "./lib-CUR1pqIf.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-CxRe7xow.js";
2
+ import { _ as t } from "./lib-CUR1pqIf.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-CxRe7xow.js";
2
+ import { _ as t } from "./lib-CUR1pqIf.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-CxRe7xow.js";
2
+ import { _ as t } from "./lib-CUR1pqIf.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-CxRe7xow.js";
2
+ import { _ as e } from "./lib-CUR1pqIf.js";
3
3
  const M = {}, Z = {
4
4
  width: "242",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-CxRe7xow.js";
2
+ import { _ as e } from "./lib-CUR1pqIf.js";
3
3
  const i = {}, M = {
4
4
  width: "231",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-CxRe7xow.js";
2
+ import { _ as e } from "./lib-CUR1pqIf.js";
3
3
  const M = {}, Z = {
4
4
  width: "230",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-CxRe7xow.js";
2
+ import { _ as e } from "./lib-CUR1pqIf.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-CxRe7xow.js";
2
+ import { _ as e } from "./lib-CUR1pqIf.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-CxRe7xow.js";
2
+ import { _ as M } from "./lib-CUR1pqIf.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-CxRe7xow.js";
2
+ import { _ as M } from "./lib-CUR1pqIf.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -176,6 +176,7 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
176
176
  const userStore = useBrandPageMakerUserStore();
177
177
  const containerStore = useBrandPageContainerStore();
178
178
  const uiContentSettings = useUiContentSettingsStore();
179
+ // look into this
179
180
  if (!this.selectedTemplateId) {
180
181
  return;
181
182
  }
@@ -897,6 +898,7 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
897
898
  const uiStore = useUiStore();
898
899
  const videoStore = useVideoStore();
899
900
  if (userStore.isAdmin && uiStore.logoTheme) {
901
+ // need something like this on template selection too
900
902
  const themedBrandPage = applyLogoThemeToBrandPageModel(uiStore.logoTheme, this.brandPageData).model;
901
903
  return getBrandPageViewModelFromBrandPageModel(themedBrandPage, this.brandPageToken, undefined, {
902
904
  useOldLogoRenderSize: false,
package/lib/src/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { bE as E, as as T, aV as I, a6 as s, ak as N, aj as S, ag as e, bu as A, bL as O, cc as G, cb as C, ca as D, c4 as P, b3 as t, b2 as R, bQ as L, bR as M, bY as o, bN as r, bP as b, bO as F, bS as n, bT as B, c3 as l, c1 as i, ar as g, c2 as Y, a9 as U, a_ as c, b0 as d, a$ as u, e as H, f as p, B as y, a0 as K, d as V, a1 as k, j as m, ao as X, $ as v, bt as h, bM as W, az as x, aX as f, aT as z, b$ as Z, b_ as w, C as Q, b6 as j, D as q, b as J, a as $, bW as aa, b5 as _a, aY as Ea, aU as Ta, c8 as Ia, c9 as sa, bZ as Na, bI as Sa, ae as ea, c0 as Aa, c5 as Oa, bb as Ga, aL as Ca, bh as Da, F as Pa, a8 as ta, a7 as Ra, h as La, a2 as Ma, b8 as oa, aW as ra, aS as ba, a4 as Fa, al as na, l as Ba, M as la, H as ia, aa as ga, bF as Ya, bc as Ua, bd as ca, bD as da, bj as ua, bl as Ha, b7 as pa, L as ya, aK as Ka, bq as Va, aQ as ka, bp as ma, at as Xa, ac as va, bX as ha, c6 as Wa, c7 as xa, aZ as fa, N as za, aC as Za, aB as wa, aD as Qa, ax as ja, ay as qa, aA as Ja, bf as $a, bm as a_, b9 as __, o as E_, am as T_, an as I_, ah as s_, ai as N_, af as S_, a5 as e_, m as A_, br as O_, aq as G_, bJ as C_, bK as D_, bV as P_, ad as t_, bH as R_, bs as L_, n as M_, S as o_, P as r_, aJ as b_, bG as F_, bg as n_, by as B_, bx as l_, bA as i_, bv as g_, bB as Y_, bC as U_, bw as c_, bz as d_, aE as u_, aF as H_, bo as p_, bn as y_, aH as K_, aI as V_, aN as k_, b1 as m_, aM as X_, aO as v_, U as h_, ab as W_, aR as x_, k as f_, be as z_, ap as Z_, ba as w_, bi as Q_, bk as j_, b4 as q_, v as J_, R as $_, a3 as aE, g as _E, bU as EE, r as TE, u as IE, O as sE, Z as NE, aG as SE, aP as eE, av as AE, p as OE, X as GE, t as CE, x as DE, au as PE, i as tE, aw as RE, c as LE, q as ME, w as oE, W as rE, Q as bE, s as FE, Y as nE, E as BE, y as lE, z as iE, V as gE, G as YE, T as UE, I as cE, K as dE, A as uE, J as HE } from "./lib-CxRe7xow.js";
1
+ import { bE as E, as as T, aV as I, a6 as s, ak as N, aj as S, ag as e, bu as A, bL as O, cc as G, cb as C, ca as D, c4 as P, b3 as t, b2 as R, bQ as L, bR as M, bY as o, bN as r, bP as b, bO as F, bS as n, bT as B, c3 as l, c1 as i, ar as g, c2 as Y, a9 as U, a_ as c, b0 as d, a$ as u, e as H, f as p, B as y, a0 as K, d as V, a1 as k, j as m, ao as X, $ as v, bt as h, bM as W, az as x, aX as f, aT as z, b$ as Z, b_ as w, C as Q, b6 as j, D as q, b as J, a as $, bW as aa, b5 as _a, aY as Ea, aU as Ta, c8 as Ia, c9 as sa, bZ as Na, bI as Sa, ae as ea, c0 as Aa, c5 as Oa, bb as Ga, aL as Ca, bh as Da, F as Pa, a8 as ta, a7 as Ra, h as La, a2 as Ma, b8 as oa, aW as ra, aS as ba, a4 as Fa, al as na, l as Ba, M as la, H as ia, aa as ga, bF as Ya, bc as Ua, bd as ca, bD as da, bj as ua, bl as Ha, b7 as pa, L as ya, aK as Ka, bq as Va, aQ as ka, bp as ma, at as Xa, ac as va, bX as ha, c6 as Wa, c7 as xa, aZ as fa, N as za, aC as Za, aB as wa, aD as Qa, ax as ja, ay as qa, aA as Ja, bf as $a, bm as a_, b9 as __, o as E_, am as T_, an as I_, ah as s_, ai as N_, af as S_, a5 as e_, m as A_, br as O_, aq as G_, bJ as C_, bK as D_, bV as P_, ad as t_, bH as R_, bs as L_, n as M_, S as o_, P as r_, aJ as b_, bG as F_, bg as n_, by as B_, bx as l_, bA as i_, bv as g_, bB as Y_, bC as U_, bw as c_, bz as d_, aE as u_, aF as H_, bo as p_, bn as y_, aH as K_, aI as V_, aN as k_, b1 as m_, aM as X_, aO as v_, U as h_, ab as W_, aR as x_, k as f_, be as z_, ap as Z_, ba as w_, bi as Q_, bk as j_, b4 as q_, v as J_, R as $_, a3 as aE, g as _E, bU as EE, r as TE, u as IE, O as sE, Z as NE, aG as SE, aP as eE, av as AE, p as OE, X as GE, t as CE, x as DE, au as PE, i as tE, aw as RE, c as LE, q as ME, w as oE, W as rE, Q as bE, s as FE, Y as nE, E as BE, y as lE, z as iE, V as gE, G as YE, T as UE, I as cE, K as dE, A as uE, J as HE } from "./lib-CUR1pqIf.js";
2
2
  import { createPinia as yE, setActivePinia as KE } from "pinia";
3
3
  export {
4
4
  E as ABOUT_SECTION_SETTINGS_CONFIG,
@@ -59018,10 +59018,10 @@ const Cn = /* @__PURE__ */ S5(aL1), lL1 = (e, t, n) => {
59018
59018
  ut(() => n.context.isDesignCom, async () => {
59019
59019
  const S = H9().toLowerCase(), _ = n.context.isDesignCom ? "Dcom" : "BrandCrowd";
59020
59020
  try {
59021
- const { default: k } = await uM(/* @__PURE__ */ Object.assign({ "./watermark/CreatedOnBrandCrowd-de-de.vue": () => import("./CreatedOnBrandCrowd-de-de-DAvni3oV.js"), "./watermark/CreatedOnBrandCrowd-en-us.vue": () => import("./CreatedOnBrandCrowd-en-us-_h70_kCW.js"), "./watermark/CreatedOnBrandCrowd-es-es.vue": () => import("./CreatedOnBrandCrowd-es-es-XGHXUziy.js"), "./watermark/CreatedOnBrandCrowd-fr-ca.vue": () => import("./CreatedOnBrandCrowd-fr-ca-CBcJPjwh.js"), "./watermark/CreatedOnBrandCrowd-fr-fr.vue": () => import("./CreatedOnBrandCrowd-fr-fr-CBcJPjwh.js"), "./watermark/CreatedOnBrandCrowd-pt-br.vue": () => import("./CreatedOnBrandCrowd-pt-br-COwdhEVW.js"), "./watermark/CreatedOnBrandCrowd-pt-pt.vue": () => import("./CreatedOnBrandCrowd-pt-pt-COwdhEVW.js"), "./watermark/CreatedOnDcom-de-de.vue": () => import("./CreatedOnDcom-de-de-KvM164QB.js"), "./watermark/CreatedOnDcom-en-us.vue": () => import("./CreatedOnDcom-en-us-BkLn5IJZ.js"), "./watermark/CreatedOnDcom-es-es.vue": () => import("./CreatedOnDcom-es-es-5k2Supcc.js"), "./watermark/CreatedOnDcom-fr-ca.vue": () => import("./CreatedOnDcom-fr-ca-B5gq2Un4.js"), "./watermark/CreatedOnDcom-fr-fr.vue": () => import("./CreatedOnDcom-fr-fr-BXuImC8r.js"), "./watermark/CreatedOnDcom-pt-br.vue": () => import("./CreatedOnDcom-pt-br-ZOa7vMgY.js"), "./watermark/CreatedOnDcom-pt-pt.vue": () => import("./CreatedOnDcom-pt-pt-_xuC5dNp.js") }), `./watermark/CreatedOn${_}-${S}.vue`, 3);
59021
+ const { default: k } = await uM(/* @__PURE__ */ Object.assign({ "./watermark/CreatedOnBrandCrowd-de-de.vue": () => import("./CreatedOnBrandCrowd-de-de-CKSMoYph.js"), "./watermark/CreatedOnBrandCrowd-en-us.vue": () => import("./CreatedOnBrandCrowd-en-us-BE826zG3.js"), "./watermark/CreatedOnBrandCrowd-es-es.vue": () => import("./CreatedOnBrandCrowd-es-es-BT1_CiIR.js"), "./watermark/CreatedOnBrandCrowd-fr-ca.vue": () => import("./CreatedOnBrandCrowd-fr-ca-Dd7QbEx8.js"), "./watermark/CreatedOnBrandCrowd-fr-fr.vue": () => import("./CreatedOnBrandCrowd-fr-fr-Dd7QbEx8.js"), "./watermark/CreatedOnBrandCrowd-pt-br.vue": () => import("./CreatedOnBrandCrowd-pt-br-Cj3w8Tzr.js"), "./watermark/CreatedOnBrandCrowd-pt-pt.vue": () => import("./CreatedOnBrandCrowd-pt-pt-Cj3w8Tzr.js"), "./watermark/CreatedOnDcom-de-de.vue": () => import("./CreatedOnDcom-de-de-DgG4EwAb.js"), "./watermark/CreatedOnDcom-en-us.vue": () => import("./CreatedOnDcom-en-us-Zf_zsQD-.js"), "./watermark/CreatedOnDcom-es-es.vue": () => import("./CreatedOnDcom-es-es-BI5_Uta1.js"), "./watermark/CreatedOnDcom-fr-ca.vue": () => import("./CreatedOnDcom-fr-ca-Bwc9B1Ma.js"), "./watermark/CreatedOnDcom-fr-fr.vue": () => import("./CreatedOnDcom-fr-fr-CdUHAhrh.js"), "./watermark/CreatedOnDcom-pt-br.vue": () => import("./CreatedOnDcom-pt-br-CnqCmpYk.js"), "./watermark/CreatedOnDcom-pt-pt.vue": () => import("./CreatedOnDcom-pt-pt-B20uZkxO.js") }), `./watermark/CreatedOn${_}-${S}.vue`, 3);
59022
59022
  i.value = k;
59023
59023
  } catch {
59024
- const { default: V } = await uM(/* @__PURE__ */ Object.assign({ "./watermark/CreatedOnBrandCrowd-en-us.vue": () => import("./CreatedOnBrandCrowd-en-us-_h70_kCW.js"), "./watermark/CreatedOnDcom-en-us.vue": () => import("./CreatedOnDcom-en-us-BkLn5IJZ.js") }), `./watermark/CreatedOn${_}-en-us.vue`, 3);
59024
+ const { default: V } = await uM(/* @__PURE__ */ Object.assign({ "./watermark/CreatedOnBrandCrowd-en-us.vue": () => import("./CreatedOnBrandCrowd-en-us-BE826zG3.js"), "./watermark/CreatedOnDcom-en-us.vue": () => import("./CreatedOnDcom-en-us-Zf_zsQD-.js") }), `./watermark/CreatedOn${_}-en-us.vue`, 3);
59025
59025
  i.value = V;
59026
59026
  }
59027
59027
  }, {
@@ -70930,14 +70930,16 @@ const vh = () => VC || (VC = new oF1()), _l = (e, t) => sF1(e).then(
70930
70930
  },
70931
70931
  { deep: !0 }
70932
70932
  ), ut(
70933
- () => o.value,
70933
+ () => {
70934
+ var s;
70935
+ return (s = o.value[i.value.logoVariation]) == null ? void 0 : s.s3Token;
70936
+ },
70934
70937
  async (s, r) => {
70935
70938
  if (!r)
70936
70939
  return;
70937
- const a = s[i.value.logoVariation].s3Token !== r[i.value.logoVariation].s3Token;
70940
+ const a = s !== r;
70938
70941
  !n.isAdmin && a && (await this._setTemplates({ templates: [] }), await this._setPageNoLoaded({ pageNoLoaded: 0 }), await this._setPageNo({ pageNo: 1 }), await this.loadPageNo({ pageNo: 1 }));
70939
- },
70940
- { deep: !0 }
70942
+ }
70941
70943
  );
70942
70944
  }
70943
70945
  }
@@ -96822,19 +96824,18 @@ const Yse = /* @__PURE__ */ v(Gse, [["render", Kse]]), Xse = { class: "tw-font-b
96822
96824
  version: o.selectedTemplate.version,
96823
96825
  isByo: !1
96824
96826
  });
96825
- const S = E3();
96826
- await r.setLogoDraftToken(S), await r.resetLogoEdits(), await r.updateMetadataAsync(o.primaryText, !0), await r.updateEditableLogoImageUrlAsync();
96827
- const _ = $2.getInstance(), [k] = await Promise.all([
96828
- _.getLogoAttributesByLogoTemplateTokenAsync(
96827
+ const S = E3(), _ = async () => {
96828
+ await r.setLogoDraftToken(S), await r.resetLogoEdits(), await r.updateMetadataAsync(o.primaryText, !0), await r.updateEditableLogoImageUrlAsync();
96829
+ }, k = $2.getInstance(), [V, x] = await Promise.all([
96830
+ _(),
96831
+ k.getLogoAttributesByLogoTemplateTokenAsync(
96829
96832
  o.selectedTemplate.token
96830
- ),
96831
- // Now that S3 tokens are updated, load templates with the new logo
96832
- l.onTemplateSelected({
96833
- templateId: d.designTemplateToken,
96834
- forceApply: !0
96835
- })
96833
+ )
96836
96834
  ]);
96837
- k && a.applyLogoDesignAttributes(k), o.showLogoSwitchConfirmationModal = !1, o.isSwitchingLogo = !1, M2.sendLogoSearchImpressionClickData(
96835
+ x && a.applyLogoDesignAttributes(x), await l.onTemplateSelected({
96836
+ templateId: d.designTemplateToken,
96837
+ forceApply: !0
96838
+ }), o.showLogoSwitchConfirmationModal = !1, o.isSwitchingLogo = !1, M2.sendLogoSearchImpressionClickData(
96838
96839
  o.selectedTemplate.token,
96839
96840
  o.selectedTemplate.searchImpressionId
96840
96841
  );
@@ -359,13 +359,12 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
359
359
  await this.loadPageNo({ pageNo: 1 });
360
360
  }
361
361
  }, { deep: true });
362
- watch(() => editableLogoVariations.value, async (newVariations, oldVariations) => {
363
- // Skip initial load when oldVariations is undefined
364
- if (!oldVariations) {
362
+ watch(() => editableLogoVariations.value[selectedLogoImage.value.logoVariation]
363
+ ?.s3Token, async (newS3Token, oldS3Token) => {
364
+ if (!oldS3Token) {
365
365
  return;
366
366
  }
367
- const hasLogoChanged = newVariations[selectedLogoImage.value.logoVariation].s3Token !==
368
- oldVariations[selectedLogoImage.value.logoVariation].s3Token;
367
+ const hasLogoChanged = newS3Token !== oldS3Token;
369
368
  if (!brandPageMakerUserStore.isAdmin && hasLogoChanged) {
370
369
  // Reset templates state and reload with new logo
371
370
  // Use the same pattern as onCategorySelected and onSearch
@@ -374,7 +373,7 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
374
373
  await this._setPageNo({ pageNo: 1 });
375
374
  await this.loadPageNo({ pageNo: 1 });
376
375
  }
377
- }, { deep: true });
376
+ });
378
377
  },
379
378
  },
380
379
  });
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.16.24-pre-temp-6",
4
+ "version": "5.16.24-pre-temp-7",
5
5
  "author": "Design.com Eng",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",
@@ -359,6 +359,8 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
359
359
  const containerStore = useBrandPageContainerStore();
360
360
  const uiContentSettings = useUiContentSettingsStore();
361
361
 
362
+ // look into this
363
+
362
364
  if (!this.selectedTemplateId) {
363
365
  return;
364
366
  }
@@ -1383,6 +1385,7 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
1383
1385
  const videoStore = useVideoStore();
1384
1386
 
1385
1387
  if (userStore.isAdmin && uiStore.logoTheme) {
1388
+ // need something like this on template selection too
1386
1389
  const themedBrandPage = applyLogoThemeToBrandPageModel(
1387
1390
  uiStore.logoTheme,
1388
1391
  this.brandPageData,
@@ -178,30 +178,32 @@ const onNewLogoSelected = async () => {
178
178
 
179
179
  const newLogoDraftToken = uuidv4();
180
180
 
181
- // Update logo edits, metadata, and S3 tokens sequentially before loading templates
182
- await editableLogoStore.setLogoDraftToken(newLogoDraftToken);
183
- await editableLogoStore.resetLogoEdits();
184
- await editableLogoStore.updateMetadataAsync(data.primaryText, true);
185
- await editableLogoStore.updateEditableLogoImageUrlAsync();
181
+ const updateTask = async () => {
182
+ await editableLogoStore.setLogoDraftToken(newLogoDraftToken);
183
+ await editableLogoStore.resetLogoEdits();
184
+ await editableLogoStore.updateMetadataAsync(data.primaryText, true);
185
+ await editableLogoStore.updateEditableLogoImageUrlAsync();
186
+ };
186
187
 
187
188
  const client = FabricRenderClient.getInstance();
188
189
 
189
- // Get logo design attributes in parallel with template selection (can be independent)
190
- const [logoDesignAttributes] = await Promise.all([
190
+ // To handle parallel requests
191
+ const [_, logoDesignAttributes] = await Promise.all([
192
+ updateTask(),
191
193
  client.getLogoAttributesByLogoTemplateTokenAsync(
192
194
  data.selectedTemplate.token,
193
195
  ),
194
- // Now that S3 tokens are updated, load templates with the new logo
195
- templateSettingStore.onTemplateSelected({
196
- templateId: containerStore.designTemplateToken,
197
- forceApply: true,
198
- }),
199
196
  ]);
200
197
 
201
198
  if (logoDesignAttributes) {
202
199
  logoSettingStore.applyLogoDesignAttributes(logoDesignAttributes);
203
200
  }
204
201
 
202
+ await templateSettingStore.onTemplateSelected({
203
+ templateId: containerStore.designTemplateToken,
204
+ forceApply: true,
205
+ });
206
+
205
207
  data.showLogoSwitchConfirmationModal = false;
206
208
  data.isSwitchingLogo = false;
207
209
 
@@ -516,16 +516,15 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
516
516
  );
517
517
 
518
518
  watch(
519
- () => editableLogoVariations.value,
520
- async (newVariations, oldVariations) => {
521
- // Skip initial load when oldVariations is undefined
522
- if (!oldVariations) {
519
+ () =>
520
+ editableLogoVariations.value[selectedLogoImage.value.logoVariation]
521
+ ?.s3Token,
522
+ async (newS3Token, oldS3Token) => {
523
+ if (!oldS3Token) {
523
524
  return;
524
525
  }
525
526
 
526
- const hasLogoChanged =
527
- newVariations[selectedLogoImage.value.logoVariation].s3Token !==
528
- oldVariations[selectedLogoImage.value.logoVariation].s3Token;
527
+ const hasLogoChanged = newS3Token !== oldS3Token;
529
528
 
530
529
  if (!brandPageMakerUserStore.isAdmin && hasLogoChanged) {
531
530
  // Reset templates state and reload with new logo
@@ -536,7 +535,6 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
536
535
  await this.loadPageNo({ pageNo: 1 });
537
536
  }
538
537
  },
539
- { deep: true },
540
538
  );
541
539
  },
542
540
  },