@designcrowd/library.brand-page 6.1.0 → 6.1.1-ast-preview-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 (178) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-CW5bD06L.js → CreatedOnBrandCrowd-de-de-DbkDeR-_.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-CofG4e3V.js → CreatedOnBrandCrowd-en-us-CN0o9YUM.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-XpL0-LWx.js → CreatedOnBrandCrowd-es-es-DX5GXuxd.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-dlVN3zaX.js → CreatedOnBrandCrowd-fr-ca-CA5o_w74.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-dlVN3zaX.js → CreatedOnBrandCrowd-fr-fr-CA5o_w74.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-98gqdDVF.js → CreatedOnBrandCrowd-pt-br-_1uO5jxn.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-98gqdDVF.js → CreatedOnBrandCrowd-pt-pt-_1uO5jxn.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-Dbmlc0i1.js → CreatedOnDcom-de-de-DAPvckVD.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-Dy9z7h1o.js → CreatedOnDcom-en-us-DT1NE0ly.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-B3ksvNj9.js → CreatedOnDcom-es-es-C_HyK7sW.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-CC9ieRzX.js → CreatedOnDcom-fr-ca-C6YuMchy.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-BtnGJjF2.js → CreatedOnDcom-fr-fr-roY7f_KU.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-DT4doFYO.js → CreatedOnDcom-pt-br-CTL6XIe5.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-CloXyOe6.js → CreatedOnDcom-pt-pt-Dv8Rlt1U.js} +1 -1
  15. package/lib/src/brand-page/components/contact-form/ContactForm.mixin.js +5 -3
  16. package/lib/src/brand-page/components/mailing-list/MailingList.mixin.js +6 -4
  17. package/lib/src/brand-page/components/page-footer/PageFooter.mixin.d.ts +1 -0
  18. package/lib/src/brand-page/components/page-footer/PageFooter.mixin.js +4 -1
  19. package/lib/src/brand-page/components/payment/Payment.mixin.js +4 -3
  20. package/lib/src/brand-page/components/payment/__fixtures__/request-payment.d.ts +1 -0
  21. package/lib/src/brand-page/components/payment/__fixtures__/support-me.d.ts +1 -0
  22. package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.d.ts +1 -0
  23. package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.js +4 -1
  24. package/lib/src/brand-page/composables/consent.composable.d.ts +2 -0
  25. package/lib/src/brand-page/composables/consent.composable.js +9 -3
  26. package/lib/src/brand-page/models/brand-page-context.model.d.ts +9 -0
  27. package/lib/src/brand-page/models/brand-page-context.model.js +12 -0
  28. package/lib/src/brand-page/utils/context.util.d.ts +8 -0
  29. package/lib/src/brand-page/utils/context.util.js +8 -0
  30. package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +2 -0
  31. package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.js +14 -1
  32. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +135 -1
  33. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +50 -0
  34. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +130 -0
  35. package/lib/src/brand-page-maker/components/navigation/Navigation.mixin.d.ts +1 -0
  36. package/lib/src/brand-page-maker/components/navigation/Navigation.mixin.js +3 -0
  37. package/lib/src/brand-page-maker/components/preview/Preview.mixin.d.ts +14 -0
  38. package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.d.ts +130 -0
  39. package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +130 -0
  40. package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +130 -0
  41. package/lib/src/brand-page-maker/components/seo-settings/UseExistingDomainModal.mixin.d.ts +130 -0
  42. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +130 -0
  43. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.js +51 -18
  44. package/lib/src/brand-page-maker/components/upgrade-to-premium-button/UpgradeToPremiumButton.mixin.d.ts +130 -0
  45. package/lib/src/brand-page-maker/composables/useEventTracker.d.ts +1 -0
  46. package/lib/src/brand-page-maker/composables/useEventTracker.js +1 -0
  47. package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +132 -0
  48. package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.js +30 -6
  49. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +9 -3
  50. package/lib/src/brand-page-maker/stores/ui/ui-store.d.ts +1 -1
  51. package/lib/src/bundled-translations-D42tE0D2.js +179 -0
  52. package/lib/src/bundled-translations.de-DE-D9aWGgFt.js +179 -0
  53. package/lib/src/bundled-translations.es-ES-lk4B0xQ7.js +179 -0
  54. package/lib/src/bundled-translations.fr-CA-DhOBNt6q.js +179 -0
  55. package/lib/src/bundled-translations.fr-FR-CnpafQeG.js +179 -0
  56. package/lib/src/bundled-translations.pt-BR-C4PnKrd9.js +179 -0
  57. package/lib/src/bundled-translations.pt-PT-CfKDVQC-.js +179 -0
  58. package/lib/src/bundles/bundled-translations.de-DE.json +5 -0
  59. package/lib/src/bundles/bundled-translations.es-ES.json +5 -0
  60. package/lib/src/bundles/bundled-translations.fr-CA.json +5 -0
  61. package/lib/src/bundles/bundled-translations.fr-FR.json +5 -0
  62. package/lib/src/bundles/bundled-translations.json +5 -0
  63. package/lib/src/bundles/bundled-translations.pt-BR.json +5 -0
  64. package/lib/src/bundles/bundled-translations.pt-PT.json +5 -0
  65. package/lib/src/clients/brand-page-client.d.ts +1 -0
  66. package/lib/src/clients/models.d.ts +2 -0
  67. package/lib/src/composables/useTranslate.d.ts +2 -1
  68. package/lib/src/composables/useTranslate.js +2 -1
  69. package/lib/src/constants/brand-page-maker.d.ts +2 -0
  70. package/lib/src/constants/brand-page-maker.js +5 -0
  71. package/lib/src/constants/live-preview.constants.d.ts +9 -0
  72. package/lib/src/constants/live-preview.constants.js +8 -0
  73. package/lib/src/css/library.brand-page-brandCrowd.min.css +339 -206
  74. package/lib/src/css/library.brand-page-brandPage.min.css +343 -206
  75. package/lib/src/css/library.brand-page-designCom.min.css +339 -206
  76. package/lib/src/css/library.brand-page-preview.min.css +339 -206
  77. package/lib/src/index.d.ts +3 -1
  78. package/lib/src/index.mjs +222 -217
  79. package/lib/src/{lib-D7ubPlpu.js → lib-BgSRyyCN.js} +23834 -23426
  80. package/lib/src/lib.js +3 -1
  81. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +1 -1
  82. package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +130 -0
  83. package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.d.ts +1 -1
  84. package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +130 -0
  85. package/lib/src/shared/logo-versions/LogoVersions.mixin.d.ts +1 -1
  86. package/lib/src/shared/my-designs/MyDesigns.mixin.d.ts +1 -1
  87. package/lib/src/shared/my-uploads/MyMedia.mixin.d.ts +1 -1
  88. package/lib/src/shared/my-uploads/MyUploads.mixin.d.ts +1 -1
  89. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +131 -1
  90. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +131 -1
  91. package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +144 -0
  92. package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +130 -0
  93. package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +131 -1
  94. package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.d.ts +1 -1
  95. package/lib/src/shared/template-settings/store/template-settings-store.d.ts +2 -0
  96. package/lib/src/shared/template-settings/store/template-settings-store.js +72 -24
  97. package/lib/src/shared/unsplash-library/UnsplashLibrary.mixin.d.ts +1 -1
  98. package/lib/src/tracker.mjs +1 -1
  99. package/lib/src/{useEventTracker-DmQ6AkNn.js → useEventTracker-Dmc2jFdN.js} +5 -4
  100. package/package.json +1 -1
  101. package/src/brand-page/components/contact-form/ContactForm.mixin.ts +7 -2
  102. package/src/brand-page/components/cookie-consent/CookieConsent.vue +1 -0
  103. package/src/brand-page/components/image-gallery/masonry/MasonryGallery.vue +1 -0
  104. package/src/brand-page/components/images-section/ImagesSection.vue +10 -0
  105. package/src/brand-page/components/mailing-list/MailingList.mixin.ts +8 -3
  106. package/src/brand-page/components/media/Video.vue +4 -0
  107. package/src/brand-page/components/navigation/navigation-carousel/NavigationCarousel.vue +5 -1
  108. package/src/brand-page/components/page-footer/PageFooter.mixin.ts +4 -1
  109. package/src/brand-page/components/page-footer/PageFooter.vue +1 -1
  110. package/src/brand-page/components/payment/Payment.mixin.ts +4 -3
  111. package/src/brand-page/components/payment/Payment.vue +3 -0
  112. package/src/brand-page/components/payment/request-payment/RequestPayment.mixin.ts +8 -1
  113. package/src/brand-page/components/payment/request-payment/RequestPayment.vue +2 -1
  114. package/src/brand-page/components/payment/support-me/SupportMe.vue +3 -0
  115. package/src/brand-page/components/save-contact/SaveContactWidget.vue +2 -1
  116. package/src/brand-page/components/shop/Shop.vue +11 -3
  117. package/src/brand-page/components/social-links/SocialLinks.vue +5 -2
  118. package/src/brand-page/components/testimonial-section/TestimonialSection.vue +460 -460
  119. package/src/brand-page/components/video/Video.vue +3 -0
  120. package/src/brand-page/composables/consent.composable.ts +18 -4
  121. package/src/brand-page/models/brand-page-context.model.ts +30 -0
  122. package/src/brand-page/utils/context.util.test.ts +43 -0
  123. package/src/brand-page/utils/context.util.ts +10 -0
  124. package/src/brand-page-maker/components/action-bar/ActionBar.mixin.ts +15 -0
  125. package/src/brand-page-maker/components/action-bar/ActionBarNavigation.test.ts +72 -0
  126. package/src/brand-page-maker/components/action-bar/ActionBarNavigation.vue +19 -4
  127. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +57 -0
  128. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.preview-gate.test.ts +48 -0
  129. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.vue +26 -1
  130. package/src/brand-page-maker/components/navigation/Navigation.mixin.ts +3 -0
  131. package/src/brand-page-maker/components/navigation/Navigation.vue +1 -0
  132. package/src/brand-page-maker/components/preview-modal/PreviewModal.test.ts +123 -0
  133. package/src/brand-page-maker/components/preview-modal/PreviewModal.vue +307 -0
  134. package/src/brand-page-maker/components/preview-modal/PreviewModalWithState.test.ts +226 -0
  135. package/src/brand-page-maker/components/preview-modal/PreviewModalWithState.vue +149 -0
  136. package/src/brand-page-maker/components/preview-modal/i18n/preview-modal.de-DE.json +6 -0
  137. package/src/brand-page-maker/components/preview-modal/i18n/preview-modal.es-ES.json +6 -0
  138. package/src/brand-page-maker/components/preview-modal/i18n/preview-modal.fr-CA.json +6 -0
  139. package/src/brand-page-maker/components/preview-modal/i18n/preview-modal.fr-FR.json +6 -0
  140. package/src/brand-page-maker/components/preview-modal/i18n/preview-modal.json +6 -0
  141. package/src/brand-page-maker/components/preview-modal/i18n/preview-modal.pt-BR.json +6 -0
  142. package/src/brand-page-maker/components/preview-modal/i18n/preview-modal.pt-PT.json +6 -0
  143. package/src/brand-page-maker/components/rich-text-editor/RichTextEditor.vue +29 -17
  144. package/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.test.ts +135 -0
  145. package/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.ts +62 -21
  146. package/src/brand-page-maker/composables/useEventTracker.ts +1 -0
  147. package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.save.test.ts +106 -0
  148. package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.ts +49 -8
  149. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +11 -3
  150. package/src/brand-page-maker/stores/ui/ui-store.ts +1 -1
  151. package/src/bundles/bundled-translations.de-DE.json +5 -0
  152. package/src/bundles/bundled-translations.es-ES.json +5 -0
  153. package/src/bundles/bundled-translations.fr-CA.json +5 -0
  154. package/src/bundles/bundled-translations.fr-FR.json +5 -0
  155. package/src/bundles/bundled-translations.json +5 -0
  156. package/src/bundles/bundled-translations.pt-BR.json +5 -0
  157. package/src/bundles/bundled-translations.pt-PT.json +5 -0
  158. package/src/clients/brand-page-client.ts +2 -0
  159. package/src/clients/models.ts +3 -0
  160. package/src/composables/useTranslate.ts +2 -0
  161. package/src/constants/brand-page-maker.ts +5 -0
  162. package/src/constants/live-preview.constants.ts +11 -0
  163. package/src/lib.ts +9 -1
  164. package/src/shared/common/i18n/common.de-DE.json +1 -0
  165. package/src/shared/common/i18n/common.es-ES.json +1 -0
  166. package/src/shared/common/i18n/common.fr-CA.json +1 -0
  167. package/src/shared/common/i18n/common.fr-FR.json +1 -0
  168. package/src/shared/common/i18n/common.json +1 -0
  169. package/src/shared/common/i18n/common.pt-BR.json +1 -0
  170. package/src/shared/common/i18n/common.pt-PT.json +1 -0
  171. package/src/shared/template-settings/store/template-settings-store.ts +93 -27
  172. package/lib/src/bundled-translations-2HkRBbBD.js +0 -177
  173. package/lib/src/bundled-translations.de-DE-CL9ZEhU2.js +0 -177
  174. package/lib/src/bundled-translations.es-ES-uj7Sliu0.js +0 -177
  175. package/lib/src/bundled-translations.fr-CA-BMnBtr_w.js +0 -177
  176. package/lib/src/bundled-translations.fr-FR-9PEZedzq.js +0 -177
  177. package/lib/src/bundled-translations.pt-BR-B3oNDkoe.js +0 -177
  178. package/lib/src/bundled-translations.pt-PT-DM7Vsf-h.js +0 -177
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-D7ubPlpu.js";
2
+ import { _ as t } from "./lib-BgSRyyCN.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-D7ubPlpu.js";
2
+ import { _ as t } from "./lib-BgSRyyCN.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-D7ubPlpu.js";
2
+ import { _ as t } from "./lib-BgSRyyCN.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-D7ubPlpu.js";
2
+ import { _ as t } from "./lib-BgSRyyCN.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-D7ubPlpu.js";
2
+ import { _ as t } from "./lib-BgSRyyCN.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-D7ubPlpu.js";
2
+ import { _ as t } from "./lib-BgSRyyCN.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-D7ubPlpu.js";
2
+ import { _ as t } from "./lib-BgSRyyCN.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-D7ubPlpu.js";
2
+ import { _ as e } from "./lib-BgSRyyCN.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-D7ubPlpu.js";
2
+ import { _ as e } from "./lib-BgSRyyCN.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-D7ubPlpu.js";
2
+ import { _ as e } from "./lib-BgSRyyCN.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-D7ubPlpu.js";
2
+ import { _ as e } from "./lib-BgSRyyCN.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-D7ubPlpu.js";
2
+ import { _ as e } from "./lib-BgSRyyCN.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-D7ubPlpu.js";
2
+ import { _ as M } from "./lib-BgSRyyCN.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-D7ubPlpu.js";
2
+ import { _ as M } from "./lib-BgSRyyCN.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -1,6 +1,6 @@
1
1
  import { defineComponent } from 'vue';
