@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
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-Cq0WlFYO.js";
2
+ import { _ as t } from "./lib-dewphkuW.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-Cq0WlFYO.js";
2
+ import { _ as t } from "./lib-dewphkuW.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-Cq0WlFYO.js";
2
+ import { _ as t } from "./lib-dewphkuW.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-Cq0WlFYO.js";
2
+ import { _ as t } from "./lib-dewphkuW.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-Cq0WlFYO.js";
2
+ import { _ as t } from "./lib-dewphkuW.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-Cq0WlFYO.js";
2
+ import { _ as t } from "./lib-dewphkuW.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-Cq0WlFYO.js";
2
+ import { _ as t } from "./lib-dewphkuW.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-Cq0WlFYO.js";
2
+ import { _ as e } from "./lib-dewphkuW.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-Cq0WlFYO.js";
2
+ import { _ as e } from "./lib-dewphkuW.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-Cq0WlFYO.js";
2
+ import { _ as e } from "./lib-dewphkuW.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-Cq0WlFYO.js";
2
+ import { _ as e } from "./lib-dewphkuW.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-Cq0WlFYO.js";
2
+ import { _ as e } from "./lib-dewphkuW.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-Cq0WlFYO.js";
2
+ import { _ as M } from "./lib-dewphkuW.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-Cq0WlFYO.js";
2
+ import { _ as M } from "./lib-dewphkuW.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -14,7 +14,6 @@ declare const _default: import("vue").DefineComponent<{}, {
14
14
  brandPageCommissionPercentage?: number;
15
15
  features?: Partial<import("@brand-page-maker/stores").UserFeatures>;
16
16
  }): void;
17
- setIsAdminMaker(isAdminMaker: boolean): void;
18
17
  }>;
