@designcrowd/library.brand-page 5.14.8 → 5.14.9
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/{CreatedOnBrandCrowd-de-de-CiXGpUsj.js → CreatedOnBrandCrowd-de-de-5lGSHeUR.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-BjBeAHIJ.js → CreatedOnBrandCrowd-en-us-q6NzpjRy.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-COz-dVj5.js → CreatedOnBrandCrowd-es-es-Y6tA9XVi.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-DdRo8IoH.js → CreatedOnBrandCrowd-fr-fr-eMjr_GUU.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-YPxQ1gbj.js → CreatedOnBrandCrowd-pt-pt-BDkCWJFa.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-DeUP5Ur5.js → CreatedOnDcom-de-de-DqOF75SZ.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-BjaQwhMw.js → CreatedOnDcom-en-us-Cikdxq8F.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-CYexVJc5.js → CreatedOnDcom-es-es-DDnXD56X.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-BktbLTrT.js → CreatedOnDcom-fr-fr-BpVmVCAd.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-HnEwifku.js → CreatedOnDcom-pt-pt-D-Mf6uF4.js} +1 -1
- package/lib/src/brand-page/utils/personalisation.util.js +2 -2
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-BXmT_3as.js → lib-DXgTJds-.js} +3 -3
- package/package.json +1 -1
- package/src/brand-page/utils/personalisation.util.test.ts +9 -9
- package/src/brand-page/utils/personalisation.util.ts +2 -4
|
@@ -18,8 +18,8 @@ export const getPersonalisationMappingForContentType = (contentType) => {
|
|
|
18
18
|
};
|
|
19
19
|
export const getModifiedPersonalisationPropertyKeyBasedOnCondition = (property, option) => {
|
|
20
20
|
let newProperty = property;
|
|
21
|
-
if (property === 'description'
|
|
22
|
-
|
|
21
|
+
if (property === 'description') {
|
|
22
|
+
// For now we are using short description for all types
|
|
23
23
|
newProperty = 'descriptionShort';
|
|
24
24
|
}
|
|
25
25
|
else if (property === 'imageUrls' || property === 'shapes') {
|
package/lib/src/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bz as E, an as T, aQ as I, a3 as N, ag as S, ad as s, bp as A, bG as O, c7 as e, c6 as G, c5 as C, b$ as D, a_ as P, aZ as R, bL as t, bM as L, bT as M, bI as o, bK as b, bJ as r, bN as F, bO as n, b_ as B, bY as g, am as l, bZ as i, a6 as Y, aV as U, aX as c, aW as d, e as u, f as H, B as y, Y as p, d as K, Z as k, j as V, aj as X, X as m, bo as v, bH as h, au as W, aS as x, aO as f, bW as Z, bV as w, C as z, b1 as Q, D as j, b as q, a as J, bR as $, b0 as aa, aT as _a, aP as Ea, c3 as Ta, c4 as Ia, bU as Na, bD as Sa, ab as sa, bX as Aa, c0 as Oa, b6 as ea, aG as Ga, bc as Ca, F as Da, a5 as Pa, a4 as Ra, h as ta, $ as La, b3 as Ma, aR as oa, aN as ba, a1 as ra, G as Fa, I as na, H as Ba, a7 as ga, bA as la, b7 as ia, b8 as Ya, by as Ua, be as ca, bg as da, b2 as ua, L as Ha, aF as ya, bl as pa, aL as Ka, bk as ka, ao as Va, a9 as Xa, bS as ma, c1 as va, c2 as ha, aU as Wa, N as xa, ax as fa, aw as Za, ay as wa, as as za, at as Qa, av as ja, ba as qa, bh as Ja, b4 as $a, n as a_, ah as __, ai as E_, ae as T_, af as I_, ac as N_, a2 as S_, l as s_, bm as A_, al as O_, bE as e_, bF as G_, bQ as C_, aa as D_, bC as P_, bn as R_, m as t_, S as L_, P as M_, aE as o_, bB as b_, bb as r_, bt as F_, bs as n_, bv as B_, bq as g_, bw as l_, bx as i_, br as Y_, bu as U_, az as c_, aA as d_, bj as u_, bi as H_, aC as y_, aD as p_, aI as K_, aY as k_, aH as V_, aJ as X_, U as m_, a8 as v_, aM as h_, k as W_, b9 as x_, ak as f_, b5 as Z_, bd as w_, bf as z_, a$ as Q_, M as j_, a0 as q_, g as J_, bP as $_, q as aE, J as _E, W as EE, aB as TE, aK as IE, aq as NE, o as SE, T as sE, r as AE, u as OE, ap as eE, i as GE, ar as CE, c as DE, p as PE, t as RE, R as tE, K as LE, s as ME, V as oE, y as bE, v as rE, w as FE, Q as nE, z as BE, O as gE, A as lE, E as iE, x as YE } from "./lib-
|
|
1
|
+
import { bz as E, an as T, aQ as I, a3 as N, ag as S, ad as s, bp as A, bG as O, c7 as e, c6 as G, c5 as C, b$ as D, a_ as P, aZ as R, bL as t, bM as L, bT as M, bI as o, bK as b, bJ as r, bN as F, bO as n, b_ as B, bY as g, am as l, bZ as i, a6 as Y, aV as U, aX as c, aW as d, e as u, f as H, B as y, Y as p, d as K, Z as k, j as V, aj as X, X as m, bo as v, bH as h, au as W, aS as x, aO as f, bW as Z, bV as w, C as z, b1 as Q, D as j, b as q, a as J, bR as $, b0 as aa, aT as _a, aP as Ea, c3 as Ta, c4 as Ia, bU as Na, bD as Sa, ab as sa, bX as Aa, c0 as Oa, b6 as ea, aG as Ga, bc as Ca, F as Da, a5 as Pa, a4 as Ra, h as ta, $ as La, b3 as Ma, aR as oa, aN as ba, a1 as ra, G as Fa, I as na, H as Ba, a7 as ga, bA as la, b7 as ia, b8 as Ya, by as Ua, be as ca, bg as da, b2 as ua, L as Ha, aF as ya, bl as pa, aL as Ka, bk as ka, ao as Va, a9 as Xa, bS as ma, c1 as va, c2 as ha, aU as Wa, N as xa, ax as fa, aw as Za, ay as wa, as as za, at as Qa, av as ja, ba as qa, bh as Ja, b4 as $a, n as a_, ah as __, ai as E_, ae as T_, af as I_, ac as N_, a2 as S_, l as s_, bm as A_, al as O_, bE as e_, bF as G_, bQ as C_, aa as D_, bC as P_, bn as R_, m as t_, S as L_, P as M_, aE as o_, bB as b_, bb as r_, bt as F_, bs as n_, bv as B_, bq as g_, bw as l_, bx as i_, br as Y_, bu as U_, az as c_, aA as d_, bj as u_, bi as H_, aC as y_, aD as p_, aI as K_, aY as k_, aH as V_, aJ as X_, U as m_, a8 as v_, aM as h_, k as W_, b9 as x_, ak as f_, b5 as Z_, bd as w_, bf as z_, a$ as Q_, M as j_, a0 as q_, g as J_, bP as $_, q as aE, J as _E, W as EE, aB as TE, aK as IE, aq as NE, o as SE, T as sE, r as AE, u as OE, ap as eE, i as GE, ar as CE, c as DE, p as PE, t as RE, R as tE, K as LE, s as ME, V as oE, y as bE, v as rE, w as FE, Q as nE, z as BE, O as gE, A as lE, E as iE, x as YE } from "./lib-DXgTJds-.js";
|
|
2
2
|
import { createPinia as cE, setActivePinia as dE } from "pinia";
|
|
3
3
|
export {
|
|
4
4
|
E as ABOUT_SECTION_SETTINGS_CONFIG,
|
|
@@ -35470,7 +35470,7 @@ const _L = ["metadata"], ML = [
|
|
|
35470
35470
|
return Object.assign({}, t, n);
|
|
35471
35471
|
}, Fh = (e, t) => {
|
|
35472
35472
|
let n = e;
|
|
35473
|
-
return e === "description"
|
|
35473
|
+
return e === "description" ? n = "descriptionShort" : (e === "imageUrls" || e === "shapes") && (n = t.isSvgShape ? "shapes" : "imageUrls"), n;
|
|
35474
35474
|
}, If1 = async (e, t) => {
|
|
35475
35475
|
var i, s, r;
|
|
35476
35476
|
const n = e[t];
|
|
@@ -57323,10 +57323,10 @@ const G0 = /* @__PURE__ */ N6(hk1), fk1 = (e, t, n) => {
|
|
|
57323
57323
|
Qt(() => n.context.isDesignCom, async () => {
|
|
57324
57324
|
const S = $7().toLowerCase(), T = n.context.isDesignCom ? "Dcom" : "BrandCrowd";
|
|
57325
57325
|
try {
|
|
57326
|
-
const { default: M } = await M_(/* @__PURE__ */ Object.assign({ "./watermark/CreatedOnBrandCrowd-de-de.vue": () => import("./CreatedOnBrandCrowd-de-de-
|
|
57326
|
+
const { default: M } = await M_(/* @__PURE__ */ Object.assign({ "./watermark/CreatedOnBrandCrowd-de-de.vue": () => import("./CreatedOnBrandCrowd-de-de-5lGSHeUR.js"), "./watermark/CreatedOnBrandCrowd-en-us.vue": () => import("./CreatedOnBrandCrowd-en-us-q6NzpjRy.js"), "./watermark/CreatedOnBrandCrowd-es-es.vue": () => import("./CreatedOnBrandCrowd-es-es-Y6tA9XVi.js"), "./watermark/CreatedOnBrandCrowd-fr-fr.vue": () => import("./CreatedOnBrandCrowd-fr-fr-eMjr_GUU.js"), "./watermark/CreatedOnBrandCrowd-pt-pt.vue": () => import("./CreatedOnBrandCrowd-pt-pt-BDkCWJFa.js"), "./watermark/CreatedOnDcom-de-de.vue": () => import("./CreatedOnDcom-de-de-DqOF75SZ.js"), "./watermark/CreatedOnDcom-en-us.vue": () => import("./CreatedOnDcom-en-us-Cikdxq8F.js"), "./watermark/CreatedOnDcom-es-es.vue": () => import("./CreatedOnDcom-es-es-DDnXD56X.js"), "./watermark/CreatedOnDcom-fr-fr.vue": () => import("./CreatedOnDcom-fr-fr-BpVmVCAd.js"), "./watermark/CreatedOnDcom-pt-pt.vue": () => import("./CreatedOnDcom-pt-pt-D-Mf6uF4.js") }), `./watermark/CreatedOn${T}-${S}.vue`, 3);
|
|
57327
57327
|
i.value = M;
|
|
57328
57328
|
} catch {
|
|
57329
|
-
const { default: E } = await M_(/* @__PURE__ */ Object.assign({ "./watermark/CreatedOnBrandCrowd-en-us.vue": () => import("./CreatedOnBrandCrowd-en-us-
|
|
57329
|
+
const { default: E } = await M_(/* @__PURE__ */ Object.assign({ "./watermark/CreatedOnBrandCrowd-en-us.vue": () => import("./CreatedOnBrandCrowd-en-us-q6NzpjRy.js"), "./watermark/CreatedOnDcom-en-us.vue": () => import("./CreatedOnDcom-en-us-Cikdxq8F.js") }), `./watermark/CreatedOn${T}-en-us.vue`, 3);
|
|
57330
57330
|
i.value = E;
|
|
57331
57331
|
}
|
|
57332
57332
|
}, {
|
package/package.json
CHANGED
|
@@ -60,7 +60,7 @@ describe('personalisation.util', async () => {
|
|
|
60
60
|
|
|
61
61
|
const textContent = {
|
|
62
62
|
...createInitialTextContent({
|
|
63
|
-
brandPageType:
|
|
63
|
+
brandPageType: BRAND_PAGE_TYPES.brandSite,
|
|
64
64
|
}),
|
|
65
65
|
text,
|
|
66
66
|
personalisationRole: undefined,
|
|
@@ -94,7 +94,7 @@ describe('personalisation.util', async () => {
|
|
|
94
94
|
|
|
95
95
|
const textContent = {
|
|
96
96
|
...createInitialTextContent({
|
|
97
|
-
brandPageType:
|
|
97
|
+
brandPageType: BRAND_PAGE_TYPES.brandSite,
|
|
98
98
|
}),
|
|
99
99
|
text,
|
|
100
100
|
personalisationRole: 'about',
|
|
@@ -120,7 +120,7 @@ describe('personalisation.util', async () => {
|
|
|
120
120
|
// Assert
|
|
121
121
|
expect(result.isModified).toBe(true);
|
|
122
122
|
expect((result.model.pages[0].contents[0] as TextContent).text).toBe(
|
|
123
|
-
PERSONALISATION.aboutSection.
|
|
123
|
+
PERSONALISATION.aboutSection.descriptionShort,
|
|
124
124
|
);
|
|
125
125
|
});
|
|
126
126
|
|
|
@@ -162,7 +162,7 @@ describe('personalisation.util', async () => {
|
|
|
162
162
|
|
|
163
163
|
const textContent = {
|
|
164
164
|
...createInitialTextContent({
|
|
165
|
-
brandPageType:
|
|
165
|
+
brandPageType: BRAND_PAGE_TYPES.brandSite,
|
|
166
166
|
}),
|
|
167
167
|
text: replaceText,
|
|
168
168
|
personalisationRole: 'about',
|
|
@@ -207,7 +207,7 @@ describe('personalisation.util', async () => {
|
|
|
207
207
|
// Assert
|
|
208
208
|
expect(result.isModified).toBe(true);
|
|
209
209
|
expect((result.model.pages[0].contents[0] as TextContent).text).toBe(
|
|
210
|
-
PERSONALISATION.aboutSection.
|
|
210
|
+
PERSONALISATION.aboutSection.descriptionShort,
|
|
211
211
|
);
|
|
212
212
|
expect(
|
|
213
213
|
(result.model.pages[0].contents[1] as GeneralLinkContent).title,
|
|
@@ -217,7 +217,7 @@ describe('personalisation.util', async () => {
|
|
|
217
217
|
).toBe(PERSONALISATION.profileSection.title);
|
|
218
218
|
expect(
|
|
219
219
|
(result.model.pages[1].contents[0] as BannerSectionContent).description,
|
|
220
|
-
).toBe(PERSONALISATION.profileSection.
|
|
220
|
+
).toBe(PERSONALISATION.profileSection.descriptionShort);
|
|
221
221
|
});
|
|
222
222
|
|
|
223
223
|
test('applyUserPersonalisationToBrandPageModelAsync should return modified when input has personalised images contents', async () => {
|
|
@@ -704,7 +704,7 @@ describe('personalisation.util', async () => {
|
|
|
704
704
|
// Arrange
|
|
705
705
|
const textContent = {
|
|
706
706
|
...createInitialTextContent({
|
|
707
|
-
brandPageType:
|
|
707
|
+
brandPageType: BRAND_PAGE_TYPES.default,
|
|
708
708
|
}),
|
|
709
709
|
textItems: [
|
|
710
710
|
{
|
|
@@ -826,7 +826,7 @@ describe('personalisation.util', async () => {
|
|
|
826
826
|
// Arrange
|
|
827
827
|
const textContent = {
|
|
828
828
|
...createInitialTextContent({
|
|
829
|
-
brandPageType:
|
|
829
|
+
brandPageType: BRAND_PAGE_TYPES.brandSite,
|
|
830
830
|
}),
|
|
831
831
|
textItems: [
|
|
832
832
|
{
|
|
@@ -851,7 +851,7 @@ describe('personalisation.util', async () => {
|
|
|
851
851
|
} as BannerSectionContent;
|
|
852
852
|
|
|
853
853
|
const model = new BrandPageModel({
|
|
854
|
-
brandPageType: BRAND_PAGE_TYPES.
|
|
854
|
+
brandPageType: BRAND_PAGE_TYPES.brandSite,
|
|
855
855
|
pages: [
|
|
856
856
|
{
|
|
857
857
|
title: 'home',
|
|
@@ -59,10 +59,8 @@ export const getModifiedPersonalisationPropertyKeyBasedOnCondition = (
|
|
|
59
59
|
) => {
|
|
60
60
|
let newProperty = property;
|
|
61
61
|
|
|
62
|
-
if (
|
|
63
|
-
|
|
64
|
-
option.brandPageType !== BRAND_PAGE_TYPES.brandSite
|
|
65
|
-
) {
|
|
62
|
+
if (property === 'description') {
|
|
63
|
+
// For now we are using short description for all types
|
|
66
64
|
newProperty = 'descriptionShort';
|
|
67
65
|
} else if (property === 'imageUrls' || property === 'shapes') {
|
|
68
66
|
newProperty = !!option.isSvgShape ? 'shapes' : 'imageUrls';
|