@designcrowd/library.brand-page 6.2.6 → 6.2.7-ast-seo-1

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 (49) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-DpeSEnwP.js → CreatedOnBrandCrowd-de-de-BZlravZL.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-CxYv3NzT.js → CreatedOnBrandCrowd-en-us-oXLQZGZg.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-CzQ1HRHw.js → CreatedOnBrandCrowd-es-es-B18SDh61.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-J77YZaT1.js → CreatedOnBrandCrowd-fr-ca-vu8_3Fyf.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-J77YZaT1.js → CreatedOnBrandCrowd-fr-fr-vu8_3Fyf.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-1vh4Smqt.js → CreatedOnBrandCrowd-pt-br-6pQR0Wzi.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-1vh4Smqt.js → CreatedOnBrandCrowd-pt-pt-6pQR0Wzi.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-CXX6W_29.js → CreatedOnDcom-de-de-D2pq41Qf.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-D78BmX6f.js → CreatedOnDcom-en-us-BS0AqljV.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-FfbPM2vD.js → CreatedOnDcom-es-es-D9I9xTcw.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-C6L60rxJ.js → CreatedOnDcom-fr-ca-TKF-f5L7.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-BEDnW9w-.js → CreatedOnDcom-fr-fr-DA0HdSOB.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-CZXVvc1n.js → CreatedOnDcom-pt-br-B4vuHG3j.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-IQq744nb.js → CreatedOnDcom-pt-pt-BXOtmPVH.js} +1 -1
  15. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +6 -5
  16. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +6 -5
  17. package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.d.ts +6 -5
  18. package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +7 -5
  19. package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.js +5 -0
  20. package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +6 -5
  21. package/lib/src/brand-page-maker/components/seo-settings/UseExistingDomainModal.mixin.d.ts +6 -5
  22. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +6 -5
  23. package/lib/src/brand-page-maker/components/upgrade-to-premium-button/UpgradeToPremiumButton.mixin.d.ts +6 -5
  24. package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +7 -6
  25. package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.js +52 -5
  26. package/lib/src/css/library.brand-page-brandCrowd.min.css +226 -221
  27. package/lib/src/css/library.brand-page-brandPage.min.css +226 -221
  28. package/lib/src/css/library.brand-page-designCom.min.css +226 -221
  29. package/lib/src/css/library.brand-page-preview.min.css +226 -221
  30. package/lib/src/index.mjs +1 -1
  31. package/lib/src/{lib-CyVd3FMn.js → lib-BE95QG9_.js} +270 -238
  32. package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +6 -5
  33. package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +6 -5
  34. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +6 -5
  35. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +6 -5
  36. package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +6 -5
  37. package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +6 -5
  38. package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +6 -5
  39. package/package.json +1 -1
  40. package/src/brand-page/components/button/ButtonStyleWrapper.vue +4 -2
  41. package/src/brand-page/components/page-header/HeaderLayout.vue +3 -3
  42. package/src/brand-page-maker/components/brandpage-settings/BrandPageSettings.test.ts +285 -0
  43. package/src/brand-page-maker/components/brandpage-settings/BrandPageSettings.vue +3 -3
  44. package/src/brand-page-maker/components/rich-text-editor/RichTextEditor.vue +2 -1
  45. package/src/brand-page-maker/components/sensitive-content/SensitiveContent.vue +23 -3
  46. package/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.ts +5 -0
  47. package/src/brand-page-maker/components/seo-settings/SeoPageSettings.vue +2 -0
  48. package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.save.test.ts +332 -1
  49. package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.ts +83 -5
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-CyVd3FMn.js";
2
+ import { _ as t } from "./lib-BE95QG9_.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-CyVd3FMn.js";
2
+ import { _ as t } from "./lib-BE95QG9_.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-CyVd3FMn.js";
2
+ import { _ as t } from "./lib-BE95QG9_.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-CyVd3FMn.js";
2
+ import { _ as t } from "./lib-BE95QG9_.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-CyVd3FMn.js";
2
+ import { _ as t } from "./lib-BE95QG9_.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-CyVd3FMn.js";
2
+ import { _ as t } from "./lib-BE95QG9_.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-CyVd3FMn.js";
2
+ import { _ as t } from "./lib-BE95QG9_.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-CyVd3FMn.js";
2
+ import { _ as e } from "./lib-BE95QG9_.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-CyVd3FMn.js";
2
+ import { _ as e } from "./lib-BE95QG9_.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-CyVd3FMn.js";
2
+ import { _ as e } from "./lib-BE95QG9_.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-CyVd3FMn.js";
2
+ import { _ as e } from "./lib-BE95QG9_.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-CyVd3FMn.js";
2
+ import { _ as e } from "./lib-BE95QG9_.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-CyVd3FMn.js";
2
+ import { _ as M } from "./lib-BE95QG9_.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-CyVd3FMn.js";
2
+ import { _ as M } from "./lib-BE95QG9_.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -552,13 +552,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
552
552
  startBrandPageSlugEditMode(): void;
