@designcrowd/library.brand-page 6.1.6-use-isadminmaker-1 → 6.1.6-use-isadminmaker-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 (109) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-Dd_GKG2N.js → CreatedOnBrandCrowd-de-de-CPLDYp5f.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-Dins7rod.js → CreatedOnBrandCrowd-en-us-Br3HqLLr.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-D-ie39pg.js → CreatedOnBrandCrowd-es-es-DwkIQVgN.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-CbgslN2_.js → CreatedOnBrandCrowd-fr-ca-DqeI8mF_.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-CbgslN2_.js → CreatedOnBrandCrowd-fr-fr-DqeI8mF_.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-OMePx480.js → CreatedOnBrandCrowd-pt-br-bvgq_CN8.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-OMePx480.js → CreatedOnBrandCrowd-pt-pt-bvgq_CN8.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-BJc1FMjI.js → CreatedOnDcom-de-de-nT3MnRXy.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-DoLdNglw.js → CreatedOnDcom-en-us-D2TYrEzJ.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-BG1UvnwD.js → CreatedOnDcom-es-es-Q-5tnP12.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-DzZkCm3Z.js → CreatedOnDcom-fr-ca-txkwqCzm.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-9vEmBWv1.js → CreatedOnDcom-fr-fr-CUnJXLgr.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-B5-fW01S.js → CreatedOnDcom-pt-br-7XAwvP9H.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-CNCPHKgi.js → CreatedOnDcom-pt-pt-DjhLiioZ.js} +1 -1
  15. package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +0 -1
  16. package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.js +1 -1
  17. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +3 -2
  18. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +1 -1
  19. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.js +1 -1
  20. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +3 -1
  21. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.js +1 -1
  22. package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.d.ts +0 -1
  23. package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.js +3 -2
  24. package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.d.ts +3 -1
  25. package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +3 -1
  26. package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +3 -1
  27. package/lib/src/brand-page-maker/components/seo-settings/UseExistingDomainModal.mixin.d.ts +3 -1
  28. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +3 -2
  29. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.js +1 -1
  30. package/lib/src/brand-page-maker/components/upgrade-to-premium-button/UpgradeToPremiumButton.mixin.d.ts +3 -1
  31. package/lib/src/brand-page-maker/composables/useUndoRedoFlag.d.ts +1 -1
  32. package/lib/src/brand-page-maker/composables/useUndoRedoFlag.js +4 -2
  33. package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +5 -2
  34. package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.js +5 -12
  35. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +13 -14
  36. package/lib/src/brand-page-maker/stores/ui/ui-store.js +3 -5
  37. package/lib/src/brand-page-maker/stores/user/user-store.d.ts +0 -1
  38. package/lib/src/brand-page-maker/stores/user/user-store.js +3 -8
  39. package/lib/src/brand-page-maker/stores/video/video-store.js +3 -1
  40. package/lib/src/css/library.brand-page-brandCrowd.min.css +40 -40
  41. package/lib/src/css/library.brand-page-brandPage.min.css +40 -40
  42. package/lib/src/css/library.brand-page-designCom.min.css +40 -40
  43. package/lib/src/css/library.brand-page-preview.min.css +40 -40
  44. package/lib/src/index.mjs +1 -1
  45. package/lib/src/{lib-Cq0WlFYO.js → lib-dewphkuW.js} +8493 -8500
  46. package/lib/src/shared/background-settings/components/background-shapes/BackgroundShapeSettings.mixin.d.ts +0 -1
  47. package/lib/src/shared/background-settings/components/background-shapes/BackgroundShapeSettings.mixin.js +3 -2
  48. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.js +3 -2
  49. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +0 -1
  50. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.js +3 -2
  51. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.js +3 -3
  52. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +0 -1
  53. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.js +1 -1
  54. package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.js +3 -2
  55. package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +3 -1
  56. package/lib/src/shared/content-settings/store/content-settings-store.js +3 -3
  57. package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +3 -1
  58. package/lib/src/shared/models.d.ts +0 -1
  59. package/lib/src/shared/my-uploads/MyUploads.mixin.js +3 -2
  60. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +3 -2
  61. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.js +1 -1
  62. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +3 -1
  63. package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +3 -1
  64. package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +3 -2
  65. package/lib/src/shared/side-bar/components/SideBar.mixin.js +1 -1
  66. package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +3 -2
  67. package/lib/src/shared/style-settings/components/StyleSettings.mixin.js +1 -1
  68. package/lib/src/shared/template-settings/store/template-settings-store.js +8 -9
  69. package/package.json +1 -1
  70. package/src/brand-page-maker/components/action-bar/ActionBar.mixin.ts +1 -1
  71. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +1 -1
  72. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.ts +1 -1
  73. package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.ts +1 -1
  74. package/src/brand-page-maker/components/brandpage-settings/BrandPageSettings.vue +1 -1
  75. package/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.ts +3 -1
  76. package/src/brand-page-maker/components/rich-text-editor/RichTextEditor.vue +3 -3
  77. package/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.ts +1 -1
  78. package/src/brand-page-maker/composables/useQuickLinkBarVisibility.test.ts +4 -5
  79. package/src/brand-page-maker/composables/useUndoRedoFlag.ts +4 -2
  80. package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.initialise.test.ts +3 -5
  81. package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.ts +8 -17
  82. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.test.ts +5 -10
  83. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +19 -14
  84. package/src/brand-page-maker/stores/ui/ui-store.ts +3 -5
  85. package/src/brand-page-maker/stores/user/user-store.test.ts +0 -35
  86. package/src/brand-page-maker/stores/user/user-store.ts +3 -8
  87. package/src/brand-page-maker/stores/video/video-store.ts +3 -1
  88. package/src/shared/background-settings/components/BackgroundSettings.vue +3 -3
  89. package/src/shared/background-settings/components/MultiBackgroundShapes.vue +3 -3
  90. package/src/shared/background-settings/components/ReplaceImageSettingsForBackgroundSettings.vue +3 -3
  91. package/src/shared/background-settings/components/SingleBackgroundShape.vue +3 -3
  92. package/src/shared/background-settings/components/background-color/BackgroundColorSettings.vue +3 -3
  93. package/src/shared/background-settings/components/background-shapes/BackgroundShapeSettings.mixin.ts +6 -2
  94. package/src/shared/content-settings/components/content-settings/ContentSettings.mixin.ts +3 -1
  95. package/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.ts +3 -1
  96. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.ts +3 -3
  97. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.ts +1 -1
  98. package/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.ts +4 -1
  99. package/src/shared/content-settings/components/logo-selection-field/LogoSelection.vue +1 -3
  100. package/src/shared/content-settings/components/personalisation-override-field/PersonalisationOverrideField.vue +6 -3
  101. package/src/shared/content-settings/store/content-settings-store.ts +3 -2
  102. package/src/shared/models.ts +0 -1
  103. package/src/shared/my-uploads/MyUploads.mixin.ts +3 -1
  104. package/src/shared/page-settings/components/page-settings/PageSettings.mixin.ts +1 -1
  105. package/src/shared/shape-library/ShapeLibrary.vue +2 -4
  106. package/src/shared/side-bar/components/SideBar.mixin.ts +1 -1
  107. package/src/shared/style-settings/components/StyleSettings.mixin.ts +1 -1
  108. package/src/shared/style-settings/components/text-style-options-settings-with-state/TextStyleOptionsSettingsWithState.vue +3 -1
  109. package/src/shared/template-settings/store/template-settings-store.ts +7 -9
