@designcrowd/library.brand-page 5.17.25-undo-20 → 5.17.25-undo-21

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 (29) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-PinGDThm.js → CreatedOnBrandCrowd-de-de-Bze5WUip.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-6aceIwqS.js → CreatedOnBrandCrowd-en-us-Dw5uSnX8.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-DTzIsJed.js → CreatedOnBrandCrowd-es-es-Cz-oPdjt.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-cSFLvrYN.js → CreatedOnBrandCrowd-fr-ca-zldLXw3G.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-cSFLvrYN.js → CreatedOnBrandCrowd-fr-fr-zldLXw3G.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-BvXzFDKD.js → CreatedOnBrandCrowd-pt-br-64QJpEaD.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-BvXzFDKD.js → CreatedOnBrandCrowd-pt-pt-64QJpEaD.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-LXznZsLj.js → CreatedOnDcom-de-de-8SXOvjEH.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-imNcf-wp.js → CreatedOnDcom-en-us-ClZBYY_t.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-Ctv-wdHl.js → CreatedOnDcom-es-es-xg4ZwvEb.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-d4QQHFO4.js → CreatedOnDcom-fr-ca-4zo2gxc1.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-D4lHkR1B.js → CreatedOnDcom-fr-fr-Dw9Fuy7U.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-QkKzkd58.js → CreatedOnDcom-pt-br-Dbl0EWcU.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-BoS8BmQr.js → CreatedOnDcom-pt-pt-Bps73oQE.js} +1 -1
  15. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +7 -5
  16. package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.js +4 -4
  17. package/lib/src/brand-page-maker/composables/useUndoRedoFlag.d.ts +12 -5
  18. package/lib/src/brand-page-maker/composables/useUndoRedoFlag.js +15 -6
  19. package/lib/src/index.mjs +1 -1
  20. package/lib/src/{lib-DSJYPqqV.js → lib-BgvZxeSl.js} +10565 -10606
  21. package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.d.ts +1 -2
  22. package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.js +1 -10
  23. package/lib/src/shared/logo-settings/store/editable-logo-store.js +0 -18
  24. package/package.json +1 -1
  25. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +7 -6
  26. package/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.ts +3 -5
  27. package/src/brand-page-maker/composables/useUndoRedoFlag.ts +17 -6
  28. package/src/shared/logo-settings/components/EditLogoSettings.mixin.ts +1 -14
  29. package/src/shared/logo-settings/store/editable-logo-store.ts +0 -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-DSJYPqqV.js";
2
+ import { _ as t } from "./lib-BgvZxeSl.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-DSJYPqqV.js";
2
+ import { _ as t } from "./lib-BgvZxeSl.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-DSJYPqqV.js";
2
+ import { _ as t } from "./lib-BgvZxeSl.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-DSJYPqqV.js";
2
+ import { _ as t } from "./lib-BgvZxeSl.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-DSJYPqqV.js";
2
+ import { _ as t } from "./lib-BgvZxeSl.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-DSJYPqqV.js";
2
+ import { _ as t } from "./lib-BgvZxeSl.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-DSJYPqqV.js";
2
+ import { _ as t } from "./lib-BgvZxeSl.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-DSJYPqqV.js";
2
+ import { _ as e } from "./lib-BgvZxeSl.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-DSJYPqqV.js";
2
+ import { _ as e } from "./lib-BgvZxeSl.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-DSJYPqqV.js";
2
+ import { _ as e } from "./lib-BgvZxeSl.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-DSJYPqqV.js";
2
+ import { _ as e } from "./lib-BgvZxeSl.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-DSJYPqqV.js";
2
+ import { _ as e } from "./lib-BgvZxeSl.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-DSJYPqqV.js";
2
+ import { _ as M } from "./lib-BgvZxeSl.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-DSJYPqqV.js";
2
+ import { _ as M } from "./lib-BgvZxeSl.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -12,6 +12,7 @@ import { useBrandPageContainerStore } from '@brand-page-maker/stores';
12
12
  import { UI_DEVICE_MODES, UI_SCREENSIZE_MODES, } from '@shared/models';