19
18
  brandPageMakerStore: import("pinia").Store<"brandPageMaker", import("@brand-page-maker/stores").BrandPageMakerState, {
20
19
  contentErrorCount(): number;
@@ -10,7 +10,7 @@ export default defineComponent({
10
10
  const brandPageMakerStore = useBrandPageMakerStore();
11
11
  const containerStore = useBrandPageContainerStore();
12
12
  return {
13
- isAdmin: computed(() => userStore.isAdminMaker),
13
+ isAdmin: computed(() => containerStore.isAdminMaker),
14
14
  // BP-5873: the Preview button is behind an AB test, and pre/post purchase are
15
15
  // two separate experiments. Pick the one for the current purchase state — a
16
16
  // user's value on the other side is independent and must not leak across.
@@ -221,12 +221,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
221
221
  brandPageCommissionPercentage?: number;
222
222
  features?: Partial<UserFeatures>;
223
223
  }): void;
224
- setIsAdminMaker(isAdminMaker: boolean): void;
225
224
  }>;
226
225
  containerStore: import("pinia").Store<"brandPageContainer", import("@brand-page-maker/stores").BrandPageContainerState, {
227
226
  brandPageContentTypes(): string[];
228
227
  isAdmin(): boolean;
229
- isAdminMaker(): boolean;
230
228
  isPublished: (state: {
231
229
  availableTaxes: any[];
232
230
  brandPageBaseUrl: string;
@@ -263,6 +261,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
263
261
  isUpgradeModalVisible: boolean;
264
262
  isPublishing: boolean;
265
263
  isProduction: boolean;
264
+ isAdminMaker: boolean;
266
265
  isSellDomainNameEnabled: boolean;
267
266
  isStripeOnboardingModalVisible: boolean;
268
267
  isReactivationModal: boolean;
@@ -357,6 +356,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
357
356
  isUpgradeModalVisible: boolean;
358
357
  isPublishing: boolean;
359
358
  isProduction: boolean;
359
+ isAdminMaker: boolean;
360
360
  isSellDomainNameEnabled: boolean;
361
361
  isStripeOnboardingModalVisible: boolean;
362
362
  isReactivationModal: boolean;
@@ -451,6 +451,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
451
451
  isUpgradeModalVisible: boolean;
452
452
  isPublishing: boolean;
453
453
  isProduction: boolean;
454
+ isAdminMaker: boolean;
454
455
  isSellDomainNameEnabled: boolean;
455
456
  isStripeOnboardingModalVisible: boolean;
456
457
  isReactivationModal: boolean;
@@ -84,7 +84,7 @@ export default defineComponent({
84
84
  backButtonLabel: computed(() => containerStore.backButtonLabel),
85
85
  isDesignCom: computed(() => containerStore.isDesignCom),
86
86
  selectedTabName: computed(() => sideBarStore.selectedTabName),
87
- isAdmin: computed(() => userStore.isAdminMaker),
87
+ isAdmin: computed(() => containerStore.isAdminMaker),
88
88
  contentErrorCount: computed(() => contentSettingsStore.contentErrorCount),
89
89
  mode: computed(() => contentSettingsStore.mode),
90
90
  brandPageMakerStore,
@@ -186,7 +186,7 @@ const InitialiseMakerStores = (options) => {
186
186
  hasPremiumSubscription: false,
187
187
  brandPageCommissionPercentage: 0.1,
188
188
  });
189
- userStore.setIsAdminMaker(options.isAdmin ?? false);
189
+ brandPageContainerStore.isAdminMaker = options.isAdmin ?? false;
190
190
  };
191
191
  const FABRIC_RENDER_BASE_URL = 'https://localhost:6006/';
192
192
  const SAMPLE_BRAND_PAGE_URL = 'https://brand.page';
@@ -668,7 +668,6 @@ declare const _default: import("vue").DefineComponent<{}, {
668
668
  brandPageContainerStore: import("pinia").Store<"brandPageContainer", import("@brand-page-maker/stores").BrandPageContainerState, {
669
669
  brandPageContentTypes(): string[];
670
670
  isAdmin(): boolean;
671
- isAdminMaker(): boolean;
672
671
  isPublished: (state: {
673
672
  availableTaxes: any[];
674
673
  brandPageBaseUrl: string;
@@ -705,6 +704,7 @@ declare const _default: import("vue").DefineComponent<{}, {
705
704
  isUpgradeModalVisible: boolean;
706
705
  isPublishing: boolean;
707
706
  isProduction: boolean;
707
+ isAdminMaker: boolean;
708
708
  isSellDomainNameEnabled: boolean;
709
709
  isStripeOnboardingModalVisible: boolean;
710
710
  isReactivationModal: boolean;
@@ -799,6 +799,7 @@ declare const _default: import("vue").DefineComponent<{}, {
799
799
  isUpgradeModalVisible: boolean;
800
800
  isPublishing: boolean;
801
801
  isProduction: boolean;
802
+ isAdminMaker: boolean;
802
803
  isSellDomainNameEnabled: boolean;
803
804
  isStripeOnboardingModalVisible: boolean;
804
805
  isReactivationModal: boolean;
@@ -893,6 +894,7 @@ declare const _default: import("vue").DefineComponent<{}, {
893
894
  isUpgradeModalVisible: boolean;
894
895
  isPublishing: boolean;
895
896
  isProduction: boolean;
897
+ isAdminMaker: boolean;
896
898
  isSellDomainNameEnabled: boolean;
897
899
  isStripeOnboardingModalVisible: boolean;
898
900
  isReactivationModal: boolean;
@@ -42,7 +42,7 @@ export default defineComponent({
42
42
  getValue: computed(() => contentSettingsStore.getValue),
43
43
  selectedTemplateId: computed(() => brandPageMakerStore.selectedTemplateId),
44
44
  canUseRichTextEditor: computed(() => brandPageMakerUserStore.features.canUseRichTextEditor),
45
- isAdmin: computed(() => brandPageMakerUserStore.isAdminMaker),
45
+ isAdmin: computed(() => brandPageContainerStore.isAdminMaker),
46
46
  logoTheme: computed(() => uiStore.logoTheme),
47
47
  contentSettingsStore,
48
48
  brandPageMakerStore,
@@ -161,7 +161,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
161
161
  brandPageCommissionPercentage?: number;
162
162
  features?: Partial<import("@brand-page-maker/stores").UserFeatures>;
163
163
  }): void;
164
- setIsAdminMaker(isAdminMaker: boolean): void;
165
164
  }>;
166
165
  }, {
167
166
  imageExtension: string[];
@@ -1,5 +1,5 @@
1
1
  import { computed, defineComponent } from 'vue';
2
- import { useBrandPageMakerStore, BRANDPAGE_SETTINGS_MODES, useBrandPageMakerUserStore, } from '@brand-page-maker/stores';
2
+ import { useBrandPageMakerStore, BRANDPAGE_SETTINGS_MODES, useBrandPageMakerUserStore, useBrandPageContainerStore, } from '@brand-page-maker/stores';
3
3
  import { MEDIA_TYPES } from '@brand-page/models/brand-page-context.model';
4
4
  const imageExtension = ['.png', '.ico'];
5
5
  export default defineComponent({
@@ -13,9 +13,10 @@ export default defineComponent({
13
13
  setup() {
14
14
  const brandPageMakerStore = useBrandPageMakerStore();
15
15
  const userStore = useBrandPageMakerUserStore();
16
+ const containerStore = useBrandPageContainerStore();
16
17
  return {
17
18
  mode: computed(() => brandPageMakerStore.mode),
18
- isAdmin: computed(() => userStore.isAdminMaker),
19
+ isAdmin: computed(() => containerStore.isAdminMaker),
19
20
  brandPageMakerStore,
20
21
  userStore,
21
22
  };
@@ -11,7 +11,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
11
11
  brandPageContainerStore: import("pinia").Store<"brandPageContainer", import("@brand-page-maker/stores").BrandPageContainerState, {
12
12
  brandPageContentTypes(): string[];
13
13
  isAdmin(): boolean;
14
- isAdminMaker(): boolean;
15
14
  isPublished: (state: {
16
15
  availableTaxes: any[];
17
16
  brandPageBaseUrl: string;
@@ -48,6 +47,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
48
47
  isUpgradeModalVisible: boolean;
49
48
  isPublishing: boolean;
50
49
  isProduction: boolean;
50
+ isAdminMaker: boolean;
51
51
  isSellDomainNameEnabled: boolean;
52
52
  isStripeOnboardingModalVisible: boolean;
53
53
  isReactivationModal: boolean;
@@ -142,6 +142,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
142
142
  isUpgradeModalVisible: boolean;
143
143
  isPublishing: boolean;
144
144
  isProduction: boolean;
145
+ isAdminMaker: boolean;
145
146
  isSellDomainNameEnabled: boolean;
146
147
  isStripeOnboardingModalVisible: boolean;
147
148
  isReactivationModal: boolean;
@@ -236,6 +237,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
236
237
  isUpgradeModalVisible: boolean;
237
238
  isPublishing: boolean;
238
239
  isProduction: boolean;
240
+ isAdminMaker: boolean;
239
241
  isSellDomainNameEnabled: boolean;
240
242
  isStripeOnboardingModalVisible: boolean;
241
243
  isReactivationModal: boolean;
@@ -27,7 +27,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
27
27
  brandPageContainerStore: import("pinia").Store<"brandPageContainer", import("@brand-page-maker/stores").BrandPageContainerState, {
28
28
  brandPageContentTypes(): string[];
29
29
  isAdmin(): boolean;
30
- isAdminMaker(): boolean;
31
30
  isPublished: (state: {
32
31
  availableTaxes: any[];
33
32
  brandPageBaseUrl: string;
@@ -64,6 +63,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
64
63
  isUpgradeModalVisible: boolean;
65
64
  isPublishing: boolean;
66
65
  isProduction: boolean;
66
+ isAdminMaker: boolean;
67
67
  isSellDomainNameEnabled: boolean;
68
68
  isStripeOnboardingModalVisible: boolean;
69
69
  isReactivationModal: boolean;
@@ -158,6 +158,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
158
158
  isUpgradeModalVisible: boolean;
159
159
  isPublishing: boolean;
160
160
  isProduction: boolean;
161
+ isAdminMaker: boolean;
161
162
  isSellDomainNameEnabled: boolean;
162
163
  isStripeOnboardingModalVisible: boolean;
163
164
  isReactivationModal: boolean;
@@ -252,6 +253,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
252
253
  isUpgradeModalVisible: boolean;
253
254
  isPublishing: boolean;
254
255
  isProduction: boolean;
256
+ isAdminMaker: boolean;
255
257
  isSellDomainNameEnabled: boolean;
256
258
  isStripeOnboardingModalVisible: boolean;
257
259
  isReactivationModal: boolean;
@@ -32,7 +32,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
32
32
  brandPageContainer: import("pinia").Store<"brandPageContainer", import("@brand-page-maker/stores").BrandPageContainerState, {
33
33
  brandPageContentTypes(): string[];
34
34
  isAdmin(): boolean;
35
- isAdminMaker(): boolean;
36
35
  isPublished: (state: {
37
36
  availableTaxes: any[];
38
37
  brandPageBaseUrl: string;
@@ -69,6 +68,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
69
68
  isUpgradeModalVisible: boolean;
70
69
  isPublishing: boolean;
71
70
  isProduction: boolean;
71
+ isAdminMaker: boolean;
72
72
  isSellDomainNameEnabled: boolean;
73
73
  isStripeOnboardingModalVisible: boolean;
74
74
  isReactivationModal: boolean;
@@ -163,6 +163,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
163
163
  isUpgradeModalVisible: boolean;
164
164
  isPublishing: boolean;
165
165
  isProduction: boolean;
166
+ isAdminMaker: boolean;
166
167
  isSellDomainNameEnabled: boolean;
167
168
  isStripeOnboardingModalVisible: boolean;
168
169
  isReactivationModal: boolean;
@@ -257,6 +258,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
257
258
  isUpgradeModalVisible: boolean;
258
259
  isPublishing: boolean;
259
260
  isProduction: boolean;
261
+ isAdminMaker: boolean;
260
262
  isSellDomainNameEnabled: boolean;
261
263
  isStripeOnboardingModalVisible: boolean;
262
264
  isReactivationModal: boolean;
@@ -13,7 +13,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
13
13
  brandPageContainer: import("pinia").Store<"brandPageContainer", import("@brand-page-maker/stores").BrandPageContainerState, {
14
14
  brandPageContentTypes(): string[];
15
15
  isAdmin(): boolean;
16
- isAdminMaker(): boolean;
17
16
  isPublished: (state: {
18
17
  availableTaxes: any[];
19
18
  brandPageBaseUrl: string;
@@ -50,6 +49,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
50
49
  isUpgradeModalVisible: boolean;
51
50
  isPublishing: boolean;
52
51
  isProduction: boolean;
52
+ isAdminMaker: boolean;
53
53
  isSellDomainNameEnabled: boolean;
54
54
  isStripeOnboardingModalVisible: boolean;
55
55
  isReactivationModal: boolean;
@@ -144,6 +144,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
144
144
  isUpgradeModalVisible: boolean;
145
145
  isPublishing: boolean;
146
146
  isProduction: boolean;
147
+ isAdminMaker: boolean;
147
148
  isSellDomainNameEnabled: boolean;
148
149
  isStripeOnboardingModalVisible: boolean;
149
150
  isReactivationModal: boolean;
@@ -238,6 +239,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
238
239
  isUpgradeModalVisible: boolean;
239
240
  isPublishing: boolean;
240
241
  isProduction: boolean;
242
+ isAdminMaker: boolean;
241
243
  isSellDomainNameEnabled: boolean;
242
244
  isStripeOnboardingModalVisible: boolean;
243
245
  isReactivationModal: boolean;
@@ -77,12 +77,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
77
77
  brandPageCommissionPercentage?: number;
78
78
  features?: Partial<import("@brand-page-maker/stores").UserFeatures>;
79
79
  }): void;
80
- setIsAdminMaker(isAdminMaker: boolean): void;
81
80
  }>;
82
81
  brandPageContainerStore: import("pinia").Store<"brandPageContainer", import("@brand-page-maker/stores").BrandPageContainerState, {
83
82
  brandPageContentTypes(): string[];
84
83
  isAdmin(): boolean;
85
- isAdminMaker(): boolean;
86
84
  isPublished: (state: {
87
85
  availableTaxes: any[];
88
86
  brandPageBaseUrl: string;
@@ -119,6 +117,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
119
117
  isUpgradeModalVisible: boolean;
120
118
  isPublishing: boolean;
121
119
  isProduction: boolean;
120
+ isAdminMaker: boolean;
122
121
  isSellDomainNameEnabled: boolean;
123
122
  isStripeOnboardingModalVisible: boolean;
124
123
  isReactivationModal: boolean;
@@ -213,6 +212,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
213
212
  isUpgradeModalVisible: boolean;
214
213
  isPublishing: boolean;
215
214
  isProduction: boolean;
215
+ isAdminMaker: boolean;
216
216
  isSellDomainNameEnabled: boolean;
217
217
  isStripeOnboardingModalVisible: boolean;
218
218
  isReactivationModal: boolean;
@@ -307,6 +307,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
307
307
  isUpgradeModalVisible: boolean;
308
308
  isPublishing: boolean;
309
309
  isProduction: boolean;
310
+ isAdminMaker: boolean;
310
311
  isSellDomainNameEnabled: boolean;
311
312
  isStripeOnboardingModalVisible: boolean;
312
313
  isReactivationModal: boolean;
@@ -34,7 +34,7 @@ export default defineComponent({
34
34
  selectedTemplateId: computed(() => brandPageMakerStore.selectedTemplateId),
35
35
  isPrePurchase: computed(() => brandPageContainerStore.isPrePurchase),
36
36
  runtimeEnvironment: computed(() => brandPageContainerStore.runtimeEnvironment),
37
- isAdmin: computed(() => brandPageMakerUserStore.isAdminMaker),
37
+ isAdmin: computed(() => brandPageContainerStore.isAdminMaker),
38
38
  userToken: computed(() => brandPageMakerUserStore.userToken),
39
39
  isBrandSite: computed(() => brandPageMakerStore.brandPageType === BRAND_PAGE_TYPES.brandSite),
40
40
  renderAsImage: computed(() => templateSettingsStore.renderAsImage),
@@ -8,7 +8,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
8
8
  brandPageContainerStore: import("pinia").Store<"brandPageContainer", import("@brand-page-maker/stores").BrandPageContainerState, {
9
9
  brandPageContentTypes(): string[];
10
10
  isAdmin(): boolean;
11
- isAdminMaker(): boolean;
12
11
  isPublished: (state: {
13
12
  availableTaxes: any[];
14
13
  brandPageBaseUrl: string;
@@ -45,6 +44,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
45
44
  isUpgradeModalVisible: boolean;
46
45
  isPublishing: boolean;
47
46
  isProduction: boolean;
47
+ isAdminMaker: boolean;
48
48
  isSellDomainNameEnabled: boolean;
49
49
  isStripeOnboardingModalVisible: boolean;
50
50
  isReactivationModal: boolean;
@@ -139,6 +139,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
139
139
  isUpgradeModalVisible: boolean;
140
140
  isPublishing: boolean;
141
141
  isProduction: boolean;
142
+ isAdminMaker: boolean;
142
143
  isSellDomainNameEnabled: boolean;
143
144
  isStripeOnboardingModalVisible: boolean;
144
145
  isReactivationModal: boolean;
@@ -233,6 +234,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
233
234
  isUpgradeModalVisible: boolean;
234
235
  isPublishing: boolean;
235
236
  isProduction: boolean;
237
+ isAdminMaker: boolean;
236
238
  isSellDomainNameEnabled: boolean;
237
239
  isStripeOnboardingModalVisible: boolean;
238
240
  isReactivationModal: boolean;
@@ -9,7 +9,7 @@ import { type ComputedRef } from 'vue';
9
9
  * same precedent as RichTextEditor / GettyVideos / AITextGenerator. The
10
10
  * one flag governs all three brands (brand-site, brand-page,
11
11
  * brand-contact) — there is no per-brand gating.
12
- * 2. The session is NOT in admin-maker mode (`userStore.isAdminMaker`). The
12
+ * 2. The session is NOT in admin-maker mode (`containerStore.isAdminMaker`). The
13
13
  * admin maker uses the same components but a different editing flow
14
14
  * (template authoring) where undo/redo is out of scope.
15
15
  */
@@ -1,5 +1,6 @@
1
1
  import { computed } from 'vue';
2
2
  import { useBrandPageMakerUserStore } from '@brand-page-maker/stores/user';
3
+ import { useBrandPageContainerStore } from '@brand-page-maker/stores';
3
4
  /**
4
5
  * Returns whether undo/redo is active for the current maker session. Both
5
6
  * conditions must hold:
@@ -10,11 +11,12 @@ import { useBrandPageMakerUserStore } from '@brand-page-maker/stores/user';
10
11
  * same precedent as RichTextEditor / GettyVideos / AITextGenerator. The
11
12
  * one flag governs all three brands (brand-site, brand-page,
12
13
  * brand-contact) — there is no per-brand gating.
13
- * 2. The session is NOT in admin-maker mode (`userStore.isAdminMaker`). The
14
+ * 2. The session is NOT in admin-maker mode (`containerStore.isAdminMaker`). The
14
15
  * admin maker uses the same components but a different editing flow
15
16
  * (template authoring) where undo/redo is out of scope.
16
17
  */
17
18
  export function useUndoRedoFlag() {
18
19
  const userStore = useBrandPageMakerUserStore();
19
- return computed(() => userStore.features.canUseUndoRedo && !userStore.isAdminMaker);
20
+ const containerStore = useBrandPageContainerStore();
21
+ return computed(() => userStore.features.canUseUndoRedo && !containerStore.isAdminMaker);
20
22
  }
@@ -29,6 +29,7 @@ export interface BrandPageContainerState {
29
29
  isUpgradeModalVisible: boolean;
30
30
  isPublishing: boolean;
31
31
  isProduction: boolean;
32
+ isAdminMaker: boolean;
32
33
  isSellDomainNameEnabled: boolean;
33
34
  isStripeOnboardingModalVisible: boolean;
34
35
  isReactivationModal: boolean;
@@ -69,7 +70,7 @@ export type GettyVideoEditorViewModelResponse = {
69
70
  uri: string;
70
71
  };
71
72
  };
72
- export type InitialisePayload = Omit<BrandPageContainerState, 'customDomain' | 'customDomainConfig'> & {
73
+ export type InitialisePayload = Omit<BrandPageContainerState, 'customDomain' | 'customDomainConfig' | 'isAdminMaker'> & {
73
74
  logoDraftToken?: string;
74
75
  isAdminMaker?: boolean;
75
76
  brandPageCustomDomain?: CustomDomainModel;
@@ -88,7 +89,6 @@ export declare const BRANDPAGE_STATUS: Readonly<{
88
89
  export declare const useBrandPageContainerStore: import("pinia").StoreDefinition<"brandPageContainer", BrandPageContainerState, {
89
90
  brandPageContentTypes(): string[];
90
91
  isAdmin(): boolean;
91
- isAdminMaker(): boolean;
92
92
  isPublished: (state: {
93
93
  availableTaxes: any[];
94
94
  brandPageBaseUrl: string;
@@ -125,6 +125,7 @@ export declare const useBrandPageContainerStore: import("pinia").StoreDefinition
125
125
  isUpgradeModalVisible: boolean;
126
126
  isPublishing: boolean;
127
127
  isProduction: boolean;
128
+ isAdminMaker: boolean;
128
129
  isSellDomainNameEnabled: boolean;
129
130
  isStripeOnboardingModalVisible: boolean;
130
131
  isReactivationModal: boolean;
@@ -219,6 +220,7 @@ export declare const useBrandPageContainerStore: import("pinia").StoreDefinition
219
220
  isUpgradeModalVisible: boolean;
220
221
  isPublishing: boolean;
221
222
  isProduction: boolean;
223
+ isAdminMaker: boolean;
222
224
  isSellDomainNameEnabled: boolean;
223
225
  isStripeOnboardingModalVisible: boolean;
224
226
  isReactivationModal: boolean;
@@ -313,6 +315,7 @@ export declare const useBrandPageContainerStore: import("pinia").StoreDefinition
313
315
  isUpgradeModalVisible: boolean;
314
316
  isPublishing: boolean;
315
317
  isProduction: boolean;
318
+ isAdminMaker: boolean;
316
319
  isSellDomainNameEnabled: boolean;
317
320
  isStripeOnboardingModalVisible: boolean;
318
321
  isReactivationModal: boolean;
@@ -40,6 +40,7 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
40
40
  publishErrorMessage: '',
41
41
  isBrandPageSlugEditMode: false,
42
42
  isProduction: false,
43
+ isAdminMaker: false,
43
44
  isPublishModalVisible: false,
44
45
  isPublishing: false,
45
46
  isSaving: false,
@@ -94,8 +95,7 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
94
95
  }
95
96
  const brandPageMakerStore = useBrandPageMakerStore();
96
97
  const templateSettingsStore = useUiTemplateSettingsStore();
97
- const userStore = useBrandPageMakerUserStore();
98
- userStore.setIsAdminMaker(payload.isAdminMaker ?? false);
98
+ this.isAdminMaker = payload.isAdminMaker ?? false;
99
99
  this.brandPageBaseUrl = payload.brandPageBaseUrl;
100
100
  this.baseFabricRenderUrl = localisedRouteStore.baseFabricRenderDomain;
101
101
  this.brandPageDescription = payload.brandPageDescription;
@@ -587,10 +587,9 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
587
587
  };
588
588
  },
589
589
  async saveBrandPage(payload = {}) {
590
- const userStore = useBrandPageMakerUserStore();
591
590
  const brandPageMakerStore = useBrandPageMakerStore();
592
591
  const _eventTracker = useEventTracker();
593
- if (userStore.isAdminMaker) {
592
+ if (this.isAdminMaker) {
594
593
  throw new Error('save brand page is not allowed in admin mode');
595
594
  }
596
595
  if (this.standalone) {
@@ -684,8 +683,7 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
684
683
  }
685
684
  },
686
685
  async saveAndPublishBrandPage(eventButtonLocation) {
687
- const userStore = useBrandPageMakerUserStore();
688
- if (userStore.isAdminMaker) {
686
+ if (this.isAdminMaker) {
689
687
  throw new Error('save brand page is not allowed in admin mode');
690
688
  }
691
689
  const response = await this.saveBrandPage({
@@ -711,9 +709,8 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
711
709
  }
712
710
  },
713
711
  async saveTemplate() {
714
- const userStore = useBrandPageMakerUserStore();
715
712
  const brandPageMakerStore = useBrandPageMakerStore();
716
- if (!userStore.isAdminMaker) {
713
+ if (!this.isAdminMaker) {
717
714
  throw new Error('saveTemplate is not allowed in non admin mode');
718
715
  }
719
716
  const dataObject = brandPageMakerStore.brandPageTemplate;
@@ -988,10 +985,6 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
988
985
  const userStore = useBrandPageMakerUserStore();
989
986
  return userStore.isAdmin;
990
987
  },
991
- isAdminMaker() {
992
- const userStore = useBrandPageMakerUserStore();
993
- return userStore.isAdminMaker;
994
- },
995
988
  isPublished: (state) => {
996
989
  return state.brandPageStatus === 'Published';
997
990
  },