@@ -248,7 +248,7 @@ const brandPageViewModel = computed(
248
248
  () => brandPageMakerStore.brandPageViewModel,
249
249
  );
250
250
  const features = computed(() => userStore.features);
251
- const isAdmin = computed(() => userStore.isAdminMaker);
251
+ const isAdmin = computed(() => containerStore.isAdminMaker);
252
252
  const isDesignCom = computed(() => containerStore.isDesignCom);
253
253
  const ogImageUrl = computed(() => brandPageMakerStore.ogImageUrl);
254
254
  const isPublished = computed(() => containerStore.isPublished);
@@ -3,6 +3,7 @@ import {
3
3
  useBrandPageMakerStore,
4
4
  BRANDPAGE_SETTINGS_MODES,
5
5
  useBrandPageMakerUserStore,
6
+ useBrandPageContainerStore,
6
7
  } from '@brand-page-maker/stores';
7
8
  import type {
8
9
  ReplaceImageSettingsBase,
@@ -25,10 +26,11 @@ export default defineComponent({
25
26
  setup() {
26
27
  const brandPageMakerStore = useBrandPageMakerStore();
27
28
  const userStore = useBrandPageMakerUserStore();
29
+ const containerStore = useBrandPageContainerStore();
28
30
 
29
31
  return {
30
32
  mode: computed(() => brandPageMakerStore.mode),
31
- isAdmin: computed(() => userStore.isAdminMaker),
33
+ isAdmin: computed(() => containerStore.isAdminMaker),
32
34
  brandPageMakerStore,
33
35
  userStore,
34
36
  };
@@ -482,7 +482,7 @@ import {
482
482
  FONT_FAMILY_CONFIGS,
483
483
  } from '@brand-page';
484
484
  import {
485
- useBrandPageMakerUserStore,
485
+ useBrandPageContainerStore,
486
486
  useUiStore,
487
487
  } from '@brand-page-maker/stores';
488
488
  import type { ButtonGroupOption } from '@brand-page-maker/models/button-group.model';
@@ -566,10 +566,10 @@ const emit = defineEmits([
566
566
 
567
567
  const isSpacingDropdownOpen = ref(false);
568
568
 
569
- const userStore = useBrandPageMakerUserStore();
569
+ const containerStore = useBrandPageContainerStore();
570
570
  const uiStore = useUiStore();
571
571
 
572
- const isAdmin = computed(() => userStore.isAdminMaker);
572
+ const isAdmin = computed(() => containerStore.isAdminMaker);
573
573
  const logoTheme = computed(() => uiStore.logoTheme);
574
574
 
575
575
  const fontSettings = reactive({
@@ -81,7 +81,7 @@ export default defineComponent({
81
81
  runtimeEnvironment: computed(
82
82
  () => brandPageContainerStore.runtimeEnvironment,
83
83
  ),
84
- isAdmin: computed(() => brandPageMakerUserStore.isAdminMaker),
84
+ isAdmin: computed(() => brandPageContainerStore.isAdminMaker),
85
85
  userToken: computed(() => brandPageMakerUserStore.userToken),
86
86
  isBrandSite: computed(
87
87
  () => brandPageMakerStore.brandPageType === BRAND_PAGE_TYPES.brandSite,
@@ -13,7 +13,7 @@ import { useQuickLinkBarVisibility } from './useQuickLinkBarVisibility';
13
13
  // The real useUndoRedoFlag is exercised (only its underlying stores are
14
14
  // mocked) so admin gating is covered end-to-end.
15
15
 
16
- const containerStoreMock = { isPublished: false };
16
+ const containerStoreMock = { isPublished: false, isAdminMaker: false };
17
17
 
18
18
  vi.mock('@brand-page-maker/stores', () => ({
19
19
  useBrandPageContainerStore: vi.fn(() => containerStoreMock),
@@ -21,7 +21,6 @@ vi.mock('@brand-page-maker/stores', () => ({
21
21
 
22
22
  const userStoreMock = {
23
23
  features: { canUseUndoRedo: false },
24
- isAdminMaker: false,
25
24
  };
26
25
 
27
26
  vi.mock('@brand-page-maker/stores/user', () => ({
@@ -31,7 +30,7 @@ vi.mock('@brand-page-maker/stores/user', () => ({
31
30
  beforeEach(() => {
32
31
  containerStoreMock.isPublished = false;
33
32
  userStoreMock.features.canUseUndoRedo = false;
34
- userStoreMock.isAdminMaker = false;
33
+ containerStoreMock.isAdminMaker = false;
35
34
  });
36
35
 
37
36
  describe('useQuickLinkBarVisibility', () => {
@@ -66,7 +65,7 @@ describe('useQuickLinkBarVisibility', () => {
66
65
  it('gates the undo/redo reason for admins: unpublished admin stays hidden despite the flag', () => {
67
66
  containerStoreMock.isPublished = false;
68
67
  userStoreMock.features.canUseUndoRedo = true;
69
- userStoreMock.isAdminMaker = true;
68
+ containerStoreMock.isAdminMaker = true;
70
69
 
71
70
  expect(useQuickLinkBarVisibility().value).toBe(false);
72
71
  });
@@ -74,7 +73,7 @@ describe('useQuickLinkBarVisibility', () => {
74
73
  it('stays visible for a published admin (published cluster is not admin-gated)', () => {
75
74
  containerStoreMock.isPublished = true;
76
75
  userStoreMock.features.canUseUndoRedo = true;
77
- userStoreMock.isAdminMaker = true;
76
+ containerStoreMock.isAdminMaker = true;
78
77
 
79
78
  expect(useQuickLinkBarVisibility().value).toBe(true);
80
79
  });
@@ -1,5 +1,6 @@
1
1
  import { computed, type ComputedRef } from 'vue';
2
2
  import { useBrandPageMakerUserStore } from '@brand-page-maker/stores/user';
3
+ import { useBrandPageContainerStore } from '@brand-page-maker/stores';
3
4
 
4
5
  /**
5
6
  * Returns whether undo/redo is active for the current maker session. Both
@@ -11,14 +12,15 @@ import { useBrandPageMakerUserStore } from '@brand-page-maker/stores/user';
11
12
  * same precedent as RichTextEditor / GettyVideos / AITextGenerator. The
12
13
  * one flag governs all three brands (brand-site, brand-page,
13
14
  * brand-contact) — there is no per-brand gating.
14
- * 2. The session is NOT in admin-maker mode (`userStore.isAdminMaker`). The
15
+ * 2. The session is NOT in admin-maker mode (`containerStore.isAdminMaker`). The
15
16
  * admin maker uses the same components but a different editing flow
16
17
  * (template authoring) where undo/redo is out of scope.
17
18
  */
18
19
  export function useUndoRedoFlag(): ComputedRef<boolean> {
19
20
  const userStore = useBrandPageMakerUserStore();
21
+ const containerStore = useBrandPageContainerStore();
20
22
 
21
23
  return computed(
22
- () => userStore.features.canUseUndoRedo && !userStore.isAdminMaker,
24
+ () => userStore.features.canUseUndoRedo && !containerStore.isAdminMaker,
23
25
  );
24
26
  }
@@ -67,25 +67,23 @@ describe('brand-page-container-store initialise — admin maker mapping', () =>
67
67
  setActivePinia(createPinia());
68
68
  });
69
69
 
70
- test('maps isAdminMaker: true onto the user store and the container getter', () => {
70
+ test('maps isAdminMaker: true onto the container store', () => {
71
71
  const store = useBrandPageContainerStore();
72
72
  const userStore = useBrandPageMakerUserStore();
73
73
 
74
74
  store.initialise(createInitialisePayload({ isAdminMaker: true }));
75
75
 
76
- expect(userStore.isAdminMaker).toBe(true);
77
76
  expect(store.isAdminMaker).toBe(true);
78
- // initialise owns isAdminMaker only — the legacy isAdmin flag is left untouched.
77
+ // Admin maker mode lives on the container store, not user identity — the legacy
78
+ // user-store isAdmin flag is left untouched by initialise.
79
79
  expect(userStore.isAdmin).toBe(false);
80
80
  });
81
81
 
82
82
  test('defaults isAdminMaker to false when omitted', () => {
83
83
  const store = useBrandPageContainerStore();
84
- const userStore = useBrandPageMakerUserStore();
85
84
 
86
85
  store.initialise(createInitialisePayload());
87
86
 
88
- expect(userStore.isAdminMaker).toBe(false);
89
87
  expect(store.isAdminMaker).toBe(false);
90
88
  });
91
89
  });
@@ -70,6 +70,8 @@ export interface BrandPageContainerState {
70
70
  isUpgradeModalVisible: boolean;
71
71
  isPublishing: boolean;
72
72
  isProduction: boolean;
73
+ // Admin maker mode — a property of the editing session/container, not the user.
74
+ isAdminMaker: boolean;
73
75
  isSellDomainNameEnabled: boolean;
74
76
  isStripeOnboardingModalVisible: boolean;
75
77
  isReactivationModal: boolean;
@@ -117,7 +119,7 @@ export type GettyVideoEditorViewModelResponse = {
117
119
 
118
120
  export type InitialisePayload = Omit<
119
121
  BrandPageContainerState,
120
- 'customDomain' | 'customDomainConfig'
122
+ 'customDomain' | 'customDomainConfig' | 'isAdminMaker'
121
123
  > & {
122
124
  logoDraftToken?: string;
123
125
  isAdminMaker?: boolean;
@@ -158,6 +160,7 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
158
160
  publishErrorMessage: '',
159
161
  isBrandPageSlugEditMode: false,
160
162
  isProduction: false,
163
+ isAdminMaker: false,
161
164
  isPublishModalVisible: false,
162
165
  isPublishing: false,
163
166
  isSaving: false,
@@ -222,10 +225,8 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
222
225
 
223
226
  const brandPageMakerStore = useBrandPageMakerStore();
224
227
  const templateSettingsStore = useUiTemplateSettingsStore();
225
- const userStore = useBrandPageMakerUserStore();
226
-
227
- userStore.setIsAdminMaker(payload.isAdminMaker ?? false);
228
228
 
229
+ this.isAdminMaker = payload.isAdminMaker ?? false;
229
230
  this.brandPageBaseUrl = payload.brandPageBaseUrl;
230
231
  this.baseFabricRenderUrl = localisedRouteStore.baseFabricRenderDomain;
231
232
  this.brandPageDescription = payload.brandPageDescription;
@@ -921,11 +922,10 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
921
922
  saveOnly?: boolean;
922
923
  } = {},
923
924
  ) {
924
- const userStore = useBrandPageMakerUserStore();
925
925
  const brandPageMakerStore = useBrandPageMakerStore();
926
926
  const _eventTracker = useEventTracker();
927
927
 
928
- if (userStore.isAdminMaker) {
928
+ if (this.isAdminMaker) {
929
929
  throw new Error('save brand page is not allowed in admin mode');
930
930
  }
931
931
 
@@ -1064,9 +1064,7 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
1064
1064
  },
1065
1065
 
1066
1066
  async saveAndPublishBrandPage(eventButtonLocation: string) {
1067
- const userStore = useBrandPageMakerUserStore();
1068
-
1069
- if (userStore.isAdminMaker) {
1067
+ if (this.isAdminMaker) {
1070
1068
  throw new Error('save brand page is not allowed in admin mode');
1071
1069
  }
1072
1070
 
@@ -1101,10 +1099,9 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
1101
1099
  },
1102
1100
 
1103
1101
  async saveTemplate() {
1104
- const userStore = useBrandPageMakerUserStore();
1105
1102
  const brandPageMakerStore = useBrandPageMakerStore();
1106
1103
 
1107
- if (!userStore.isAdminMaker) {
1104
+ if (!this.isAdminMaker) {
1108
1105
  throw new Error('saveTemplate is not allowed in non admin mode');
1109
1106
  }
1110
1107
 
@@ -1534,12 +1531,6 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
1534
1531
  return userStore.isAdmin;
1535
1532
  },
1536
1533
 
1537
- isAdminMaker() {
1538
- const userStore = useBrandPageMakerUserStore();
1539
-
1540
- return userStore.isAdminMaker;
1541
- },
1542
-
1543
1534
  isPublished: (state) => {
1544
1535
  return state.brandPageStatus === 'Published';
1545
1536
  },
@@ -93,9 +93,8 @@ describe('brand page maker store module', () => {
93
93
  test('brandPageData should return button styles template when brand page maker is in admin mode', async () => {
94
94
  // Arrange
95
95
  const store = useBrandPageMakerStore();
96
- const userStore = useBrandPageMakerUserStore();
97
96
 
98
- userStore.setIsAdminMaker(true);
97
+ useBrandPageContainerStore().isAdminMaker = true;
99
98
 
100
99
  await store.initialise(INITIALISE_PAYLOAD);
101
100
 
@@ -109,9 +108,8 @@ describe('brand page maker store module', () => {
109
108
  test('brandPageData should return button styles when brand page maker is in admin mode', async () => {
110
109
  // Arrange
111
110
  const store = useBrandPageMakerStore();
112
- const userStore = useBrandPageMakerUserStore();
113
111
 
114
- userStore.setIsAdminMaker(true);
112
+ useBrandPageContainerStore().isAdminMaker = true;
115
113
 
116
114
  await store.initialise(INITIALISE_PAYLOAD);
117
115
 
@@ -188,9 +186,8 @@ describe('brand page maker store module', () => {
188
186
  test('brandPageTemplate should allow non-disallowed user content when is in admin mode', async () => {
189
187
  // Arrange
190
188
  const store = useBrandPageMakerStore();
191
- const userStore = useBrandPageMakerUserStore();
192
189
 
193
- userStore.setIsAdminMaker(true);
190
+ useBrandPageContainerStore().isAdminMaker = true;
194
191
 
195
192
  const contactFormContent: ContactFormContent = {
196
193
  id: faker.datatype.uuid(),
@@ -319,7 +316,7 @@ describe('brand page maker store module', () => {
319
316
  // colour-matched menu font colour-matches the sub nav on load. (Existing user drafts
320
317
  // are skipped — covered by migration-16.test.ts.)
321
318
  test('hamburger template in admin colour-matches the sub nav when the font is matched', async () => {
322
- useBrandPageMakerUserStore().setIsAdminMaker(true);
319
+ useBrandPageContainerStore().isAdminMaker = true;
323
320
 
324
321
  const store = useBrandPageMakerStore();
325
322
 
@@ -554,9 +551,7 @@ describe('brand page maker store module', () => {
554
551
 
555
552
  test('applySelectedTemplate should not set design template token when applying selected template and is admin', async () => {
556
553
  // Arrange
557
- const userStore = useBrandPageMakerUserStore();
558
-
559
- userStore.setIsAdminMaker(true);
554
+ useBrandPageContainerStore().isAdminMaker = true;
560
555
 
561
556
  const templateId = faker.string.uuid();
562
557
 
@@ -373,12 +373,11 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
373
373
  },
374
374
  async recalculateLogoSizes(forceRecalculate = false) {
375
375
  const brandPageContainerStore = useBrandPageContainerStore();
376
- const userStore = useBrandPageMakerUserStore();
377
376
  const pageSettingsStore = useUiPageSettingsStore();
378
377
  const logoSettingsStore = useUiLogoSettingsStore();
379
378
  const editableLogoStore = useUiEditableLogoStore();
380
379
 
381
- if (!userStore.isAdminMaker && this.isBrandSite) {
380
+ if (!brandPageContainerStore.isAdminMaker && this.isBrandSite) {
382
381
  await recalculateHeaderLogoSizes(
383
382
  pageSettingsStore,
384
383
  logoSettingsStore,
@@ -387,7 +386,10 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
387
386
  brandPageContainerStore.isPrePurchase,
388
387
  forceRecalculate,
389
388
  );
390
- } else if (!userStore.isAdminMaker && this.isBrandPageOrIsBrandContact) {
389
+ } else if (
390
+ !brandPageContainerStore.isAdminMaker &&
391
+ this.isBrandPageOrIsBrandContact
392
+ ) {
391
393
  await recalculateLogoContentDimensions(
392
394
  pageSettingsStore,
393
395
  editableLogoStore.editableLogoVariations,
@@ -403,7 +405,6 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
403
405
  const templateSettingsStore = useUiTemplateSettingsStore();
404
406
  const navigationStyleSettingsStore = useUiNavigationStyleSettingsStore();
405
407
  const backgroundSettingsStore = useUiBackgroundSettingsStore();
406
- const userStore = useBrandPageMakerUserStore();
407
408
  const containerStore = useBrandPageContainerStore();
408
409
  const uiContentSettings = useUiContentSettingsStore();
409
410
  const editableLogoStore = useUiEditableLogoStore();
@@ -446,7 +447,7 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
446
447
  const { logoImageUrl, logoImageBase64Url } =
447
448
  logoSettingsStore.selectedLogoImageUrl;
448
449
 
449
- if (userStore.isAdminMaker) {
450
+ if (containerStore.isAdminMaker) {
450
451
  const logoTemplateImage =
451
452
  logoUtil.safeGetLogoTemplateImageFromLogoTemplateImageUrl(
452
453
  logoImageUrl,
@@ -589,7 +590,7 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
589
590
 
590
591
  pageNavigationStore.setCurrentActivePage({});
591
592
 
592
- if (userStore.isAdminMaker) {
593
+ if (containerStore.isAdminMaker) {
593
594
  styleSettingsStore.setAdminStyleOptionDefaultValues();
594
595
 
595
596
  backgroundSettingsStore.setAdminBackgroundOptionDefaultValues();
@@ -603,7 +604,7 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
603
604
 
604
605
  styleSettingsStore.setGalleryStyles(brandPageModel.styles.galleryStyles);
605
606
 
606
- if (!userStore.isAdminMaker) {
607
+ if (!containerStore.isAdminMaker) {
607
608
  containerStore.setDesignTemplateToken({
608
609
  designTemplateToken: this.selectedTemplateId,
609
610
  });
@@ -1343,7 +1344,7 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
1343
1344
  brandPageModel.pages = model.pages;
1344
1345
  }
1345
1346
 
1346
- if (!userStore.isAdminMaker) {
1347
+ if (!brandPageContainerStore.isAdminMaker) {
1347
1348
  const { model } = applyLogoThemeToBrandPageModel(
1348
1349
  logoTheme,
1349
1350
  new BrandPageModel(brandPageModel),
@@ -1649,11 +1650,10 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
1649
1650
  });
1650
1651
  },
1651
1652
  initialiseAdminMaker(payload: { models: AdminPreviewLogoTemplateModel[] }) {
1652
- const userStore = useBrandPageMakerUserStore();
1653
1653
  const adminLogoSettingsStore = useAdminLogoSettingsStore();
1654
1654
  const uiContentSettings = useUiContentSettingsStore();
1655
1655
 
1656
- if (!userStore.isAdminMaker) {
1656
+ if (!useBrandPageContainerStore().isAdminMaker) {
1657
1657
  return;
1658
1658
  }
1659
1659
 
@@ -1989,7 +1989,7 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
1989
1989
  const videoStore = useVideoStore();
1990
1990
  const brandPageContainerStore = useBrandPageContainerStore();
1991
1991
 
1992
- if (userStore.isAdminMaker && uiStore.logoTheme) {
1992
+ if (brandPageContainerStore.isAdminMaker && uiStore.logoTheme) {
1993
1993
  const themedBrandPage = applyLogoThemeToBrandPageModel(
1994
1994
  uiStore.logoTheme,
1995
1995
  this.brandPageData,
@@ -2070,10 +2070,12 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
2070
2070
  return !this.isSaving;
2071
2071
  },
2072
2072
  isPublished(): boolean {
2073
- const userStore = useBrandPageMakerUserStore();
2074
2073
  const brandPageContainerStore = useBrandPageContainerStore();
2075
2074
 
2076
- return !userStore.isAdminMaker && brandPageContainerStore.isPublished;
2075
+ return (
2076
+ !brandPageContainerStore.isAdminMaker &&
2077
+ brandPageContainerStore.isPublished
2078
+ );
2077
2079
  },
2078
2080
  isPublishing(): boolean {
2079
2081
  const brandPageContainerStore = useBrandPageContainerStore();
@@ -2098,7 +2100,10 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
2098
2100
  showBrandCrowdLogo(): boolean {
2099
2101
  const userStore = useBrandPageMakerUserStore();
2100
2102
 
2101
- return !userStore.isAdminMaker && userStore.features.showBrandCrowdLogo;
2103
+ return (
2104
+ !useBrandPageContainerStore().isAdminMaker &&
2105
+ userStore.features.showBrandCrowdLogo
2106
+ );
2102
2107
  },
2103
2108
  },
2104
2109
  });
@@ -15,7 +15,6 @@ import {
15
15
  useBrandPageMakerStore,
16
16
  type OnTemplateSelectedPayload,
17
17
  } from '../brandpage-maker';
18
- import { useBrandPageMakerUserStore } from '../user';
19
18
  import type { LogoTheme, UserPersonalisationContent } from '@brand-page';
20
19
  import {
21
20
  useBrandPageContainerStore,
@@ -123,10 +122,9 @@ export const useUiStore = defineStore('ui', {
123
122
  this.logoDraftToken = payload.logoDraftToken;
124
123
  },
125
124
  async triggerLockedContentClickedEvent(payload: { type: string }) {
126
- const userStore = useBrandPageMakerUserStore();
127
125
  const brandPageContainerStore = useBrandPageContainerStore();
128
126
 
129
- if (userStore.isAdminMaker) {
127
+ if (brandPageContainerStore.isAdminMaker) {
130
128
  return;
131
129
  }
132
130
 
@@ -161,9 +159,9 @@ export const useUiStore = defineStore('ui', {
161
159
  },
162
160
  getters: {
163
161
  endpoints: (): Endpoints => {
164
- const userStore = useBrandPageMakerUserStore();
162
+ const brandPageContainerStore = useBrandPageContainerStore();
165
163
 
166
- if (userStore.isAdminMaker) {
164
+ if (brandPageContainerStore.isAdminMaker) {
167
165
  return DEFAULT_ADMIN_ENDPOINTS;
168
166
  } else {
169
167
  return DEFAULT_USER_ENDPOINTS;
@@ -30,39 +30,4 @@ describe('brand page user store module', () => {
30
30
  // Assert
31
31
  expect(store.isAdmin).toBe(false);
32
32
  });
33
-
34
- test('isAdminMaker should be false by default', async () => {
35
- // Arrange
36
- const store = useBrandPageMakerUserStore();
37
-
38
- // Act
39
-
40
- // Assert
41
- expect(store.isAdminMaker).toBe(false);
42
- });
43
-
44
- test('setIsAdminMaker should toggle isAdminMaker', async () => {
45
- // Arrange
46
- const store = useBrandPageMakerUserStore();
47
-
48
- // Act & Assert
49
- store.setIsAdminMaker(true);
50
- expect(store.isAdminMaker).toBe(true);
51
-
52
- store.setIsAdminMaker(false);
53
- expect(store.isAdminMaker).toBe(false);
54
- });
55
-
56
- test('setUserState should not affect isAdminMaker', async () => {
57
- // Arrange
58
- const store = useBrandPageMakerUserStore();
59
-
60
- store.setIsAdminMaker(true);
61
-
62
- // Act — setUserState still populates the legacy isAdmin flag only
63
- store.setUserState({ isAdmin: false });
64
-
65
- // Assert — isAdminMaker is owned by setIsAdminMaker, untouched here
66
- expect(store.isAdminMaker).toBe(true);
67
- });
68
33
  });
@@ -38,12 +38,10 @@ export const useBrandPageMakerUserStore = defineStore('brandPageMakerUser', {
38
38
  emailAddress: '',
39
39
  hasPremiumSubscription: false,
40
40
  brandPageCommissionPercentage: undefined,
41
- // Retained for backward-compat, superseded by `isAdminMaker`. Still populated by
42
- // `setUserState`, but no longer read by library code — use `isAdminMaker` instead.
41
+ // Retained for backward-compat, superseded by the container store's `isAdminMaker`.
42
+ // Still populated by `setUserState`, but no longer read by library code — admin maker
43
+ // mode is a property of the editing container, not user identity.
43
44
  isAdmin: false,
44
- // Identifies admin maker mode. Populated via the container store's `initialise`
45
- // (see `setIsAdminMaker`), which is what library code now branches on.
46
- isAdminMaker: false,
47
45
  userToken: undefined,
48
46
  }),
49
47
  actions: {
@@ -63,8 +61,5 @@ export const useBrandPageMakerUserStore = defineStore('brandPageMakerUser', {
63
61
  this.isAdmin = payload.isAdmin || false;
64
62
  this.features = Object.assign({}, this.features, payload.features);
65
63
  },
66
- setIsAdminMaker(isAdminMaker: boolean): void {
67
- this.isAdminMaker = isAdminMaker;
68
- },
69
64
  },
70
65
  });
@@ -81,7 +81,9 @@ export const useVideoStore = defineStore('video', {
81
81
 
82
82
  return (
83
83
  canUseGettyVideos &&
84
- (userStore.isAdminMaker || isPrePurchase || hasPremiumSubscription)
84
+ (brandPageContainerStore.isAdminMaker ||
85
+ isPrePurchase ||
86
+ hasPremiumSubscription)
85
87
  );
86
88
  },
87
89
  },
@@ -121,7 +121,7 @@ import ColorField from '../../content-settings/components/color-field/ColorField
121
121
  import {
122
122
  BRANDPAGE_SETTINGS_MODES,
123
123
  useBrandPageMakerStore,
124
- useBrandPageMakerUserStore,
124
+ useBrandPageContainerStore,
125
125
  useUiStore,
126
126
  useVideoStore,
127
127
  } from '@brand-page-maker/stores';
@@ -143,7 +143,7 @@ import ReplaceImageSettingsForBackgroundSettings from './ReplaceImageSettingsFor
143
143
  import { useEventTracker } from '@brand-page-maker/composables/useEventTracker';
144
144
 
145
145
  const backgroundSettingsStore = useUiBackgroundSettingsStore();
146
- const userStore = useBrandPageMakerUserStore();
146
+ const containerStore = useBrandPageContainerStore();
147
147
  const brandPageMakerStore = useBrandPageMakerStore();
148
148
  const uiStore = useUiStore();
149
149
  const bpEventTracker = useEventTracker();
@@ -158,7 +158,7 @@ const recommendedLogoColors = computed(
158
158
  const logoColors = computed(() => backgroundSettingsStore.logoColors);
159
159
  const logoTheme = computed(() => uiStore.logoTheme);
160
160
  const backgroundMode = computed(() => backgroundSettingsStore.backgroundMode);
161
- const isAdmin = computed(() => userStore.isAdminMaker);
161
+ const isAdmin = computed(() => containerStore.isAdminMaker);
162
162
  const isPersonalisationEnabled = computed(
163
163
  () => uiStore.isPersonalisationEnabled,
164
164
  );
@@ -163,7 +163,7 @@ import ImageField from '../../content-settings/components/image-field/ImageField
163
163
  import ShapePositionSlider from '@brand-page-maker/components/admin-background-settings/ShapePositionSlider.vue';
164
164
  import { useUiBackgroundSettingsStore } from '../store';
165
165
  import { useBackgroundShapeControls } from '../composables/useBackgroundShapeControls';
166
- import { useBrandPageMakerUserStore } from '@brand-page-maker/stores';
166
+ import { useBrandPageContainerStore } from '@brand-page-maker/stores';
167
167
  import { RGBAtoHex, hexToRGBA } from '@utils/helpers';
168
168
  import { isColorMatched } from '@brand-page-maker/utils';
169
169
  import {
@@ -186,8 +186,8 @@ defineProps({
186
186
  });
187
187
 
188
188
  const store = useUiBackgroundSettingsStore();
189
- const userStore = useBrandPageMakerUserStore();
190
- const isAdmin = computed(() => userStore.isAdminMaker);
189
+ const containerStore = useBrandPageContainerStore();
190
+ const isAdmin = computed(() => containerStore.isAdminMaker);
191
191
 
192
192
  const {
193
193
  backgroundShapes,
@@ -22,7 +22,7 @@ import ReplaceImageBaseSettings from '@shared/content-settings/components/replac
22
22
  import {
23
23
  GETTY_VIDEO_LIMIT_FOR_SITE,
24
24
  useBrandPageMakerStore,
25
- useBrandPageMakerUserStore,
25
+ useBrandPageContainerStore,
26
26
  useVideoStore,
27
27
  } from '@brand-page-maker/stores';
28
28
  import { useUiBackgroundSettingsStore } from '../store';
@@ -51,14 +51,14 @@ const props = withDefaults(defineProps<Props>(), {
51
51
  const imageExtension = ['.png', '.ico'];
52
52
 
53
53
  const brandPageMakerStore = useBrandPageMakerStore();
54
- const userStore = useBrandPageMakerUserStore();
54
+ const containerStore = useBrandPageContainerStore();
55
55
  const backgroundSettingsStore = useUiBackgroundSettingsStore();
56
56
  const videoStore = useVideoStore();
57
57
  const contentSettingsStore = useUiContentSettingsStore();
58
58
  const bpEventTracker = useEventTracker();
59
59
 
60
60
  const backgroundMode = computed(() => backgroundSettingsStore.backgroundMode);
61
- const isAdmin = computed(() => userStore.isAdminMaker);
61
+ const isAdmin = computed(() => containerStore.isAdminMaker);
62
62
 
63
63
  const mediaSettings = computed((): ReplaceImageSettingsBase | undefined => {
64
64
  return brandPageMakerStore.fieldSettings?.replaceImageSettings;
@@ -47,7 +47,7 @@ import ColorField from '../../content-settings/components/color-field/ColorField
47
47
  import ImageField from '../../content-settings/components/image-field/ImageField.vue';
48
48
  import { useUiBackgroundSettingsStore } from '../store';
49
49
  import { useSingleBackgroundShape } from '../composables/useSingleBackgroundShape';
50
- import { useBrandPageMakerUserStore } from '@brand-page-maker/stores';
50
+ import { useBrandPageContainerStore } from '@brand-page-maker/stores';
51
51
  import { backgroundSettingsTr } from '@src/composables/useTranslate';
52
52
  import type { LogoTheme } from '@brand-page';
53
53
 
@@ -65,8 +65,8 @@ defineProps({
65
65
  });
66
66
 
67
67
  const store = useUiBackgroundSettingsStore();
68
- const userStore = useBrandPageMakerUserStore();
69
- const isAdmin = computed(() => userStore.isAdminMaker);
68
+ const containerStore = useBrandPageContainerStore();
69
+ const isAdmin = computed(() => containerStore.isAdminMaker);
70
70
 
71
71
  const {
72
72
  shapeUrl,
@@ -28,7 +28,7 @@ import { useUiBackgroundSettingsStore } from '../../store';
28
28
  import ColorField from '../../../content-settings/components/color-field/ColorField.vue';
29
29
  import { isColorMatched } from '@brand-page-maker/utils';
30
30
  import { arrayToLinearGradient, hexToRGBA, RGBAtoHex } from '@utils/helpers';
31
- import { useBrandPageMakerUserStore } from '@brand-page-maker/stores';
31
+ import { useBrandPageContainerStore } from '@brand-page-maker/stores';
32
32
  import { backgroundSettingsTr } from '@src/composables/useTranslate';
33
33
 
34
34
  // Props
@@ -43,11 +43,11 @@ const props = withDefaults(defineProps<Props>(), {
43
43
  });
44
44
 
45
45
  // Stores
46
- const userStore = useBrandPageMakerUserStore();
46
+ const containerStore = useBrandPageContainerStore();
47
47
  const backgroundSettingsStore = useUiBackgroundSettingsStore();
48
48
 
49
49
  // Computed
50
- const isAdmin = computed(() => userStore.isAdminMaker);
50
+ const isAdmin = computed(() => containerStore.isAdminMaker);
51
51
  const backgroundStyles = computed(
52
52
  () => backgroundSettingsStore.backgroundStyles,
53
53
  );