@designcrowd/library.brand-page 5.16.28-enable-getty-21 → 5.16.28-enable-getty-23

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 (38) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-CE5S6d8I.js → CreatedOnBrandCrowd-de-de-CkUSK3MQ.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-BMpWHpwo.js → CreatedOnBrandCrowd-en-us-B_p1iXYg.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-BBmGCX0e.js → CreatedOnBrandCrowd-es-es-DNjkB07X.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-BbKrGU2C.js → CreatedOnBrandCrowd-fr-ca-H8PqWJPw.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-BbKrGU2C.js → CreatedOnBrandCrowd-fr-fr-H8PqWJPw.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-ByrqZQUg.js → CreatedOnBrandCrowd-pt-br-C6Nx2r0I.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-ByrqZQUg.js → CreatedOnBrandCrowd-pt-pt-C6Nx2r0I.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-CJ756qMq.js → CreatedOnDcom-de-de-DHwYhcla.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-w34kflwP.js → CreatedOnDcom-en-us-CGXPKfnB.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-B3iST2Ke.js → CreatedOnDcom-es-es-DPHULLP4.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-hi7sAjqE.js → CreatedOnDcom-fr-ca-D_l8zO79.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-CD08tZDw.js → CreatedOnDcom-fr-fr-CvOisOZ6.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-DtlO98AF.js → CreatedOnDcom-pt-br-D9oo7LeG.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-DS-KW_Jh.js → CreatedOnDcom-pt-pt-DGXSBRtE.js} +1 -1
  15. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +2 -14
  16. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +3 -0
  17. package/lib/src/brand-page-maker/composables/useEventTracker.d.ts +4 -0
  18. package/lib/src/brand-page-maker/composables/useEventTracker.js +19 -0
  19. package/lib/src/brand-page-maker/stores/video/video-store.d.ts +2 -10
  20. package/lib/src/brand-page-maker/stores/video/video-store.js +5 -3
  21. package/lib/src/index.mjs +1 -1
  22. package/lib/src/{lib-BDoA2XDn.js → lib-DQKZNTv2.js} +4887 -4853
  23. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +3 -0
  24. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +36 -14
  25. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.js +20 -9
  26. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +3 -0
  27. package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.d.ts +3 -0
  28. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +3 -0
  29. package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +3 -0
  30. package/lib/src/shared/side-bar/components/SideBarTabButton.mixin.d.ts +3 -0
  31. package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +3 -0
  32. package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.d.ts +3 -0
  33. package/package.json +1 -1
  34. package/src/brand-page-maker/composables/useEventTracker.ts +20 -0
  35. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.test.ts +2 -1
  36. package/src/brand-page-maker/stores/video/video-store.ts +8 -3
  37. package/src/shared/background-settings/components/ReplaceImageSettingsForBackgroundSettings.vue +23 -11
  38. package/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.ts +25 -15
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BDoA2XDn.js";
2
+ import { _ as t } from "./lib-DQKZNTv2.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-BDoA2XDn.js";
2
+ import { _ as t } from "./lib-DQKZNTv2.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-BDoA2XDn.js";
2
+ import { _ as t } from "./lib-DQKZNTv2.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-BDoA2XDn.js";
2
+ import { _ as t } from "./lib-DQKZNTv2.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-BDoA2XDn.js";
2
+ import { _ as t } from "./lib-DQKZNTv2.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-BDoA2XDn.js";
2
+ import { _ as t } from "./lib-DQKZNTv2.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-BDoA2XDn.js";
2
+ import { _ as t } from "./lib-DQKZNTv2.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-BDoA2XDn.js";
2
+ import { _ as e } from "./lib-DQKZNTv2.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-BDoA2XDn.js";
2
+ import { _ as e } from "./lib-DQKZNTv2.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-BDoA2XDn.js";
2
+ import { _ as e } from "./lib-DQKZNTv2.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-BDoA2XDn.js";
2
+ import { _ as e } from "./lib-DQKZNTv2.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-BDoA2XDn.js";
2
+ import { _ as e } from "./lib-DQKZNTv2.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-BDoA2XDn.js";
2
+ import { _ as M } from "./lib-DQKZNTv2.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-BDoA2XDn.js";
2
+ import { _ as M } from "./lib-DQKZNTv2.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -1192,20 +1192,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1192
1192
  videoUrl: string;
1193
1193
  previewImageUrl: string;
1194
1194
  };