13
13
  import { useBrandPageMakerStore, useBrandPageMakerUserStore, useLocalisedRouteStore, useUiStore, useSnapshotStore, useVideoStore, } from '@brand-page-maker/stores';
14
14
  import { useHistoryStore } from '@brand-page-maker/stores/history/history-store';
15
+ import { useUndoRedoFlag } from '@brand-page-maker/composables/useUndoRedoFlag';
15
16
  import { useUiContentSettingsStore } from '@shared/content-settings/store';
16
17
  import { useUiTemplateSettingsStore } from '@shared/template-settings/store';
17
18
  import { useUiPageSettingsStore } from '@shared/page-settings/store';
@@ -190,11 +191,12 @@ export default defineComponent({
190
191
  }
191
192
  // Mark brand page as fully loaded
192
193
  this.brandPageMakerStore.setIsBrandPageLoaded(true);
193
- // Capture baseline for undo/redo when feature flag is enabled.
194
- // Flag lives on userStore.features.canUseUndoRedo, populated by the
195
- // consumer (BrandCrowd.Net / web-renderer) via the ViewModel.
196
- const userStore = useBrandPageMakerUserStore();
197
- if (userStore.features.canUseUndoRedo) {
194
+ // Capture baseline for undo/redo when the feature is active for this
195
+ // session. `useUndoRedoFlag` requires both the LaunchDarkly feature
196
+ // (`userStore.features.canUseUndoRedo`) AND the maker being a brand-site
197
+ // — V1 scope is brand-site only; brand-page and brand-contact don't get
198
+ // undo/redo. See useUndoRedoFlag.ts for the rationale.
199
+ if (useUndoRedoFlag().value) {
198
200
  useHistoryStore().captureBaseline();
199
201
  }
200
202
  this.$emit(EVENTS.Initialised);
@@ -1,6 +1,7 @@
1
- import { computed, defineComponent } from 'vue';
1
+ import { defineComponent } from 'vue';
2
2
  import { CUSTOM_DOMAIN_STATUSES } from '@brand-page-maker/constants';
3
- import { useBrandPageContainerStore, useBrandPageMakerUserStore, useEventManagerStore, } from '@brand-page-maker/stores';
3
+ import { useBrandPageContainerStore, useEventManagerStore, } from '@brand-page-maker/stores';
4
+ import { useUndoRedoFlag } from '@brand-page-maker/composables/useUndoRedoFlag';
4
5
  import { quickLinkBarTr } from '@src/composables/useTranslate';
5
6
  export default defineComponent({
6
7
  props: {
@@ -14,11 +15,10 @@ export default defineComponent({
14
15
  },
15
16
  },
16
17
  setup() {
17
- const userStore = useBrandPageMakerUserStore();
18
18
  return {
19
19
  brandPageContainerStore: useBrandPageContainerStore(),
20
20
  eventManagerStore: useEventManagerStore(),
21
- undoRedoEnabled: computed(() => userStore.features.canUseUndoRedo),
21
+ undoRedoEnabled: useUndoRedoFlag(),
22
22
  };
23
23
  },
24
24
  data() {
@@ -1,9 +1,16 @@
1
1
  import { type ComputedRef } from 'vue';
2
2
  /**
3
- * Reads the undo/redo feature flag from the maker user store's `features` bag,
4
- * which is populated by the consumer (BrandCrowd.Net / web-renderer) via the
5
- * `WebsiteDesignUserFeatures.CanUseUndoRedo` boolean on the ViewModel. Follows
6
- * the same precedent as other maker feature flags (RichTextEditor, GettyVideos,
7
- * AITextGenerator).
3
+ * Returns whether undo/redo is active for the current maker session. Two
4
+ * conditions must hold:
5
+ *
6
+ * 1. `userStore.features.canUseUndoRedo` is true. The flag is populated by
7
+ * the consumer (BrandCrowd.Net / web-renderer) via the
8
+ * `WebsiteDesignUserFeatures.CanUseUndoRedo` boolean on the ViewModel —
9
+ * same precedent as RichTextEditor / GettyVideos / AITextGenerator.
10
+ * 2. The maker is a brand-site (Website Maker). V1 scope is brand-site
11
+ * only; brand-page (single-page profile) and brand-contact (vCard) are
12
+ * out of scope. The flag itself is global on LaunchDarkly so it can't
13
+ * gate this on its own — `isBrandSite` is the per-session
14
+ * discriminator.
8
15
  */
9
16
  export declare function useUndoRedoFlag(): ComputedRef<boolean>;
@@ -1,13 +1,22 @@
1
1
  import { computed } from 'vue';
2
2
  import { useBrandPageMakerUserStore } from '@brand-page-maker/stores/user';
3
+ import { useBrandPageMakerStore } from '@brand-page-maker/stores/brandpage-maker/brandpage-maker-store';
3
4
  /**
4
- * Reads the undo/redo feature flag from the maker user store's `features` bag,
5
- * which is populated by the consumer (BrandCrowd.Net / web-renderer) via the
6
- * `WebsiteDesignUserFeatures.CanUseUndoRedo` boolean on the ViewModel. Follows
7
- * the same precedent as other maker feature flags (RichTextEditor, GettyVideos,
8
- * AITextGenerator).
5
+ * Returns whether undo/redo is active for the current maker session. Two
6
+ * conditions must hold:
7
+ *
8
+ * 1. `userStore.features.canUseUndoRedo` is true. The flag is populated by
9
+ * the consumer (BrandCrowd.Net / web-renderer) via the
10
+ * `WebsiteDesignUserFeatures.CanUseUndoRedo` boolean on the ViewModel —
11
+ * same precedent as RichTextEditor / GettyVideos / AITextGenerator.
12
+ * 2. The maker is a brand-site (Website Maker). V1 scope is brand-site
13
+ * only; brand-page (single-page profile) and brand-contact (vCard) are
14
+ * out of scope. The flag itself is global on LaunchDarkly so it can't
15
+ * gate this on its own — `isBrandSite` is the per-session
16
+ * discriminator.
9
17
  */
10
18
  export function useUndoRedoFlag() {
11
19
  const userStore = useBrandPageMakerUserStore();
12
- return computed(() => userStore.features.canUseUndoRedo);
20
+ const brandPageMakerStore = useBrandPageMakerStore();
21
+ return computed(() => userStore.features.canUseUndoRedo && brandPageMakerStore.isBrandSite);
13
22
  }
package/lib/src/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { A as E, a as T, 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 G, j as D, k as P, l as t, m as R, n as L, o as M, p as o, q as r, r as b, s as n, t as F, u as i, v as l, w as g, x as B, y as c, z as Y, C as U, D as d, E as u, F as H, G as p, H as y, I as K, J as k, K as m, L as V, M as X, N as h, O as v, P as W, Q as f, R as x, S as z, T as w, U as Z, V as j, W as Q, X as q, Y as J, Z as $, $ as aa, a0 as _a, a1 as Ea, a2 as Ta, 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 Ga, ac as Da, ad as Pa, ae as ta, af as Ra, ag as La, ah as Ma, ai as oa, aj as ra, ak as ba, al as na, am as Fa, an as ia, ao as la, ap as ga, aq as Ba, ar as ca, as as Ya, at as Ua, au as da, av as ua, aw as Ha, ax as pa, ay as ya, az as Ka, aA as ka, aB as ma, aC as Va, aD as Xa, aE as ha, aF as va, aG as Wa, aH as fa, aI as xa, aJ as za, aK as wa, aL as Za, aM as ja, aN as Qa, aO as qa, aP as Ja, aQ as $a, aR as a_, aS as __, aT as E_, aU as T_, 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 G_, b2 as D_, b3 as P_, b4 as t_, b5 as R_, b6 as L_, b7 as M_, b8 as o_, b9 as r_, ba as b_, bb as n_, bc as F_, bd as i_, be as l_, bf as g_, bg as B_, bh as c_, bi as Y_, bj as U_, bk as d_, bl as u_, bm as H_, bn as p_, bo as y_, bp as K_, bq as k_, br as m_, bs as V_, bt as X_, bu as h_, bv as v_, bw as W_, bx as f_, by as x_, bz as z_, bA as w_, bB as Z_, bC as j_, bD as Q_, bE as q_, bF as J_, bG as $_, bH as aE, bI as _E, bJ as EE, bK as TE, bL as sE, bM as IE, bN as SE, bO as NE, bP as eE, bQ as AE, bR as OE, bS as CE, bT as GE, bU as DE, bV as PE, bW as tE, bX as RE, bY as LE, bZ as ME, b_ as oE, b$ as rE, c0 as bE, c1 as nE, c2 as FE, c3 as iE, c4 as lE, c5 as gE, c6 as BE, c7 as cE, c8 as YE, c9 as UE, ca as dE, cb as uE, cc as HE, cd as pE, ce as yE, cf as KE, cg as kE, ch as mE, ci as VE, cj as XE, ck as hE, cl as vE, cm as WE, cn as fE, co as xE } from "./lib-DSJYPqqV.js";
1
+ import { A as E, a as T, 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 G, j as D, k as P, l as t, m as R, n as L, o as M, p as o, q as r, r as b, s as n, t as F, u as i, v as l, w as g, x as B, y as c, z as Y, C as U, D as d, E as u, F as H, G as p, H as y, I as K, J as k, K as m, L as V, M as X, N as h, O as v, P as W, Q as f, R as x, S as z, T as w, U as Z, V as j, W as Q, X as q, Y as J, Z as $, $ as aa, a0 as _a, a1 as Ea, a2 as Ta, 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 Ga, ac as Da, ad as Pa, ae as ta, af as Ra, ag as La, ah as Ma, ai as oa, aj as ra, ak as ba, al as na, am as Fa, an as ia, ao as la, ap as ga, aq as Ba, ar as ca, as as Ya, at as Ua, au as da, av as ua, aw as Ha, ax as pa, ay as ya, az as Ka, aA as ka, aB as ma, aC as Va, aD as Xa, aE as ha, aF as va, aG as Wa, aH as fa, aI as xa, aJ as za, aK as wa, aL as Za, aM as ja, aN as Qa, aO as qa, aP as Ja, aQ as $a, aR as a_, aS as __, aT as E_, aU as T_, 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 G_, b2 as D_, b3 as P_, b4 as t_, b5 as R_, b6 as L_, b7 as M_, b8 as o_, b9 as r_, ba as b_, bb as n_, bc as F_, bd as i_, be as l_, bf as g_, bg as B_, bh as c_, bi as Y_, bj as U_, bk as d_, bl as u_, bm as H_, bn as p_, bo as y_, bp as K_, bq as k_, br as m_, bs as V_, bt as X_, bu as h_, bv as v_, bw as W_, bx as f_, by as x_, bz as z_, bA as w_, bB as Z_, bC as j_, bD as Q_, bE as q_, bF as J_, bG as $_, bH as aE, bI as _E, bJ as EE, bK as TE, bL as sE, bM as IE, bN as SE, bO as NE, bP as eE, bQ as AE, bR as OE, bS as CE, bT as GE, bU as DE, bV as PE, bW as tE, bX as RE, bY as LE, bZ as ME, b_ as oE, b$ as rE, c0 as bE, c1 as nE, c2 as FE, c3 as iE, c4 as lE, c5 as gE, c6 as BE, c7 as cE, c8 as YE, c9 as UE, ca as dE, cb as uE, cc as HE, cd as pE, ce as yE, cf as KE, cg as kE, ch as mE, ci as VE, cj as XE, ck as hE, cl as vE, cm as WE, cn as fE, co as xE } from "./lib-BgvZxeSl.js";
2
2
  import { createPinia as wE, setActivePinia as ZE } from "pinia";
3
3
  export {
4
4
  E as ABOUT_SECTION_SETTINGS_CONFIG,