553
553
  triggerLockedContentClickedEvent(contentType: string): Promise<void>;
554
554
  unpublishBrandPage(): Promise<void>;
555
- updateBrandPageSettings({ description, title }: {
556
- description: any;
557
- title: any;
555
+ updateBrandPageSettings(payload: {
556
+ description: string;
557
+ title: string;
558
558
  }): Promise<void>;
559
- updateSensitiveContent({ sensitiveContent }: {
560
- sensitiveContent: any;
559
+ updateSensitiveContent(payload: {
560
+ sensitiveContent: import("@brand-page").SensitiveContent;
561
561
  }): Promise<void>;
562
+ saveSiteBeforeFirstSettingsWrite(): Promise<boolean>;
562
563
  createBrandPageCustomDomain({ domainName }: {
563
564
  domainName: any;
564
565
  }): Promise<false | undefined>;
@@ -966,13 +966,14 @@ declare const _default: import("vue").DefineComponent<{}, {
966
966
  startBrandPageSlugEditMode(): void;
967
967
  triggerLockedContentClickedEvent(contentType: string): Promise<void>;
968
968
  unpublishBrandPage(): Promise<void>;
969
- updateBrandPageSettings({ description, title }: {
970
- description: any;
971
- title: any;
969
+ updateBrandPageSettings(payload: {
970
+ description: string;
971
+ title: string;
972
972
  }): Promise<void>;
973
- updateSensitiveContent({ sensitiveContent }: {
974
- sensitiveContent: any;
973
+ updateSensitiveContent(payload: {
974
+ sensitiveContent: import("@brand-page").SensitiveContent;
975
975
  }): Promise<void>;
976
+ saveSiteBeforeFirstSettingsWrite(): Promise<boolean>;
976
977
  createBrandPageCustomDomain({ domainName }: {
977
978
  domainName: any;
978
979
  }): Promise<false | undefined>;
@@ -338,13 +338,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
338
338
  startBrandPageSlugEditMode(): void;
339
339
  triggerLockedContentClickedEvent(contentType: string): Promise<void>;
340
340
  unpublishBrandPage(): Promise<void>;
341
- updateBrandPageSettings({ description, title }: {
342
- description: any;
343
- title: any;
341
+ updateBrandPageSettings(payload: {
342
+ description: string;
343
+ title: string;
344
344
  }): Promise<void>;
345
- updateSensitiveContent({ sensitiveContent }: {
346
- sensitiveContent: any;
345
+ updateSensitiveContent(payload: {
346
+ sensitiveContent: import("../../../brand-page").SensitiveContent;
347
347
  }): Promise<void>;
348
+ saveSiteBeforeFirstSettingsWrite(): Promise<boolean>;
348
349
  createBrandPageCustomDomain({ domainName }: {
349
350
  domainName: any;
350
351
  }): Promise<false | undefined>;
@@ -354,13 +354,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
354
354
  startBrandPageSlugEditMode(): void;
355
355
  triggerLockedContentClickedEvent(contentType: string): Promise<void>;
356
356
  unpublishBrandPage(): Promise<void>;
357
- updateBrandPageSettings({ description, title }: {
358
- description: any;
359
- title: any;
357
+ updateBrandPageSettings(payload: {
358
+ description: string;
359
+ title: string;
360
360
  }): Promise<void>;
361
- updateSensitiveContent({ sensitiveContent }: {
362
- sensitiveContent: any;
361
+ updateSensitiveContent(payload: {
362
+ sensitiveContent: import("../../../brand-page").SensitiveContent;
363
363
  }): Promise<void>;
364
+ saveSiteBeforeFirstSettingsWrite(): Promise<boolean>;
364
365
  createBrandPageCustomDomain({ domainName }: {
365
366
  domainName: any;
366
367
  }): Promise<false | undefined>;
@@ -542,6 +543,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
542
543
  descriptionError(): any;
543
544
  metaKeywordsError(): any;
544
545
  isPublishing(): any;
546
+ isSaving(): boolean;
545
547
  isUpdateButtonEnabled(): any;
546
548
  isDirty(): boolean;
547
549
  }, {
@@ -89,11 +89,16 @@ export default defineComponent({
89
89
  isPublishing() {
90
90
  return this.brandPageContainerStore.isPublishing;
91
91
  },
92
+ // Scoped to isMaker: the Manage page's save must never gate on the maker's own in-flight state.
93
+ isSaving() {
94
+ return this.isMaker && this.brandPageContainerStore.isSaving;
95
+ },
92
96
  isUpdateButtonEnabled() {
93
97
  return ((this.myPageDescription?.length ?? 0) <=
94
98
  BRANDPAGE_DESCRIPTION_CHARACTER_LIMIT &&
95
99
  (this.myPageTitle?.length ?? 0) <= BRANDPAGE_TITLE_CHARACTER_LIMIT &&
96
100
  !this.brandPageContainerStore.isPublishing &&
101
+ !this.isSaving &&
97
102
  this.isDirty &&
98
103
  this.isInternalDescriptionValid &&
99
104
  this.isInternalTitleValid);
@@ -359,13 +359,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
359
359
  startBrandPageSlugEditMode(): void;
360
360
  triggerLockedContentClickedEvent(contentType: string): Promise<void>;
361
361
  unpublishBrandPage(): Promise<void>;
362
- updateBrandPageSettings({ description, title }: {
363
- description: any;
364
- title: any;
362
+ updateBrandPageSettings(payload: {
363
+ description: string;
364
+ title: string;
365
365
  }): Promise<void>;
366
- updateSensitiveContent({ sensitiveContent }: {
367
- sensitiveContent: any;
366
+ updateSensitiveContent(payload: {
367
+ sensitiveContent: import("../../../brand-page").SensitiveContent;
368
368
  }): Promise<void>;
369
+ saveSiteBeforeFirstSettingsWrite(): Promise<boolean>;
369
370
  createBrandPageCustomDomain({ domainName }: {
370
371
  domainName: any;
371
372
  }): Promise<false | undefined>;
@@ -340,13 +340,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
340
340
  startBrandPageSlugEditMode(): void;
341
341
  triggerLockedContentClickedEvent(contentType: string): Promise<void>;
342
342
  unpublishBrandPage(): Promise<void>;
343
- updateBrandPageSettings({ description, title }: {
344
- description: any;
345
- title: any;
343
+ updateBrandPageSettings(payload: {
344
+ description: string;
345
+ title: string;
346
346
  }): Promise<void>;
347
- updateSensitiveContent({ sensitiveContent }: {
348
- sensitiveContent: any;
347
+ updateSensitiveContent(payload: {
348
+ sensitiveContent: import("../../../brand-page").SensitiveContent;
349
349
  }): Promise<void>;
350
+ saveSiteBeforeFirstSettingsWrite(): Promise<boolean>;
350
351
  createBrandPageCustomDomain({ domainName }: {
351
352
  domainName: any;
352
353
  }): Promise<false | undefined>;
@@ -408,13 +408,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
408
408
  startBrandPageSlugEditMode(): void;
409
409
  triggerLockedContentClickedEvent(contentType: string): Promise<void>;
410
410
  unpublishBrandPage(): Promise<void>;
411
- updateBrandPageSettings({ description, title }: {
412
- description: any;
413
- title: any;
411
+ updateBrandPageSettings(payload: {
412
+ description: string;
413
+ title: string;
414
414
  }): Promise<void>;
415
- updateSensitiveContent({ sensitiveContent }: {
416
- sensitiveContent: any;
415
+ updateSensitiveContent(payload: {
416
+ sensitiveContent: import("@brand-page").SensitiveContent;
417
417
  }): Promise<void>;
418
+ saveSiteBeforeFirstSettingsWrite(): Promise<boolean>;
418
419
  createBrandPageCustomDomain({ domainName }: {
419
420
  domainName: any;
420
421
  }): Promise<false | undefined>;
@@ -335,13 +335,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
335
335
  startBrandPageSlugEditMode(): void;
336
336
  triggerLockedContentClickedEvent(contentType: string): Promise<void>;
337
337
  unpublishBrandPage(): Promise<void>;
338
- updateBrandPageSettings({ description, title }: {
339
- description: any;
340
- title: any;
338
+ updateBrandPageSettings(payload: {
339
+ description: string;
340
+ title: string;
341
341
  }): Promise<void>;
342
- updateSensitiveContent({ sensitiveContent }: {
343
- sensitiveContent: any;
342
+ updateSensitiveContent(payload: {
343
+ sensitiveContent: import("../../../brand-page").SensitiveContent;
344
344
  }): Promise<void>;
345
+ saveSiteBeforeFirstSettingsWrite(): Promise<boolean>;
345
346
  createBrandPageCustomDomain({ domainName }: {
346
347
  domainName: any;
347
348
  }): Promise<false | undefined>;
@@ -1,7 +1,7 @@
1
1
  import { type getWebsiteContextualUpgradeResponse } from '../../../clients/brand-page-client';
2
2
  import { type LogoDraftAsset, type LogoTemplateAsset } from '@brand-page-maker/stores';
3
3
  import type { CustomDomainConfigModel, CustomDomainModel } from '@brand-page-maker/models';
4
- import { type AbTest } from '@brand-page';
4
+ import { type AbTest, type SensitiveContent } from '@brand-page';
5
5
  import type { WebsiteSlugCheckResponse } from '@brand-page-maker/models/api.model';
6
6
  import { WEBSITE_UPGRADE_CONTEXT_TYPES } from '@designcrowd/fe-shared-lib';
7
7
  import { type OnSearchTermChangedCallback } from '@shared/template-settings/store';
@@ -418,13 +418,14 @@ export declare const useBrandPageContainerStore: import("pinia").StoreDefinition
418
418
  startBrandPageSlugEditMode(): void;
419
419
  triggerLockedContentClickedEvent(contentType: string): Promise<void>;
420
420
  unpublishBrandPage(): Promise<void>;
421
- updateBrandPageSettings({ description, title }: {
422
- description: any;
423
- title: any;
421
+ updateBrandPageSettings(payload: {
422
+ description: string;
423
+ title: string;
424
424
  }): Promise<void>;
425
- updateSensitiveContent({ sensitiveContent }: {
426
- sensitiveContent: any;
425
+ updateSensitiveContent(payload: {
426
+ sensitiveContent: SensitiveContent;
427
427
  }): Promise<void>;
428
+ saveSiteBeforeFirstSettingsWrite(): Promise<boolean>;
428
429
  createBrandPageCustomDomain({ domainName }: {
429
430
  domainName: any;
430
431
  }): Promise<false | undefined>;
@@ -863,13 +863,17 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
863
863
  console.error(err);
864
864
  }
865
865
  },
866
- async updateBrandPageSettings({ description, title }) {
866
+ async updateBrandPageSettings(payload) {
867
+ if (!this.designDraftToken &&
868
+ !(await this.saveSiteBeforeFirstSettingsWrite())) {
869
+ return;
870
+ }
867
871
  const brandPageMakerStore = useBrandPageMakerStore();
868
872
  try {
869
873
  this.setIsPublishing({ isPublishing: true });
870
874
  const result = await brandPageClient.updateBrandPageMetaAsync(brandPageMakerStore.brandPageType, this.designDraftToken, {
871
- pageDescription: description,
872
- pageTitle: title,
875
+ pageDescription: payload.description,
876
+ pageTitle: payload.title,
873
877
  metaKeywords: [],
874
878
  });
875
879
  if (!result) {
@@ -893,12 +897,16 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
893
897
  await brandPageMakerStore.showNextNotificationMessage();
894
898
  }
895
899
  },
896
- async updateSensitiveContent({ sensitiveContent }) {
900
+ async updateSensitiveContent(payload) {
901
+ if (!this.designDraftToken &&
902
+ !(await this.saveSiteBeforeFirstSettingsWrite())) {
903
+ return;
904
+ }
897
905
  const brandPageMakerStore = useBrandPageMakerStore();
898
906
  try {
899
907
  this.setIsPublishing({ isPublishing: true });
900
908
  const result = await brandPageClient.updateSensitiveContentAsync(brandPageMakerStore.brandPageType, this.designDraftToken, {
901
- sensitiveContentType: sensitiveContent,
909
+ sensitiveContentType: payload.sensitiveContent,
902
910
  });
903
911
  if (!result) {
904
912
  await brandPageMakerStore.enqueueErrorMessage();
@@ -921,6 +929,45 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
921
929
  await brandPageMakerStore.showNextNotificationMessage();
922
930
  }
923
931
  },
932
+ // Pre-purchase drafts are saved by the host, never the maker — save-publish.md.
933
+ async saveSiteBeforeFirstSettingsWrite() {
934
+ if (this.isAdminMaker) {
935
+ return false;
936
+ }
937
+ const brandPageMakerStore = useBrandPageMakerStore();
938
+ if (this.isPrePurchase) {
939
+ window.dispatchEvent(new Event('SAVE_PROGRESS_CLICKED'));
940
+ // The host's saveDesign sets isSaving synchronously on the dispatch; if it
941
+ // didn't, no listener is wired and the click would otherwise go silent.
942
+ if (!this.isSaving) {
943
+ await brandPageMakerStore.enqueueErrorMessage();
944
+ await brandPageMakerStore.showNextNotificationMessage();
945
+ }
946
+ return false;
947
+ }
948
+ if (this.isSaving || this.isPublishing) {
949
+ await brandPageMakerStore.enqueueErrorMessage();
950
+ await brandPageMakerStore.showNextNotificationMessage();
951
+ return false;
952
+ }
953
+ this.setIsPublishing({ isPublishing: true });
954
+ // saveBrandPage enqueues its own error on a throw but not on an empty response.
955
+ const messagesBeforeSave = [
956
+ ...brandPageMakerStore.notificationMessageQueue,
957
+ ];
958
+ const result = await this.saveBrandPage({ saveOnly: true });
959
+ if (!result || !result.saved) {
960
+ const hasErrorQueued = brandPageMakerStore.notificationMessageQueue.some((message) => message.type === 'error' && !messagesBeforeSave.includes(message));
961
+ if (!hasErrorQueued) {
962
+ await brandPageMakerStore.enqueueErrorMessage();
963
+ }
964
+ this.setIsPublishing({ isPublishing: false });
965
+ await brandPageMakerStore.showNextNotificationMessage();
966
+ return false;
967
+ }
968
+ this.setTriggerSaveSuccessMessage({ triggerSaveSuccessMessage: false });
969
+ return true;
970
+ },
924
971
  async createBrandPageCustomDomain({ domainName }) {
925
972
  const brandPageMakerStore = useBrandPageMakerStore();
926
973
  const customDomainResponse = await brandPageClient.createBrandPageCustomDomainAsync(brandPageMakerStore.brandPageType, this.designDraftToken, domainName, false);