2
2
  import { FORM_FIELD_TYPES } from '@brand-page/models';
3
- import { getEmailValidationError, getMessageValidationError, getNameValidationError, getPhoneValidationError, } from '@brand-page/utils';
3
+ import { getEmailValidationError, getMessageValidationError, getNameValidationError, getPhoneValidationError, isPreviewMode, } from '@brand-page/utils';
4
4
  import { isDecorativeButtonStyle } from '../../utils/button.util';
5
5
  import brandPageClient from '../../clients/brand-page.client';
6
6
  import { isEmail } from '../../../utils/validator.util';
@@ -193,7 +193,9 @@ export default defineComponent({
193
193
  }));
194
194
  },
195
195
  mounted() {
196
- if (this.context?.recaptchaSiteKey && !this.isPreview && this.recaptcha) {
196
+ if (this.context?.recaptchaSiteKey &&
197
+ !isPreviewMode(this.context) &&
198
+ this.recaptcha) {
197
199
  this.recaptcha.initialise({ siteKey: this.context.recaptchaSiteKey });
198
200
  }
199
201
  },
@@ -203,7 +205,7 @@ export default defineComponent({
203
205
  if (this.hasFormError) {
204
206
  return;
205
207
  }
206
- if (this.isPreview || !this.context.brandPageToken) {
208
+ if (isPreviewMode(this.context) || !this.context.brandPageToken) {
207
209
  if (process.env.NODE_ENV !== 'production' &&
208
210
  !this.context.brandPageSlug) {
209
211
  console.error('brandPageToken is not defined');
@@ -1,6 +1,6 @@
1
1
  import { defineComponent } from 'vue';
2
2
  import brandPageClient from '../../clients/brand-page.client';
3
- import { getEmailValidationError, contentPaddingStyle as toContentPaddingStyle, mutedTextForBackground, backgroundColorFromStyle, } from '@brand-page/utils';
3
+ import { getEmailValidationError, contentPaddingStyle as toContentPaddingStyle, isPreviewMode, mutedTextForBackground, backgroundColorFromStyle, } from '@brand-page/utils';
4
4
  import { contentSettingsTr, mailingListTr, } from '@src/composables/useTranslate';
5
5
  import { useReCaptcha } from '../../composables/recaptcha.composable';
6
6
  import { RECAPTCHA_ACTION_MAILING_LIST } from '../../constants';
@@ -46,7 +46,9 @@ export default defineComponent({
46
46
  },
47
47
  mounted() {
48
48
  this.show = true;
49
- if (this.context?.recaptchaSiteKey && !this.isPreview && this.recaptcha) {
49
+ if (this.context?.recaptchaSiteKey &&
50
+ !isPreviewMode(this.context) &&
51
+ this.recaptcha) {
50
52
  this.recaptcha.initialise({ siteKey: this.context.recaptchaSiteKey });
51
53
  }
52
54
  },
@@ -103,7 +105,7 @@ export default defineComponent({
103
105
  },
104
106
  isFormDisabled() {
105
107
  return (this.hasFormError ||
106
- this.isPreview ||
108
+ isPreviewMode(this.context) ||
107
109
  !this.brandPageToken ||
108
110
  this.isSubmitting);
109
111
  },
@@ -125,7 +127,7 @@ export default defineComponent({
125
127
  if (this.hasFormError) {
126
128
  return;
127
129
  }
128
- if (this.isPreview || !this.brandPageToken) {
130
+ if (isPreviewMode(this.context) || !this.brandPageToken) {
129
131
  return;
130
132
  }
131
133
  this.isSubmitting = true;
@@ -20,6 +20,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
20
20
  default: boolean;
21
21
  };
22
22
  }>, {}, {}, {
23
+ isInPreviewMode(): boolean;
23
24
  containerStyle(): BrandPageCssStyle;
24
25
  socialLinksIconStyle(): BrandPageCssStyle;
25
26
  isDisplayStyleCentered(): boolean;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent } from 'vue';
2
- import { getRenderText } from '@brand-page/utils';
2
+ import { getRenderText, isPreviewMode } from '@brand-page/utils';
3
3
  import { FOOTER_DISPLAY } from '../../constants';
4
4
  export default defineComponent({
5
5
  props: {
@@ -23,6 +23,9 @@ export default defineComponent({
23
23
  },
24
24
  emits: ['on-logo-click', 'footer-container-click'],
25
25
  computed: {
26
+ isInPreviewMode() {
27
+ return isPreviewMode(this.context);
28
+ },
26
29
  containerStyle() {
27
30
  return this.viewModel.backgroundStyle;
28
31
  },
@@ -2,6 +2,7 @@ import { defineComponent } from 'vue';
2
2
  import brandPageClient from '../../clients/brand-page.client';
3
3
  import { DISPLAY_STYLE_COLLAPSED, DISPLAY_STYLE_PREVIEW, paymentProviders, } from '../../constants';
4
4
  import raygunUtil from '@brand-page/utils/raygun.util';
5
+ import { isPreviewMode } from '@brand-page/utils';
5
6
  import { paymentTr } from '@src/composables/useTranslate';
6
7
  const DEFAULT_PAYMENT_SUCCESS_MESSAGE = paymentTr(`defaultPaymentSuccessMessage`);
7
8
  const PAYMENT_CONFIG_ACTIVE = 'Active';
@@ -60,10 +61,10 @@ export default defineComponent({
60
61
  }
61
62
  },
62
63
  canMakePayment() {
63
- return !this.context.isPreview && this.isPaymentConfigActive;
64
+ return !isPreviewMode(this.context) && this.isPaymentConfigActive;
64
65
  },
65
66
  showPaymentBlock() {
66
- return this.context.isPreview || this.isPaymentConfigActive;
67
+ return isPreviewMode(this.context) || this.isPaymentConfigActive;
67
68
  },
68
69
  paymentOptions() {
69
70
  return this.paymentConfig.paymentOptions;
@@ -147,7 +148,7 @@ export default defineComponent({
147
148
  this.state = paymentConfigId
148
149
  ? paymentState.PaymentOptionSelection
149
150
  : paymentState.IncompleteConfig;
150
- if (this.context.isPreview || !paymentConfigId) {
151
+ if (isPreviewMode(this.context) || !paymentConfigId) {
151
152
  return;
152
153
  }
153
154
  try {
@@ -3,6 +3,7 @@ export declare const context: {
3
3
  stripePublishableKey: string;
4
4
  isTemplate: boolean;
5
5
  isPreview: boolean;
6
+ isLivePreview?: boolean;
6
7
  isMobile?: boolean;
7
8
  isDesignCom: boolean;
8
9
  isProduction: boolean;
@@ -3,6 +3,7 @@ export declare const context: {
3
3
  stripePublishableKey: string;
4
4
  isTemplate: boolean;
5
5
  isPreview: boolean;
6
+ isLivePreview?: boolean;
6
7
  isMobile?: boolean;
7
8
  isDesignCom: boolean;
8
9
  isProduction: boolean;
@@ -21,6 +21,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
21
21
  selectedPaymentOptionIds: string[];
22
22
  imageType: string;
23
23
  }, {
24
+ isInPreviewMode(): boolean;
24
25
  contentPaddingStyle(): {
25
26
  paddingTop: string;
26
27
  paddingBottom: string;
@@ -2,7 +2,7 @@ import { defineComponent } from 'vue';
2
2
  import { PAYMENT_OPTION_DISPLAY_TYPES, PAYMENT_OPTION_IMAGE_TYPES, } from '../../../models';
3
3
  import { DEFAULT_CURRENCY_SYMBOL } from '../../../constants';
4
4
  import { addOpacityToHex } from '../../../utils/color.util';
5
- import { contentPaddingStyle as toContentPaddingStyle } from '../../../utils';
5
+ import { contentPaddingStyle as toContentPaddingStyle, isPreviewMode, } from '../../../utils';
6
6
  import { RGBAtoHex } from '@utils/helpers';
7
7
  const MAX_CUSTOM_REQUEST_CHARS = 500;
8
8
  export default defineComponent({
@@ -29,6 +29,9 @@ export default defineComponent({
29
29
  };
30
30
  },
31
31
  computed: {
32
+ isInPreviewMode() {
33
+ return isPreviewMode(this.context);
34
+ },
32
35
  contentPaddingStyle() {
33
36
  return toContentPaddingStyle(this.viewModel);
34
37
  },
@@ -4,8 +4,10 @@ export declare const useConsent: () => {
4
4
  updateConsent: import("vue").Ref<(c: ConsentType) => void, (c: ConsentType) => void>;
5
5
  featureEnabled: import("vue").Ref<boolean, boolean>;
6
6
  showConsentModal: import("vue").Ref<boolean, boolean>;
7
+ persist: import("vue").Ref<boolean, boolean>;
7
8
  initialise: (options: {
8
9
  featureEnabled: boolean;
10
+ persist?: boolean;
9
11
  }) => ConsentType;
10
12
  grant: (cb?: () => unknown) => void;
11
13
  deny: (cb?: () => unknown) => void;
@@ -28,6 +28,7 @@ const store = reactive({
28
28
  consent: undefined,
29
29
  featureEnabled: false,
30
30
  showConsentModal: false,
31
+ persist: true,
31
32
  updateConsent(c) {
32
33
  this.consent = c;
33
34
  },
@@ -38,7 +39,8 @@ export const useConsent = () => {
38
39
  return undefined;
39
40
  }
40
41
  store.featureEnabled = options.featureEnabled;
41
- store.consent = getStoredConsent();
42
+ store.persist = options.persist ?? true;
43
+ store.consent = store.persist ? getStoredConsent() : undefined;
42
44
  store.showConsentModal =
43
45
  options.featureEnabled && !accepted.value && !declined.value;
44
46
  return store.consent;
@@ -46,13 +48,17 @@ export const useConsent = () => {
46
48
  const accepted = computed(() => Boolean(store.consent && store.consent === 'granted'));
47
49
  const declined = computed(() => Boolean(store.consent && store.consent === 'denied'));
48
50
  const grant = (cb) => {
49
- storeConsent('granted');
51
+ if (store.persist) {
52
+ storeConsent('granted');
53
+ }
50
54
  store.updateConsent('granted');
51
55
  store.showConsentModal = store.featureEnabled && !accepted.value;
52
56
  cb && cb();
53
57
  };
54
58
  const deny = (cb) => {
55
- storeConsent('denied');
59
+ if (store.persist) {
60
+ storeConsent('denied');
61
+ }
56
62
  store.updateConsent('denied');
57
63
  store.showConsentModal = false;
58
64
  cb && cb();
@@ -37,6 +37,8 @@ export interface AbTestResult {
37
37
  export interface AbTest {
38
38
  bp_3926_freemium_watermark?: AbTestResult;
39
39
  bp_5245_ai_website_assistant?: AbTestResult;
40
+ bp_5873_live_preview_prepurchase?: AbTestResult;
41
+ bp_5873_live_preview_postpurchase?: AbTestResult;
40
42
  }
41
43
  export declare const MEDIA_SIZES: {
42
44
  readonly size1x: "size1x";
@@ -47,6 +49,13 @@ export type MediaSizes = keyof typeof MEDIA_SIZES;
47
49
  export interface BrandPageContext {
48
50
  isTemplate: boolean;
49
51
  isPreview: boolean;
52
+ /**
53
+ * Rendered as a customer-facing live preview (safe/inert actions, no
54
+ * watermark, ephemeral consent). Distinct from the editor `isPreview`, which
55
+ * also drives editor/thumbnail-only behaviour. Use `isPreviewMode()` to gate
56
+ * inert-action behaviour that applies to both.
57
+ */
58
+ isLivePreview?: boolean;
50
59
  /** @deprecated should be used on maker only */
51
60
  isMobile?: boolean;
52
61
  isDesignCom: boolean;
@@ -25,6 +25,11 @@ export const AB_TEST_FLAG = {
25
25
  const AB_TEST_KEYS = {
26
26
  BP_3926_FREEMIUM_WATERMARK: 'bc-bp-3926-freemium-cta-in-website-editor',
27
27
  BP_5245_AI_WEBSITE_ASSISTANT: 'bc-bp-5245-ai-website-assistant-postpurchase',
28
+ // Two separate live-preview experiments — bc-net sends only the one for the
29
+ // current purchase state, and a user's value on each side is independent
30
+ // (BP-5873). Keys must match `CampaignNames.LivePreview*Test` in bc-net.
31
+ BP_5873_LIVE_PREVIEW_PREPURCHASE: 'bc-bp-5873-live-preview-prepurchase',
32
+ BP_5873_LIVE_PREVIEW_POSTPURCHASE: 'bc-bp-5873-live-preview-postpurchase',
28
33
  };
29
34
  export const MEDIA_SIZES = {
30
35
  size1x: 'size1x',
@@ -50,5 +55,12 @@ export const getAbTestResults = (abtestKeyValues) => {
50
55
  if (abtestKeyValues[AB_TEST_KEYS.BP_5245_AI_WEBSITE_ASSISTANT]) {
51
56
  abTests.bp_5245_ai_website_assistant = getValueType(AB_TEST_KEYS.BP_5245_AI_WEBSITE_ASSISTANT, abtestKeyValues[AB_TEST_KEYS.BP_5245_AI_WEBSITE_ASSISTANT]);
52
57
  }
58
+ // AB Test for BP-5873 - Live preview (pre- and post-purchase run separately)
59
+ if (abtestKeyValues[AB_TEST_KEYS.BP_5873_LIVE_PREVIEW_PREPURCHASE]) {
60
+ abTests.bp_5873_live_preview_prepurchase = getValueType(AB_TEST_KEYS.BP_5873_LIVE_PREVIEW_PREPURCHASE, abtestKeyValues[AB_TEST_KEYS.BP_5873_LIVE_PREVIEW_PREPURCHASE]);
61
+ }
62
+ if (abtestKeyValues[AB_TEST_KEYS.BP_5873_LIVE_PREVIEW_POSTPURCHASE]) {
63
+ abTests.bp_5873_live_preview_postpurchase = getValueType(AB_TEST_KEYS.BP_5873_LIVE_PREVIEW_POSTPURCHASE, abtestKeyValues[AB_TEST_KEYS.BP_5873_LIVE_PREVIEW_POSTPURCHASE]);
64
+ }
53
65
  return abTests;
54
66
  };
@@ -1,2 +1,10 @@
1
1
  import type { BrandPageContext } from '../models';
2
2
  export declare const getSlugFromContext: (context: BrandPageContext) => string;
3
+ /**
4
+ * True when interactive actions must be inert and payment/shop blocks always
5
+ * shown — i.e. the render is a preview, not a live site. Covers both the
6
+ * editor preview (`isPreview`) and the customer live-preview
7
+ * (`isLivePreview`). Editor-only artifacts (cursor, nav interception,
8
+ * placeholders) must keep reading `context.isPreview` directly.
9
+ */
10
+ export declare const isPreviewMode: (context: BrandPageContext) => boolean;
@@ -4,3 +4,11 @@ export const getSlugFromContext = (context) => {
4
4
  }
5
5
  return context.brandPageSlug;
6
6
  };
7
+ /**
8
+ * True when interactive actions must be inert and payment/shop blocks always
9
+ * shown — i.e. the render is a preview, not a live site. Covers both the
10
+ * editor preview (`isPreview`) and the customer live-preview
11
+ * (`isLivePreview`). Editor-only artifacts (cursor, nav interception,
12
+ * placeholders) must keep reading `context.isPreview` directly.
13
+ */
14
+ export const isPreviewMode = (context) => !!(context.isPreview || context.isLivePreview);
@@ -1,5 +1,6 @@
1
1
  declare const _default: import("vue").DefineComponent<{}, {
2
2
  isAdmin: import("vue").ComputedRef<boolean>;
3
+ isLivePreviewEnabled: import("vue").ComputedRef<boolean>;
3
4
  isSaving: import("vue").ComputedRef<boolean>;
4
5
  isPublished: import("vue").ComputedRef<boolean>;
5
6
  isPublishButtonEnabled: import("vue").ComputedRef<boolean>;
@@ -159,6 +160,7 @@ declare const _default: import("vue").DefineComponent<{}, {
159
160
  }>;
160
161
  }, {}, {}, {
161
162
  saveBrandPage(): void;
163
+ previewBrandPage(): void;
162
164
  saveAndPublishBrandPage(isActionBar: boolean): void;
163
165
  createTeamCards(isTopNav: boolean): void;
164
166
  }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "create-team-cards"[], "create-team-cards", import("vue").PublicProps, Readonly<{}> & Readonly<{
@@ -1,5 +1,5 @@
1
1
  import { EVENTS } from '../../../constants/brand-page-maker';
2
- import { useBrandPageMakerUserStore, useBrandPageMakerStore, } from '@brand-page-maker/stores';
2
+ import { useBrandPageMakerUserStore, useBrandPageMakerStore, useBrandPageContainerStore, } from '@brand-page-maker/stores';
3
3
  import { computed, defineComponent } from 'vue';
4
4
  import { UPGRADE_CTA_LOCATIONS } from './../../composables/useEventTracker';
5
5
  import { BRAND_PAGE_TYPES } from '@brand-page/models';
@@ -8,8 +8,18 @@ export default defineComponent({
8
8
  setup() {
9
9
  const userStore = useBrandPageMakerUserStore();
10
10
  const brandPageMakerStore = useBrandPageMakerStore();
11
+ const containerStore = useBrandPageContainerStore();
11
12
  return {
12
13
  isAdmin: computed(() => userStore.isAdmin),
14
+ // BP-5873: the Preview button is behind an AB test, and pre/post purchase are
15
+ // two separate experiments. Pick the one for the current purchase state — a
16
+ // user's value on the other side is independent and must not leak across.
17
+ isLivePreviewEnabled: computed(() => {
18
+ const experiment = containerStore.isPrePurchase
19
+ ? containerStore.abTests.bp_5873_live_preview_prepurchase
20
+ : containerStore.abTests.bp_5873_live_preview_postpurchase;
21
+ return !!experiment?.isVariation;
22
+ }),
13
23
  isSaving: computed(() => brandPageMakerStore.isSaving),
14
24
  isPublished: computed(() => brandPageMakerStore.isPublished),
15
25
  isPublishButtonEnabled: computed(() => brandPageMakerStore.isPublishButtonEnabled),
@@ -22,6 +32,9 @@ export default defineComponent({
22
32
  saveBrandPage() {
23
33
  this.$emit(EVENTS.Save);
24
34
  },
35
+ previewBrandPage() {
36
+ this.$emit(EVENTS.Preview);
37
+ },
25
38
  saveAndPublishBrandPage(isActionBar) {
26
39
  if (!this.isPublishButtonEnabled) {
27
40
  return;