@designcrowd/library.brand-page 6.0.24 → 6.0.25-ast-ai-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.
Files changed (34) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-D669Q0UD.js → CreatedOnBrandCrowd-de-de-4dIoxQby.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-C0HAYUEw.js → CreatedOnBrandCrowd-en-us-BQLeUU3o.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-DGCWU-bQ.js → CreatedOnBrandCrowd-es-es-BM1_-sjQ.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-CvcFLqKJ.js → CreatedOnBrandCrowd-fr-ca-CCzGh5vR.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-CvcFLqKJ.js → CreatedOnBrandCrowd-fr-fr-CCzGh5vR.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-D5e12KZS.js → CreatedOnBrandCrowd-pt-br-DGNmQdHr.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-D5e12KZS.js → CreatedOnBrandCrowd-pt-pt-DGNmQdHr.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-C4QarKT8.js → CreatedOnDcom-de-de-BuPW9kl0.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-DS8BkTOn.js → CreatedOnDcom-en-us-BkJBkvAv.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-BvlOUtuw.js → CreatedOnDcom-es-es-DnxR2X2t.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca--kcrYKK_.js → CreatedOnDcom-fr-ca-4iJk4lt9.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-j72SmiWV.js → CreatedOnDcom-fr-fr-DcXq3AB1.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-Ca3yZjNV.js → CreatedOnDcom-pt-br-CoKh4rmj.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-Mz9PBF5e.js → CreatedOnDcom-pt-pt-DTwloHW6.js} +1 -1
  15. package/lib/src/brand-page/models/index.d.ts +0 -1
  16. package/lib/src/brand-page/models/index.js +0 -3
  17. package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +0 -6
  18. package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.js +3 -0
  19. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +5 -5
  20. package/lib/src/clients/models.d.ts +2 -0
  21. package/lib/src/index.mjs +1 -1
  22. package/lib/src/{lib-wv-Dx_yi.js → lib-bklcft0U.js} +2059 -2055
  23. package/lib/src/shared/template-settings/store/template-settings-store.d.ts +2 -0
  24. package/lib/src/shared/template-settings/store/template-settings-store.js +22 -14
  25. package/package.json +1 -1
  26. package/src/brand-page/models/index.ts +0 -4
  27. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +0 -3
  28. package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +0 -1
  29. package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +0 -2
  30. package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.ts +4 -0
  31. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +7 -5
  32. package/src/clients/models.ts +3 -0
  33. package/src/shared/template-settings/store/template-settings-store.search-personalisation.test.ts +125 -0
  34. package/src/shared/template-settings/store/template-settings-store.ts +36 -16
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-wv-Dx_yi.js";
2
+ import { _ as t } from "./lib-bklcft0U.js";
3
3
  const i = {}, h = {
4
4
  width: "275",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-wv-Dx_yi.js";
2
+ import { _ as t } from "./lib-bklcft0U.js";
3
3
  const i = {}, h = {
4
4
  width: "251",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-wv-Dx_yi.js";
2
+ import { _ as t } from "./lib-bklcft0U.js";
3
3
  const i = {}, h = {
4
4
  width: "250",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-wv-Dx_yi.js";
2
+ import { _ as t } from "./lib-bklcft0U.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-wv-Dx_yi.js";
2
+ import { _ as t } from "./lib-bklcft0U.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-wv-Dx_yi.js";
2
+ import { _ as t } from "./lib-bklcft0U.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-wv-Dx_yi.js";
2
+ import { _ as t } from "./lib-bklcft0U.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-wv-Dx_yi.js";
2
+ import { _ as e } from "./lib-bklcft0U.js";
3
3
  const M = {}, Z = {
4
4
  width: "242",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-wv-Dx_yi.js";
2
+ import { _ as e } from "./lib-bklcft0U.js";
3
3
  const i = {}, M = {
4
4
  width: "231",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-wv-Dx_yi.js";
2
+ import { _ as e } from "./lib-bklcft0U.js";
3
3
  const M = {}, Z = {
4
4
  width: "230",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-wv-Dx_yi.js";
2
+ import { _ as e } from "./lib-bklcft0U.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-wv-Dx_yi.js";
2
+ import { _ as e } from "./lib-bklcft0U.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-wv-Dx_yi.js";
2
+ import { _ as M } from "./lib-bklcft0U.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-wv-Dx_yi.js";
2
+ import { _ as M } from "./lib-bklcft0U.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -561,7 +561,6 @@ export interface SaveContactOptions {
561
561
  }
562
562
  export declare class BrandPageModel {
563
563
  v: number;
564
- userPromptContentKey?: string;
565
564
  styles: PageStyles;
566
565
  /** @deprecated */
567
566
  headerStyles?: AbstractPageHeaderStyles;
@@ -404,9 +404,6 @@ export class PageFooterMobile extends AbstractPageFooterStyles {
404
404
  export class BrandPageModel {
405
405
  // Model version
406
406
  v;
407
- // AI personalisation key persisted with the draft so previews survive login/checkout-back/
408
- // refresh - content is retrieved by this token (user-agnostic), not regenerated (bp-5742).
409
- userPromptContentKey;
410
407
  styles;
411
408
  /** @deprecated */
412
409
  headerStyles;
@@ -8,7 +8,6 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
8
8
  userMessageId: string;
9
9
  model: {
10
10
  v: number;
11
- userPromptContentKey?: string | undefined;
12
11
  styles: {
13
12
  backgroundStyles: {
14
13
  style: {
@@ -5120,7 +5119,6 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
5120
5119
  userMessageId: string;
5121
5120
  model: {
5122
5121
  v: number;
5123
- userPromptContentKey?: string | undefined;
5124
5122
  styles: {
5125
5123
  backgroundStyles: {
5126
5124
  style: {
@@ -10238,7 +10236,6 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
10238
10236
  userMessageId: string;
10239
10237
  model: {
10240
10238
  v: number;
10241
- userPromptContentKey?: string | undefined;
10242
10239
  styles: {
10243
10240
  backgroundStyles: {
10244
10241
  style: {
@@ -15350,7 +15347,6 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
15350
15347
  userMessageId: string;
15351
15348
  model: {
15352
15349
  v: number;
15353
- userPromptContentKey?: string | undefined;
15354
15350
  styles: {
15355
15351
  backgroundStyles: {
15356
15352
  style: {
@@ -20468,7 +20464,6 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
20468
20464
  userMessageId: string;
20469
20465
  model: {
20470
20466
  v: number;
20471
- userPromptContentKey?: string | undefined;
20472
20467
  styles: {
20473
20468
  backgroundStyles: {
20474
20469
  style: {
@@ -25580,7 +25575,6 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
25580
25575
  userMessageId: string;
25581
25576
  model: {
25582
25577
  v: number;
25583
- userPromptContentKey?: string | undefined;
25584
25578
  styles: {
25585
25579
  backgroundStyles: {
25586
25580
  style: {
@@ -556,6 +556,7 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
556
556
  .filter((x) => !!x));
557
557
  }
558
558
  const gettyAssetIds = findValuesByKey(brandPageData, 'gettyAssetId');
559
+ const urlParams = new URLSearchParams(window.location.search);
559
560
  return {
560
561
  designTemplateToken: this.designTemplateToken,
561
562
  logoDraftToken: uiStore.logoDraftToken, // TODO: remove this property after the release as second release for smooth release transition use below `logoDraftTokens`
@@ -567,6 +568,8 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
567
568
  brandPageContentTypes: this.brandPageContentTypes,
568
569
  shouldPublish: this.isPublished,
569
570
  gettyAssetIds,
571
+ contentKey: urlParams.get('contentKey') ?? undefined,
572
+ contentKeyType: urlParams.get('contentKeyType') ?? undefined,
570
573
  ...prepurchaseExportData,
571
574
  };
572
575
  },
@@ -283,9 +283,11 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
283
283
  .filter((c) => c !== null),
284
284
  }));
285
285
  }
286
- if (uiStore.personalisationData) {
287
- const personalisationIndex = await getAiContentIndexByTemplateTokenAndNumberOfVariations(this.selectedTemplateId, uiStore.personalisationData.length);
288
- const { model } = await applyUserPersonalisationToBrandPageModelAsync(uiStore.personalisationData[personalisationIndex].userPersonalisation, new BrandPageModel(brandPageModel));
286
+ const activePersonalisation = templateSettingsStore.searchPersonalisationData ??
287
+ uiStore.personalisationData;
288
+ if (activePersonalisation) {
289
+ const personalisationIndex = await getAiContentIndexByTemplateTokenAndNumberOfVariations(this.selectedTemplateId, activePersonalisation.length);
290
+ const { model } = await applyUserPersonalisationToBrandPageModelAsync(activePersonalisation[personalisationIndex].userPersonalisation, new BrandPageModel(brandPageModel));
289
291
  brandPageModel.styles = model.styles;
290
292
  brandPageModel.pages = model.pages;
291
293
  }
@@ -1252,7 +1254,6 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
1252
1254
  const navigationStyleSettingsStore = useUiNavigationStyleSettingsStore();
1253
1255
  const shopStore = useShopConfigStore();
1254
1256
  const pageNavigationStore = usePageNavigationStore();
1255
- const uiStore = useUiStore();
1256
1257
  const pages = pageSettingsStore.pages.map((p) => ({
1257
1258
  ...p,
1258
1259
  contents: p.contents.map((c) => c.settings.content),
@@ -1266,7 +1267,6 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
1266
1267
  const pageNavStructure = pageNavigationStore.nav;
1267
1268
  return {
1268
1269
  v: GetLatestModelVersion(),
1269
- userPromptContentKey: uiStore.userPromptContentKey,
1270
1270
  pages,
1271
1271
  styles: {
1272
1272
  logoStyles,
@@ -1,3 +1,4 @@
1
+ import type { UserPersonalisationContent } from '@brand-page';
1
2
  export interface Paginated<T> {
2
3
  paginatedItems: T[];
3
4
  page: number;
@@ -5,6 +6,7 @@ export interface Paginated<T> {
5
6
  pageCount: number;
6
7
  totalResultCount: number;
7
8
  abTestValuesToBePushed?: Record<string, string>;
9
+ searchPersonalisation?: UserPersonalisationContent[];
8
10
  }
9
11
  export interface DesignTemplate {
10
12
  token: string;
package/lib/src/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { A as T, a as E, b as s, c as I, d as S, e as N, f as e, B as A, g as O, h as C, i as t, j as G, k as D, l as P, m as R, n as o, o as L, p as M, q as r, r as n, s as b, t as l, u as F, v as i, w as g, x as c, y as B, z as Y, C as U, D as d, E as u, F as H, G as p, H as y, I as m, J as K, K as k, L as V, M as X, N as v, O as h, P as f, Q as x, R as W, S as z, T as w, U as Z, V as j, W as q, X as J, Y as Q, Z as $, $ as aa, a0 as _a, a1 as Ta, a2 as Ea, a3 as sa, a4 as Ia, a5 as Sa, a6 as Na, a7 as ea, a8 as Aa, a9 as Oa, aa as Ca, ab as ta, ac as Ga, ad as Da, ae as Pa, af as Ra, ag as oa, ah as La, ai as Ma, aj as ra, ak as na, al as ba, am as la, an as Fa, ao as ia, ap as ga, aq as ca, ar as Ba, as as Ya, at as Ua, au as da, av as ua, aw as Ha, ax as pa, ay as ya, az as ma, aA as Ka, aB as ka, aC as Va, aD as Xa, aE as va, aF as ha, aG as fa, aH as xa, aI as Wa, aJ as za, aK as wa, aL as Za, aM as ja, aN as qa, aO as Ja, aP as Qa, aQ as $a, aR as a_, aS as __, aT as T_, aU as E_, aV as s_, aW as I_, aX as S_, aY as N_, aZ as e_, a_ as A_, a$ as O_, b0 as C_, b1 as t_, b2 as G_, b3 as D_, b4 as P_, b5 as R_, b6 as o_, b7 as L_, b8 as M_, b9 as r_, ba as n_, bb as b_, bc as l_, bd as F_, be as i_, bf as g_, bg as c_, bh as B_, bi as Y_, bj as U_, bk as d_, bl as u_, bm as H_, bn as p_, bo as y_, bp as m_, bq as K_, br as k_, bs as V_, bt as X_, bu as v_, bv as h_, bw as f_, bx as x_, by as W_, bz as z_, bA as w_, bB as Z_, bC as j_, bD as q_, bE as J_, bF as Q_, bG as $_, bH as aT, bI as _T, bJ as TT, bK as ET, bL as sT, bM as IT, bN as ST, bO as NT, bP as eT, bQ as AT, bR as OT, bS as CT, bT as tT, bU as GT, bV as DT, bW as PT, bX as RT, bY as oT, bZ as LT, b_ as MT, b$ as rT, c0 as nT, c1 as bT, c2 as lT, c3 as FT, c4 as iT, c5 as gT, c6 as cT, c7 as BT, c8 as YT, c9 as UT, ca as dT, cb as uT, cc as HT, cd as pT, ce as yT, cf as mT, cg as KT, ch as kT, ci as VT, cj as XT, ck as vT, cl as hT, cm as fT, cn as xT, co as WT, cp as zT, cq as wT, cr as ZT, cs as jT } from "./lib-wv-Dx_yi.js";
1
+ import { A as T, a as E, b as s, c as I, d as S, e as N, f as e, B as A, g as O, h as C, i as t, j as G, k as D, l as P, m as R, n as o, o as L, p as M, q as r, r as n, s as b, t as l, u as F, v as i, w as g, x as c, y as B, z as Y, C as U, D as d, E as u, F as H, G as p, H as y, I as m, J as K, K as k, L as V, M as X, N as v, O as h, P as f, Q as x, R as W, S as z, T as w, U as Z, V as j, W as q, X as J, Y as Q, Z as $, $ as aa, a0 as _a, a1 as Ta, a2 as Ea, a3 as sa, a4 as Ia, a5 as Sa, a6 as Na, a7 as ea, a8 as Aa, a9 as Oa, aa as Ca, ab as ta, ac as Ga, ad as Da, ae as Pa, af as Ra, ag as oa, ah as La, ai as Ma, aj as ra, ak as na, al as ba, am as la, an as Fa, ao as ia, ap as ga, aq as ca, ar as Ba, as as Ya, at as Ua, au as da, av as ua, aw as Ha, ax as pa, ay as ya, az as ma, aA as Ka, aB as ka, aC as Va, aD as Xa, aE as va, aF as ha, aG as fa, aH as xa, aI as Wa, aJ as za, aK as wa, aL as Za, aM as ja, aN as qa, aO as Ja, aP as Qa, aQ as $a, aR as a_, aS as __, aT as T_, aU as E_, aV as s_, aW as I_, aX as S_, aY as N_, aZ as e_, a_ as A_, a$ as O_, b0 as C_, b1 as t_, b2 as G_, b3 as D_, b4 as P_, b5 as R_, b6 as o_, b7 as L_, b8 as M_, b9 as r_, ba as n_, bb as b_, bc as l_, bd as F_, be as i_, bf as g_, bg as c_, bh as B_, bi as Y_, bj as U_, bk as d_, bl as u_, bm as H_, bn as p_, bo as y_, bp as m_, bq as K_, br as k_, bs as V_, bt as X_, bu as v_, bv as h_, bw as f_, bx as x_, by as W_, bz as z_, bA as w_, bB as Z_, bC as j_, bD as q_, bE as J_, bF as Q_, bG as $_, bH as aT, bI as _T, bJ as TT, bK as ET, bL as sT, bM as IT, bN as ST, bO as NT, bP as eT, bQ as AT, bR as OT, bS as CT, bT as tT, bU as GT, bV as DT, bW as PT, bX as RT, bY as oT, bZ as LT, b_ as MT, b$ as rT, c0 as nT, c1 as bT, c2 as lT, c3 as FT, c4 as iT, c5 as gT, c6 as cT, c7 as BT, c8 as YT, c9 as UT, ca as dT, cb as uT, cc as HT, cd as pT, ce as yT, cf as mT, cg as KT, ch as kT, ci as VT, cj as XT, ck as vT, cl as hT, cm as fT, cn as xT, co as WT, cp as zT, cq as wT, cr as ZT, cs as jT } from "./lib-bklcft0U.js";
2
2
  import { U as JT, u as QT } from "./useEventTracker-DmQ6AkNn.js";
3
3
  import { createPinia as aE, setActivePinia as _E } from "pinia";
4
4
  export {