1195
- isLimitForGettyVideosReached: (state: {
1196
- videoUrls: {
1197
- [x: string]: import("../../stores").VideoUrlData;
1198
- };
1199
- gettyImagesKeyPrefix: string;
1200
- shouldPlayVideos: boolean;
1201
- } & import("pinia").PiniaCustomStateProperties<import("../../stores").videoStoreState>) => () => boolean;
1202
- isPostPurchaseGettyVideoLocked: (state: {
1203
- videoUrls: {
1204
- [x: string]: import("../../stores").VideoUrlData;
1205
- };
1206
- gettyImagesKeyPrefix: string;
1207
- shouldPlayVideos: boolean;
1208
- } & import("pinia").PiniaCustomStateProperties<import("../../stores").videoStoreState>) => () => boolean;
1195
+ hasReachedLimitForVideo(): boolean;
1196
+ canAddNewVideo(): boolean;
1209
1197
  }, {
1210
1198
  setVideoUrlsWithToken(token: string, videoUrl: string, previewImageUrl: string, assetId: string): void;
1211
1199
  setGettyImageKeyPrefix(prefix: string): void;
@@ -993,6 +993,9 @@ declare const _default: import("vue").DefineComponent<{}, {
993
993
  setPreviousSelectedDisplayStyle(viewport: string, displayStyle: string): void;
994
994
  }>;
995
995
  eventTracker: {
996
+ sendGettyVideoAddEvent: () => void;
997
+ sendGettyVideoReplaceEvent: () => void;
998
+ sendGettyVideoRemoveEvent: () => void;
996
999
  sendExperimentStartedEvent: (abTestKey: string, abTestValue: string) => void;
997
1000
  setGlobalEventProps: (props: Omit<import("../../../brand-page-maker/composables/useEventTracker").BpGlobalEventProps, "template_category">) => void;
998
1001
  setUpsellBridgeState: (props: import("../../../brand-page-maker/composables/useEventTracker").BpUpsellEventProps) => void;
@@ -51,6 +51,7 @@ export declare const EVENTS: {
51
51
  WEBSITE_START_FOR_FREE: string;
52
52
  WEBSITE_MAKER_AI_CLICK_SUGGESTED_PROMPT: string;
53
53
  WEBSITE_MAKER_DOMAIN_UPSELL_MODAL: string;
54
+ WEBSITE_MAKER_GETTY_VIDEO: string;
54
55
  };
55
56
  export declare const SELECT_LOCATIONS: {
56
57
  MAKER_PREVIEW: string;
@@ -108,6 +109,9 @@ export declare const PUBLISH_OPTION_MODAL_CONTINUATION_EVENTS: {
108
109
  FREEMIUM: string;
109
110
  };
110
111
  declare const useEventTracker: () => {
112
+ sendGettyVideoAddEvent: () => void;
113
+ sendGettyVideoReplaceEvent: () => void;
114
+ sendGettyVideoRemoveEvent: () => void;
111
115
  sendExperimentStartedEvent: (abTestKey: string, abTestValue: string) => void;
112
116
  setGlobalEventProps: (props: Omit<BpGlobalEventProps, 'template_category'>) => void;
113
117
  setUpsellBridgeState: (props: BpUpsellEventProps) => void;
@@ -34,6 +34,7 @@ export const EVENTS = {
34
34
  WEBSITE_START_FOR_FREE: 'website_start_for_free',
35
35
  WEBSITE_MAKER_AI_CLICK_SUGGESTED_PROMPT: 'website_maker_ai_click_suggested_prompt',
36
36
  WEBSITE_MAKER_DOMAIN_UPSELL_MODAL: 'website_domain_upsell_modal',
37
+ WEBSITE_MAKER_GETTY_VIDEO: 'website_maker_getty_video',
37
38
  };
38
39
  export const SELECT_LOCATIONS = {
39
40
  MAKER_PREVIEW: 'maker_preview',
@@ -114,6 +115,23 @@ const _publishEvent = (eventName, eventProps, excludeGlobal = false) => {
114
115
  });
115
116
  };
116
117
  const useEventTracker = () => {
118
+ const gettyVideoEvents = {
119
+ sendGettyVideoAddEvent: () => {
120
+ _publishEvent(EVENTS.WEBSITE_MAKER_GETTY_VIDEO, {
121
+ action: 'add',
122
+ });
123
+ },
124
+ sendGettyVideoReplaceEvent: () => {
125
+ _publishEvent(EVENTS.WEBSITE_MAKER_GETTY_VIDEO, {
126
+ action: 'replace',
127
+ });
128
+ },
129
+ sendGettyVideoRemoveEvent: () => {
130
+ _publishEvent(EVENTS.WEBSITE_MAKER_GETTY_VIDEO, {
131
+ action: 'remove',
132
+ });
133
+ },
134
+ };
117
135
  return {
118
136
  sendExperimentStartedEvent: (abTestKey, abTestValue) => {
119
137
  _publishEvent(EVENTS.EXPERIMENT_STARTED, {
@@ -263,6 +281,7 @@ const useEventTracker = () => {
263
281
  continuation,
264
282
  });
265
283
  },
284
+ ...gettyVideoEvents,
266
285
  };
267
286
  };
268
287
  export { useEventTracker };
@@ -32,16 +32,8 @@ export declare const useVideoStore: import("pinia").StoreDefinition<"video", vid
32
32
  videoUrl: string;
33
33
  previewImageUrl: string;
34
34
  };
35
- isLimitForGettyVideosReached: (state: {
36
- videoUrls: VideoUrls;
37
- gettyImagesKeyPrefix: string;
38
- shouldPlayVideos: boolean;
39
- } & import("pinia").PiniaCustomStateProperties<videoStoreState>) => () => boolean;
40
- isPostPurchaseGettyVideoLocked: (state: {
41
- videoUrls: VideoUrls;
42
- gettyImagesKeyPrefix: string;
43
- shouldPlayVideos: boolean;
44
- } & import("pinia").PiniaCustomStateProperties<videoStoreState>) => () => boolean;
35
+ hasReachedLimitForVideo(): boolean;
36
+ canAddNewVideo(): boolean;
45
37
  }, {
46
38
  setVideoUrlsWithToken(token: string, videoUrl: string, previewImageUrl: string, assetId: string): void;
47
39
  setGettyImageKeyPrefix(prefix: string): void;
@@ -39,19 +39,21 @@ export const useVideoStore = defineStore('video', {
39
39
  previewImageUrl: `${CDN_GETTY_S3_URL_PREFIX}/public/${state.gettyImagesKeyPrefix}/${token}/${token}_optimised_thumb`,
40
40
  };
41
41
  },
42
- isLimitForGettyVideosReached: (state) => () => {
42
+ hasReachedLimitForVideo() {
43
43
  // Looking through the bp maker store as the video-store isn't aware of removals
44
44
  const brandPageMakerStore = useBrandPageMakerStore();
45
45
  const brandPageData = cloneDeep(brandPageMakerStore.brandPageData);
46
46
  const gettyAssetIds = findValuesByKey(brandPageData, 'gettyAssetId');
47
47
  return gettyAssetIds.length >= GETTY_VIDEO_LIMIT_FOR_SITE;
48
48
  },
49
- isPostPurchaseGettyVideoLocked: (state) => () => {
49
+ canAddNewVideo() {
50
50
  const userStore = useBrandPageMakerUserStore();
51
51
  const brandPageContainerStore = useBrandPageContainerStore();
52
52
  const canUseGettyVideos = userStore.features.canUseGettyVideos;
53
53
  const isPrePurchase = brandPageContainerStore.isPrePurchase;
54
- return !canUseGettyVideos && !isPrePurchase;
54
+ const hasPremiumSubscription = userStore.hasPremiumSubscription;
55
+ return (canUseGettyVideos &&
56
+ (userStore.isAdmin || isPrePurchase || hasPremiumSubscription));
55
57
  },
56
58
  },
57
59
  });
package/lib/src/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { bH as E, av as T, aY as s, a9 as I, an as N, am as S, aj as e, bx as A, bO as O, cf as G, ce as C, cd as D, c7 as P, b6 as t, b5 as R, bT as L, bU as M, b$ as o, bQ as r, bS as b, bR as n, bV as F, bW as i, c6 as l, c4 as B, au as g, c5 as Y, ac as U, b1 as c, b3 as d, b2 as u, e as H, f as p, B as y, a3 as K, d as V, a4 as k, j as m, ar as X, a2 as v, bw as h, bP as W, aC as x, a_ as f, aW as z, c2 as Z, c1 as w, C as Q, b9 as j, D as q, b as J, a as $, bZ as aa, b8 as _a, a$ as Ea, aX as Ta, cb as sa, cc as Ia, c0 as Na, bL as Sa, ah as ea, c3 as Aa, c8 as Oa, be as Ga, aO as Ca, bk as Da, F as Pa, ab as ta, aa as Ra, h as La, a5 as Ma, bb as oa, aZ as ra, aV as ba, a7 as na, ao as Fa, l as ia, R as la, H as Ba, ad as ga, bI as Ya, bf as Ua, bg as ca, bG as da, bm as ua, bo as Ha, ba as pa, L as ya, aN as Ka, bt as Va, aT as ka, bs as ma, aw as Xa, af as va, b_ as ha, c9 as Wa, ca as xa, b0 as fa, N as za, aF as Za, aE as wa, aG as Qa, aA as ja, aB as qa, aD as Ja, bi as $a, bp as a_, bc as __, p as E_, ap as T_, aq as s_, ak as I_, al as N_, ai as S_, a8 as e_, m as A_, bu as O_, at as G_, bM as C_, bN as D_, bY as P_, ag as t_, bK as R_, bv as L_, n as M_, S as o_, P as r_, aM as b_, bJ as n_, bj as F_, bB as i_, bA as l_, bD as B_, by as g_, bE as Y_, bF as U_, bz as c_, bC as d_, aH as u_, aI as H_, br as p_, bq as y_, aK as K_, aL as V_, aQ as k_, b4 as m_, aP as X_, aR as v_, U as h_, ae as W_, aU as x_, k as f_, o as z_, bh as Z_, as as w_, bd as Q_, bl as j_, bn as q_, b7 as J_, w as $_, W as aE, a6 as _E, g as EE, bX as TE, t as sE, v as IE, T as NE, a1 as SE, aJ as eE, aS as AE, ay as OE, q as GE, $ as CE, u as DE, A as PE, ax as tE, i as RE, az as LE, c as ME, r as oE, y as rE, x as bE, z as nE, Z as FE, V as iE, s as lE, a0 as BE, J as gE, E as YE, G as UE, Y as cE, K as dE, X as uE, M as HE, Q as pE, I as yE, O as KE } from "./lib-BDoA2XDn.js";
1
+ import { bH as E, av as T, aY as s, a9 as I, an as N, am as S, aj as e, bx as A, bO as O, cf as G, ce as C, cd as D, c7 as P, b6 as t, b5 as R, bT as L, bU as M, b$ as o, bQ as r, bS as b, bR as n, bV as F, bW as i, c6 as l, c4 as B, au as g, c5 as Y, ac as U, b1 as c, b3 as d, b2 as u, e as H, f as p, B as y, a3 as K, d as V, a4 as k, j as m, ar as X, a2 as v, bw as h, bP as W, aC as x, a_ as f, aW as z, c2 as Z, c1 as w, C as Q, b9 as j, D as q, b as J, a as $, bZ as aa, b8 as _a, a$ as Ea, aX as Ta, cb as sa, cc as Ia, c0 as Na, bL as Sa, ah as ea, c3 as Aa, c8 as Oa, be as Ga, aO as Ca, bk as Da, F as Pa, ab as ta, aa as Ra, h as La, a5 as Ma, bb as oa, aZ as ra, aV as ba, a7 as na, ao as Fa, l as ia, R as la, H as Ba, ad as ga, bI as Ya, bf as Ua, bg as ca, bG as da, bm as ua, bo as Ha, ba as pa, L as ya, aN as Ka, bt as Va, aT as ka, bs as ma, aw as Xa, af as va, b_ as ha, c9 as Wa, ca as xa, b0 as fa, N as za, aF as Za, aE as wa, aG as Qa, aA as ja, aB as qa, aD as Ja, bi as $a, bp as a_, bc as __, p as E_, ap as T_, aq as s_, ak as I_, al as N_, ai as S_, a8 as e_, m as A_, bu as O_, at as G_, bM as C_, bN as D_, bY as P_, ag as t_, bK as R_, bv as L_, n as M_, S as o_, P as r_, aM as b_, bJ as n_, bj as F_, bB as i_, bA as l_, bD as B_, by as g_, bE as Y_, bF as U_, bz as c_, bC as d_, aH as u_, aI as H_, br as p_, bq as y_, aK as K_, aL as V_, aQ as k_, b4 as m_, aP as X_, aR as v_, U as h_, ae as W_, aU as x_, k as f_, o as z_, bh as Z_, as as w_, bd as Q_, bl as j_, bn as q_, b7 as J_, w as $_, W as aE, a6 as _E, g as EE, bX as TE, t as sE, v as IE, T as NE, a1 as SE, aJ as eE, aS as AE, ay as OE, q as GE, $ as CE, u as DE, A as PE, ax as tE, i as RE, az as LE, c as ME, r as oE, y as rE, x as bE, z as nE, Z as FE, V as iE, s as lE, a0 as BE, J as gE, E as YE, G as UE, Y as cE, K as dE, X as uE, M as HE, Q as pE, I as yE, O as KE } from "./lib-DQKZNTv2.js";
2
2
  import { createPinia as kE, setActivePinia as mE } from "pinia";
3
3
  export {
4
4
  E as ABOUT_SECTION_SETTINGS_CONFIG,