@designcrowd/library.brand-page 6.1.2 → 6.1.3-ast-preview-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.
- package/lib/src/{CreatedOnBrandCrowd-de-de-CU9qFyWP.js → CreatedOnBrandCrowd-de-de-LAQWIjFQ.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-Yjpb7jdP.js → CreatedOnBrandCrowd-en-us-BLlybO-4.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-D2WZ8nVO.js → CreatedOnBrandCrowd-es-es-YDYQpCYc.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-i3ikf-KU.js → CreatedOnBrandCrowd-fr-ca-CIPj4sXQ.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-i3ikf-KU.js → CreatedOnBrandCrowd-fr-fr-CIPj4sXQ.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-pjIejWpt.js → CreatedOnBrandCrowd-pt-br-CwnM-eiJ.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-pjIejWpt.js → CreatedOnBrandCrowd-pt-pt-CwnM-eiJ.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-DpKoYjkj.js → CreatedOnDcom-de-de-CUNm6nv8.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-CTGKfegI.js → CreatedOnDcom-en-us-DfnAE5UJ.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-BjeZz5zs.js → CreatedOnDcom-es-es-DBjpJLDG.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-CrtEoLCA.js → CreatedOnDcom-fr-ca-s1hWKboZ.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-QFHt16jZ.js → CreatedOnDcom-fr-fr-C-JFVNVD.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-D2dgmjtV.js → CreatedOnDcom-pt-br-E1ibQjWA.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-ZSCFPLEN.js → CreatedOnDcom-pt-pt-DGmy_GoR.js} +1 -1
- package/lib/src/brand-page/models/brand-page-context.model.d.ts +2 -0
- package/lib/src/brand-page/models/brand-page-context.model.js +12 -0
- package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +2 -0
- package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.js +14 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +134 -0
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +50 -0
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +130 -0
- package/lib/src/brand-page-maker/components/navigation/Navigation.mixin.d.ts +1 -0
- package/lib/src/brand-page-maker/components/navigation/Navigation.mixin.js +3 -0
- package/lib/src/brand-page-maker/components/preview/Preview.mixin.d.ts +14 -0
- package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.d.ts +130 -0
- package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +130 -0
- package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +130 -0
- package/lib/src/brand-page-maker/components/seo-settings/UseExistingDomainModal.mixin.d.ts +130 -0
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +130 -0
- package/lib/src/brand-page-maker/components/upgrade-to-premium-button/UpgradeToPremiumButton.mixin.d.ts +130 -0
- package/lib/src/brand-page-maker/composables/useEventTracker.d.ts +1 -0
- package/lib/src/brand-page-maker/composables/useEventTracker.js +1 -0
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +132 -0
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.js +22 -6
- package/lib/src/bundled-translations-D42tE0D2.js +179 -0
- package/lib/src/bundled-translations.de-DE-D9aWGgFt.js +179 -0
- package/lib/src/bundled-translations.es-ES-lk4B0xQ7.js +179 -0
- package/lib/src/bundled-translations.fr-CA-DhOBNt6q.js +179 -0
- package/lib/src/bundled-translations.fr-FR-CnpafQeG.js +179 -0
- package/lib/src/bundled-translations.pt-BR-C4PnKrd9.js +179 -0
- package/lib/src/bundled-translations.pt-PT-CfKDVQC-.js +179 -0
- package/lib/src/bundles/bundled-translations.de-DE.json +5 -0
- package/lib/src/bundles/bundled-translations.es-ES.json +5 -0
- package/lib/src/bundles/bundled-translations.fr-CA.json +5 -0
- package/lib/src/bundles/bundled-translations.fr-FR.json +5 -0
- package/lib/src/bundles/bundled-translations.json +5 -0
- package/lib/src/bundles/bundled-translations.pt-BR.json +5 -0
- package/lib/src/bundles/bundled-translations.pt-PT.json +5 -0
- package/lib/src/clients/brand-page-client.d.ts +1 -0
- package/lib/src/composables/useSnapshot.js +48 -9
- package/lib/src/composables/useTranslate.d.ts +2 -1
- package/lib/src/composables/useTranslate.js +2 -1
- package/lib/src/constants/brand-page-maker.d.ts +2 -0
- package/lib/src/constants/brand-page-maker.js +5 -0
- package/lib/src/constants/live-preview.constants.d.ts +15 -0
- package/lib/src/constants/live-preview.constants.js +15 -0
- package/lib/src/css/library.brand-page-brandCrowd.min.css +237 -94
- package/lib/src/css/library.brand-page-brandPage.min.css +241 -94
- package/lib/src/css/library.brand-page-designCom.min.css +237 -94
- package/lib/src/css/library.brand-page-preview.min.css +237 -94
- package/lib/src/index.d.ts +2 -1
- package/lib/src/index.mjs +152 -150
- package/lib/src/{lib-CkR-Ncgf.js → lib-BzPRW7vk.js} +22396 -21997
- package/lib/src/lib.js +2 -1
- package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +130 -0
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +130 -0
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +130 -0
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +130 -0
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +144 -0
- package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +130 -0
- package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +130 -0
- package/lib/src/tracker.mjs +1 -1
- package/lib/src/{useEventTracker-DmQ6AkNn.js → useEventTracker-Dmc2jFdN.js} +5 -4
- package/package.json +1 -1
- package/src/brand-page/components/image-gallery/masonry/MasonryGallery.vue +1 -0
- package/src/brand-page/components/images-section/ImagesSection.vue +10 -0
- package/src/brand-page/components/media/Video.vue +4 -0
- package/src/brand-page/components/payment/Payment.vue +3 -0
- package/src/brand-page/components/payment/request-payment/RequestPayment.vue +1 -0
- package/src/brand-page/components/payment/support-me/SupportMe.vue +3 -0
- package/src/brand-page/components/shop/Shop.vue +5 -0
- package/src/brand-page/components/testimonial-section/TestimonialSection.vue +2 -2
- package/src/brand-page/components/video/Video.vue +3 -0
- package/src/brand-page/models/brand-page-context.model.ts +23 -0
- package/src/brand-page-maker/components/action-bar/ActionBar.mixin.ts +15 -0
- package/src/brand-page-maker/components/action-bar/ActionBarNavigation.test.ts +72 -0
- package/src/brand-page-maker/components/action-bar/ActionBarNavigation.vue +19 -4
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +57 -0
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.preview-gate.test.ts +48 -0
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.vue +26 -1
- package/src/brand-page-maker/components/navigation/Navigation.mixin.ts +3 -0
- package/src/brand-page-maker/components/navigation/Navigation.vue +1 -0
- package/src/brand-page-maker/components/preview-modal/PreviewModal.test.ts +162 -0
- package/src/brand-page-maker/components/preview-modal/PreviewModal.vue +347 -0
- package/src/brand-page-maker/components/preview-modal/PreviewModalWithState.test.ts +226 -0
- package/src/brand-page-maker/components/preview-modal/PreviewModalWithState.vue +149 -0
- package/src/brand-page-maker/components/preview-modal/i18n/preview-modal.de-DE.json +6 -0
- package/src/brand-page-maker/components/preview-modal/i18n/preview-modal.es-ES.json +6 -0
- package/src/brand-page-maker/components/preview-modal/i18n/preview-modal.fr-CA.json +6 -0
- package/src/brand-page-maker/components/preview-modal/i18n/preview-modal.fr-FR.json +6 -0
- package/src/brand-page-maker/components/preview-modal/i18n/preview-modal.json +6 -0
- package/src/brand-page-maker/components/preview-modal/i18n/preview-modal.pt-BR.json +6 -0
- package/src/brand-page-maker/components/preview-modal/i18n/preview-modal.pt-PT.json +6 -0
- package/src/brand-page-maker/components/rich-text-editor/RichTextEditor.vue +29 -17
- package/src/brand-page-maker/composables/useEventTracker.ts +1 -0
- package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.save.test.ts +106 -0
- package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.ts +40 -8
- package/src/bundles/bundled-translations.de-DE.json +5 -0
- package/src/bundles/bundled-translations.es-ES.json +5 -0
- package/src/bundles/bundled-translations.fr-CA.json +5 -0
- package/src/bundles/bundled-translations.fr-FR.json +5 -0
- package/src/bundles/bundled-translations.json +5 -0
- package/src/bundles/bundled-translations.pt-BR.json +5 -0
- package/src/bundles/bundled-translations.pt-PT.json +5 -0
- package/src/clients/brand-page-client.ts +2 -0
- package/src/composables/useSnapshot.test.ts +153 -0
- package/src/composables/useSnapshot.ts +52 -8
- package/src/composables/useTranslate.ts +2 -0
- package/src/constants/brand-page-maker.ts +5 -0
- package/src/constants/live-preview.constants.ts +15 -0
- package/src/lib.ts +5 -1
- package/src/shared/common/i18n/common.de-DE.json +1 -0
- package/src/shared/common/i18n/common.es-ES.json +1 -0
- package/src/shared/common/i18n/common.fr-CA.json +1 -0
- package/src/shared/common/i18n/common.fr-FR.json +1 -0
- package/src/shared/common/i18n/common.json +1 -0
- package/src/shared/common/i18n/common.pt-BR.json +1 -0
- package/src/shared/common/i18n/common.pt-PT.json +1 -0
- package/lib/src/bundled-translations-2HkRBbBD.js +0 -177
- package/lib/src/bundled-translations.de-DE-CL9ZEhU2.js +0 -177
- package/lib/src/bundled-translations.es-ES-uj7Sliu0.js +0 -177
- package/lib/src/bundled-translations.fr-CA-BMnBtr_w.js +0 -177
- package/lib/src/bundled-translations.fr-FR-9PEZedzq.js +0 -177
- package/lib/src/bundled-translations.pt-BR-B3oNDkoe.js +0 -177
- package/lib/src/bundled-translations.pt-PT-DM7Vsf-h.js +0 -177
|
@@ -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";
|
|
@@ -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,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;
|
|
@@ -297,11 +297,27 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
297
297
|
isVariation: boolean;
|
|
298
298
|
isExcluded: boolean;
|
|
299
299
|
} | undefined;
|
|
300
|
+
bp_5873_live_preview_prepurchase?: {
|
|
301
|
+
key: string;
|
|
302
|
+
value: string;
|
|
303
|
+
isControl: boolean;
|
|
304
|
+
isVariation: boolean;
|
|
305
|
+
isExcluded: boolean;
|
|
306
|
+
} | undefined;
|
|
307
|
+
bp_5873_live_preview_postpurchase?: {
|
|
308
|
+
key: string;
|
|
309
|
+
value: string;
|
|
310
|
+
isControl: boolean;
|
|
311
|
+
isVariation: boolean;
|
|
312
|
+
isExcluded: boolean;
|
|
313
|
+
} | undefined;
|
|
300
314
|
};
|
|
301
315
|
isSubsequentPublish: boolean;
|
|
302
316
|
isContextualUpgradeModalVisible: boolean;
|
|
303
317
|
contextualUpgradeType: import("@brand-page-maker/stores").WebsiteContextUpgradeType | undefined;
|
|
304
318
|
requestVerificationToken?: string | undefined;
|
|
319
|
+
isHostModalVisible?: boolean | undefined;
|
|
320
|
+
livePreviewUrl?: string | undefined;
|
|
305
321
|
} & import("pinia").PiniaCustomStateProperties<import("@brand-page-maker/stores").BrandPageContainerState>) => boolean;
|
|
306
322
|
isUserDraft: (state: {
|
|
307
323
|
availableTaxes: any[];
|
|
@@ -375,11 +391,121 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
375
391
|
isVariation: boolean;
|
|
376
392
|
isExcluded: boolean;
|
|
377
393
|
} | undefined;
|
|
394
|
+
bp_5873_live_preview_prepurchase?: {
|
|
395
|
+
key: string;
|
|
396
|
+
value: string;
|
|
397
|
+
isControl: boolean;
|
|
398
|
+
isVariation: boolean;
|
|
399
|
+
isExcluded: boolean;
|
|
400
|
+
} | undefined;
|
|
401
|
+
bp_5873_live_preview_postpurchase?: {
|
|
402
|
+
key: string;
|
|
403
|
+
value: string;
|
|
404
|
+
isControl: boolean;
|
|
405
|
+
isVariation: boolean;
|
|
406
|
+
isExcluded: boolean;
|
|
407
|
+
} | undefined;
|
|
378
408
|
};
|
|
379
409
|
isSubsequentPublish: boolean;
|
|
380
410
|
isContextualUpgradeModalVisible: boolean;
|
|
381
411
|
contextualUpgradeType: import("@brand-page-maker/stores").WebsiteContextUpgradeType | undefined;
|
|
382
412
|
requestVerificationToken?: string | undefined;
|
|
413
|
+
isHostModalVisible?: boolean | undefined;
|
|
414
|
+
livePreviewUrl?: string | undefined;
|
|
415
|
+
} & import("pinia").PiniaCustomStateProperties<import("@brand-page-maker/stores").BrandPageContainerState>) => boolean;
|
|
416
|
+
isAnyModalVisible: (state: {
|
|
417
|
+
availableTaxes: any[];
|
|
418
|
+
brandPageBaseUrl: string;
|
|
419
|
+
baseFabricRenderUrl: string;
|
|
420
|
+
brandPageDescription: string;
|
|
421
|
+
brandPageDisplayName: string;
|
|
422
|
+
templateTypeName: string;
|
|
423
|
+
sensitiveContent: number;
|
|
424
|
+
brandPageSlug: string;
|
|
425
|
+
brandPageStatus: string;
|
|
426
|
+
brandPageToken: string | undefined;
|
|
427
|
+
brandPageTitle: string;
|
|
428
|
+
customDomain: {
|
|
429
|
+
id: string;
|
|
430
|
+
created: Date;
|
|
431
|
+
updated: Date;
|
|
432
|
+
brandPageToken: string;
|
|
433
|
+
domainName: string;
|
|
434
|
+
status: import("@brand-page-maker/constants").CustomDomainStatus;
|
|
435
|
+
dnsConfigurationStatus: import("@brand-page-maker/constants").DnsConfigurationStatus;
|
|
436
|
+
triggerOrigin?: string | undefined;
|
|
437
|
+
} | null;
|
|
438
|
+
createCustomDomainErrorMessage: string | null;
|
|
439
|
+
customDomainConfig?: {
|
|
440
|
+
dns: {
|
|
441
|
+
ipAddresses: string[];
|
|
442
|
+
};
|
|
443
|
+
} | undefined;
|
|
444
|
+
designDraftToken?: string | undefined;
|
|
445
|
+
designTemplateToken: string;
|
|
446
|
+
isCustomDomainEnabled: boolean;
|
|
447
|
+
isBrandPageSlugEditMode: boolean;
|
|
448
|
+
isPublishModalVisible: boolean;
|
|
449
|
+
isUpgradeModalVisible: boolean;
|
|
450
|
+
isPublishing: boolean;
|
|
451
|
+
isProduction: boolean;
|
|
452
|
+
isSellDomainNameEnabled: boolean;
|
|
453
|
+
isStripeOnboardingModalVisible: boolean;
|
|
454
|
+
isReactivationModal: boolean;
|
|
455
|
+
isPublishUpgradeModal: boolean;
|
|
456
|
+
isSaving: boolean;
|
|
457
|
+
backButtonLabel: string;
|
|
458
|
+
manageWebsiteDesignsUrl: string;
|
|
459
|
+
publishErrorMessage: string;
|
|
460
|
+
upgradeUrl: string;
|
|
461
|
+
reactivationUrl: string;
|
|
462
|
+
runtimeEnvironment: string;
|
|
463
|
+
selectedTaxId: number | undefined;
|
|
464
|
+
slug: string;
|
|
465
|
+
standalone: boolean;
|
|
466
|
+
triggerSaveSuccessMessage: boolean;
|
|
467
|
+
isDesignCom: boolean;
|
|
468
|
+
isPrePurchase: boolean;
|
|
469
|
+
makerFonts: any[];
|
|
470
|
+
eventButtonLocation?: string | undefined;
|
|
471
|
+
websiteUpsellModalViewModel?: any;
|
|
472
|
+
showPublishOptionModal?: boolean | undefined;
|
|
473
|
+
abTests: {
|
|
474
|
+
bp_3926_freemium_watermark?: {
|
|
475
|
+
key: string;
|
|
476
|
+
value: string;
|
|
477
|
+
isControl: boolean;
|
|
478
|
+
isVariation: boolean;
|
|
479
|
+
isExcluded: boolean;
|
|
480
|
+
} | undefined;
|
|
481
|
+
bp_5245_ai_website_assistant?: {
|
|
482
|
+
key: string;
|
|
483
|
+
value: string;
|
|
484
|
+
isControl: boolean;
|
|
485
|
+
isVariation: boolean;
|
|
486
|
+
isExcluded: boolean;
|
|
487
|
+
} | undefined;
|
|
488
|
+
bp_5873_live_preview_prepurchase?: {
|
|
489
|
+
key: string;
|
|
490
|
+
value: string;
|
|
491
|
+
isControl: boolean;
|
|
492
|
+
isVariation: boolean;
|
|
493
|
+
isExcluded: boolean;
|
|
494
|
+
} | undefined;
|
|
495
|
+
bp_5873_live_preview_postpurchase?: {
|
|
496
|
+
key: string;
|
|
497
|
+
value: string;
|
|
498
|
+
isControl: boolean;
|
|
499
|
+
isVariation: boolean;
|
|
500
|
+
isExcluded: boolean;
|
|
501
|
+
} | undefined;
|
|
502
|
+
};
|
|
503
|
+
isSubsequentPublish: boolean;
|
|
504
|
+
isContextualUpgradeModalVisible: boolean;
|
|
505
|
+
contextualUpgradeType: import("@brand-page-maker/stores").WebsiteContextUpgradeType | undefined;
|
|
506
|
+
requestVerificationToken?: string | undefined;
|
|
507
|
+
isHostModalVisible?: boolean | undefined;
|
|
508
|
+
livePreviewUrl?: string | undefined;
|
|
383
509
|
} & import("pinia").PiniaCustomStateProperties<import("@brand-page-maker/stores").BrandPageContainerState>) => boolean;
|
|
384
510
|
}, {
|
|
385
511
|
initialise(payload: import("../../stores/brandpage-container").InitialisePayload): void;
|
|
@@ -393,6 +519,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
393
519
|
setContextualUpgradeType(payload: any): void;
|
|
394
520
|
setIsSaving(payload: any): void;
|
|
395
521
|
setIsUpgradeModalVisible(payload: any): void;
|
|
522
|
+
setIsHostModalVisible(payload: {
|
|
523
|
+
isVisible: boolean;
|
|
524
|
+
}): void;
|
|
396
525
|
setPublishErrorMessage(payload: any): void;
|
|
397
526
|
setTriggerSaveSuccessMessage(payload: any): void;
|
|
398
527
|
setSlug(payload: any): void;
|
|
@@ -440,6 +569,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
440
569
|
saveBrandPage(payload?: {
|
|
441
570
|
isPublish?: boolean;
|
|
442
571
|
eventButtonLocation?: string;
|
|
572
|
+
saveOnly?: boolean;
|
|
443
573
|
}): Promise<false | {
|
|
444
574
|
saved: boolean;
|
|
445
575
|
canPublish: boolean;
|
|
@@ -1311,6 +1441,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1311
1441
|
mounted: boolean;
|
|
1312
1442
|
debounceOnResize: DebounceHandle | undefined;
|
|
1313
1443
|
showSaveSuccessMessage: boolean;
|
|
1444
|
+
isPreviewModalVisible: boolean;
|
|
1314
1445
|
}, {
|
|
1315
1446
|
previewContainer(): any;
|
|
1316
1447
|
previewContent(): any;
|
|
@@ -1324,7 +1455,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1324
1455
|
handleSwitchViewport(viewport: ViewportsType): void;
|
|
1325
1456
|
saveBrandPage(eventButtonLocation: string | undefined): void;
|
|
1326
1457
|
saveAndPublishBrandPage(isActionBar: any): void;
|
|
1458
|
+
onPreviewPublish(): void;
|
|
1327
1459
|
onBackBrandPage(): void;
|
|
1460
|
+
onPreview(): void;
|
|
1461
|
+
onClosePreview(): void;
|
|
1328
1462
|
onChangeTemplateConfirmModalCancel(): void;
|
|
1329
1463
|
onChangeTemplateConfirmModalConfirm(): void;
|
|
1330
1464
|
onVideoPlayToggle(): void;
|
|
@@ -109,6 +109,7 @@ export default defineComponent({
|
|
|
109
109
|
mounted: false,
|
|
110
110
|
debounceOnResize: undefined,
|
|
111
111
|
showSaveSuccessMessage: false,
|
|
112
|
+
isPreviewModalVisible: false,
|
|
112
113
|
};
|
|
113
114
|
},
|
|
114
115
|
computed: {
|
|
@@ -207,6 +208,21 @@ export default defineComponent({
|
|
|
207
208
|
}
|
|
208
209
|
this.$emit(EVENTS.Initialised);
|
|
209
210
|
},
|
|
211
|
+
watch: {
|
|
212
|
+
// Pre-purchase only: the host's save has produced the signed link, so the frame
|
|
213
|
+
// can open with it already in hand — no waiting inside the modal. No link means
|
|
214
|
+
// the save failed or the customer was sent to register, and the editor has
|
|
215
|
+
// already said so, so nothing opens.
|
|
216
|
+
'containerStore.livePreviewUrl'(livePreviewUrl) {
|
|
217
|
+
if (!livePreviewUrl ||
|
|
218
|
+
!this.containerStore.isPrePurchase ||
|
|
219
|
+
this.isPreviewModalVisible) {
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
this.isPreviewModalVisible = true;
|
|
223
|
+
this.$emit(EVENTS.Preview);
|
|
224
|
+
},
|
|
225
|
+
},
|
|
210
226
|
mounted() {
|
|
211
227
|
if (window) {
|
|
212
228
|
window.removeEventListener('resize', this.onResizeWithDebounce);
|
|
@@ -317,9 +333,43 @@ export default defineComponent({
|
|
|
317
333
|
: UPGRADE_CTA_LOCATIONS.EDITOR_PUBLISH_TOP,
|
|
318
334
|
});
|
|
319
335
|
},
|
|
336
|
+
onPreviewPublish() {
|
|
337
|
+
// Same host publish flow as the editor button, tracked as its own location.
|
|
338
|
+
this.$emit(EVENTS.Publish, {
|
|
339
|
+
eventButtonLocation: UPGRADE_CTA_LOCATIONS.EDITOR_PREVIEW_PUBLISH,
|
|
340
|
+
});
|
|
341
|
+
},
|
|
320
342
|
onBackBrandPage() {
|
|
321
343
|
this.$emit(EVENTS.Back);
|
|
322
344
|
},
|
|
345
|
+
onPreview() {
|
|
346
|
+
// The preview frames a SAVED, owned draft. A signed-out customer can't have
|
|
347
|
+
// one, and the save needs an owner — so sign-in comes first, via the host's
|
|
348
|
+
// Save Progress flow.
|
|
349
|
+
if (!this.isUserAuthenticated) {
|
|
350
|
+
this.$emit(EVENTS.LivePreviewClicked);
|
|
351
|
+
return;
|
|
352
|
+
}
|
|
353
|
+
// Pre-purchase drafts are saved by the HOST (`prepurchase/upsert`), never by
|
|
354
|
+
// the maker store. Ask for that save and stay closed until it hands back a
|
|
355
|
+
// preview URL (see the `livePreviewUrl` watcher). Opening first would mean
|
|
356
|
+
// waiting inside the modal on a save it cannot see the outcome of, which is
|
|
357
|
+
// how the loader used to hang forever when a save failed or asked the customer
|
|
358
|
+
// to register (BP-5870). A failed save now surfaces the editor's own error and
|
|
359
|
+
// nothing opens.
|
|
360
|
+
if (this.containerStore.isPrePurchase) {
|
|
361
|
+
this.containerStore.livePreviewUrl = undefined;
|
|
362
|
+
this.$emit(EVENTS.LivePreviewClicked);
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
// Post-purchase saves through the maker store, which reports its own result —
|
|
366
|
+
// so the modal can open first and show its loader while that runs.
|
|
367
|
+
this.isPreviewModalVisible = true;
|
|
368
|
+
this.$emit(EVENTS.Preview);
|
|
369
|
+
},
|
|
370
|
+
onClosePreview() {
|
|
371
|
+
this.isPreviewModalVisible = false;
|
|
372
|
+
},
|
|
323
373
|
onChangeTemplateConfirmModalCancel() {
|
|
324
374
|
this.brandPageMakerStore.onChangeTemplateConfirmModalCancel();
|
|
325
375
|
},
|
package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts
CHANGED
|
@@ -740,11 +740,27 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
740
740
|
isVariation: boolean;
|
|
741
741
|
isExcluded: boolean;
|
|
742
742
|
} | undefined;
|
|
743
|
+
bp_5873_live_preview_prepurchase?: {
|
|
744
|
+
key: string;
|
|
745
|
+
value: string;
|
|
746
|
+
isControl: boolean;
|
|
747
|
+
isVariation: boolean;
|
|
748
|
+
isExcluded: boolean;
|
|
749
|
+
} | undefined;
|
|
750
|
+
bp_5873_live_preview_postpurchase?: {
|
|
751
|
+
key: string;
|
|
752
|
+
value: string;
|
|
753
|
+
isControl: boolean;
|
|
754
|
+
isVariation: boolean;
|
|
755
|
+
isExcluded: boolean;
|
|
756
|
+
} | undefined;
|
|
743
757
|
};
|
|
744
758
|
isSubsequentPublish: boolean;
|
|
745
759
|
isContextualUpgradeModalVisible: boolean;
|
|
746
760
|
contextualUpgradeType: import("@brand-page-maker/stores").WebsiteContextUpgradeType | undefined;
|
|
747
761
|
requestVerificationToken?: string | undefined;
|
|
762
|
+
isHostModalVisible?: boolean | undefined;
|
|
763
|
+
livePreviewUrl?: string | undefined;
|
|
748
764
|
} & import("pinia").PiniaCustomStateProperties<import("@brand-page-maker/stores").BrandPageContainerState>) => boolean;
|
|
749
765
|
isUserDraft: (state: {
|
|
750
766
|
availableTaxes: any[];
|
|
@@ -818,11 +834,121 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
818
834
|
isVariation: boolean;
|
|
819
835
|
isExcluded: boolean;
|
|
820
836
|
} | undefined;
|
|
837
|
+
bp_5873_live_preview_prepurchase?: {
|
|
838
|
+
key: string;
|
|
839
|
+
value: string;
|
|
840
|
+
isControl: boolean;
|
|
841
|
+
isVariation: boolean;
|
|
842
|
+
isExcluded: boolean;
|
|
843
|
+
} | undefined;
|
|
844
|
+
bp_5873_live_preview_postpurchase?: {
|
|
845
|
+
key: string;
|
|
846
|
+
value: string;
|
|
847
|
+
isControl: boolean;
|
|
848
|
+
isVariation: boolean;
|
|
849
|
+
isExcluded: boolean;
|
|
850
|
+
} | undefined;
|
|
821
851
|
};
|
|
822
852
|
isSubsequentPublish: boolean;
|
|
823
853
|
isContextualUpgradeModalVisible: boolean;
|
|
824
854
|
contextualUpgradeType: import("@brand-page-maker/stores").WebsiteContextUpgradeType | undefined;
|
|
825
855
|
requestVerificationToken?: string | undefined;
|
|
856
|
+
isHostModalVisible?: boolean | undefined;
|
|
857
|
+
livePreviewUrl?: string | undefined;
|
|
858
|
+
} & import("pinia").PiniaCustomStateProperties<import("@brand-page-maker/stores").BrandPageContainerState>) => boolean;
|
|
859
|
+
isAnyModalVisible: (state: {
|
|
860
|
+
availableTaxes: any[];
|
|
861
|
+
brandPageBaseUrl: string;
|
|
862
|
+
baseFabricRenderUrl: string;
|
|
863
|
+
brandPageDescription: string;
|
|
864
|
+
brandPageDisplayName: string;
|
|
865
|
+
templateTypeName: string;
|
|
866
|
+
sensitiveContent: number;
|
|
867
|
+
brandPageSlug: string;
|
|
868
|
+
brandPageStatus: string;
|
|
869
|
+
brandPageToken: string | undefined;
|
|
870
|
+
brandPageTitle: string;
|
|
871
|
+
customDomain: {
|
|
872
|
+
id: string;
|
|
873
|
+
created: Date;
|
|
874
|
+
updated: Date;
|
|
875
|
+
brandPageToken: string;
|
|
876
|
+
domainName: string;
|
|
877
|
+
status: import("@brand-page-maker/constants").CustomDomainStatus;
|
|
878
|
+
dnsConfigurationStatus: import("@brand-page-maker/constants").DnsConfigurationStatus;
|
|
879
|
+
triggerOrigin?: string | undefined;
|
|
880
|
+
} | null;
|
|
881
|
+
createCustomDomainErrorMessage: string | null;
|
|
882
|
+
customDomainConfig?: {
|
|
883
|
+
dns: {
|
|
884
|
+
ipAddresses: string[];
|
|
885
|
+
};
|
|
886
|
+
} | undefined;
|
|
887
|
+
designDraftToken?: string | undefined;
|
|
888
|
+
designTemplateToken: string;
|
|
889
|
+
isCustomDomainEnabled: boolean;
|
|
890
|
+
isBrandPageSlugEditMode: boolean;
|
|
891
|
+
isPublishModalVisible: boolean;
|
|
892
|
+
isUpgradeModalVisible: boolean;
|
|
893
|
+
isPublishing: boolean;
|
|
894
|
+
isProduction: boolean;
|
|
895
|
+
isSellDomainNameEnabled: boolean;
|
|
896
|
+
isStripeOnboardingModalVisible: boolean;
|
|
897
|
+
isReactivationModal: boolean;
|
|
898
|
+
isPublishUpgradeModal: boolean;
|
|
899
|
+
isSaving: boolean;
|
|
900
|
+
backButtonLabel: string;
|
|
901
|
+
manageWebsiteDesignsUrl: string;
|
|
902
|
+
publishErrorMessage: string;
|
|
903
|
+
upgradeUrl: string;
|
|
904
|
+
reactivationUrl: string;
|
|
905
|
+
runtimeEnvironment: string;
|
|
906
|
+
selectedTaxId: number | undefined;
|
|
907
|
+
slug: string;
|
|
908
|
+
standalone: boolean;
|
|
909
|
+
triggerSaveSuccessMessage: boolean;
|
|
910
|
+
isDesignCom: boolean;
|
|
911
|
+
isPrePurchase: boolean;
|
|
912
|
+
makerFonts: any[];
|
|
913
|
+
eventButtonLocation?: string | undefined;
|
|
914
|
+
websiteUpsellModalViewModel?: any;
|
|
915
|
+
showPublishOptionModal?: boolean | undefined;
|
|
916
|
+
abTests: {
|
|
917
|
+
bp_3926_freemium_watermark?: {
|
|
918
|
+
key: string;
|
|
919
|
+
value: string;
|
|
920
|
+
isControl: boolean;
|
|
921
|
+
isVariation: boolean;
|
|
922
|
+
isExcluded: boolean;
|
|
923
|
+
} | undefined;
|
|
924
|
+
bp_5245_ai_website_assistant?: {
|
|
925
|
+
key: string;
|
|
926
|
+
value: string;
|
|
927
|
+
isControl: boolean;
|
|
928
|
+
isVariation: boolean;
|
|
929
|
+
isExcluded: boolean;
|
|
930
|
+
} | undefined;
|
|
931
|
+
bp_5873_live_preview_prepurchase?: {
|
|
932
|
+
key: string;
|
|
933
|
+
value: string;
|
|
934
|
+
isControl: boolean;
|
|
935
|
+
isVariation: boolean;
|
|
936
|
+
isExcluded: boolean;
|
|
937
|
+
} | undefined;
|
|
938
|
+
bp_5873_live_preview_postpurchase?: {
|
|
939
|
+
key: string;
|
|
940
|
+
value: string;
|
|
941
|
+
isControl: boolean;
|
|
942
|
+
isVariation: boolean;
|
|
943
|
+
isExcluded: boolean;
|
|
944
|
+
} | undefined;
|
|
945
|
+
};
|
|
946
|
+
isSubsequentPublish: boolean;
|
|
947
|
+
isContextualUpgradeModalVisible: boolean;
|
|
948
|
+
contextualUpgradeType: import("@brand-page-maker/stores").WebsiteContextUpgradeType | undefined;
|
|
949
|
+
requestVerificationToken?: string | undefined;
|
|
950
|
+
isHostModalVisible?: boolean | undefined;
|
|
951
|
+
livePreviewUrl?: string | undefined;
|
|
826
952
|
} & import("pinia").PiniaCustomStateProperties<import("@brand-page-maker/stores").BrandPageContainerState>) => boolean;
|
|
827
953
|
}, {
|
|
828
954
|
initialise(payload: import("../../stores/brandpage-container").InitialisePayload): void;
|
|
@@ -836,6 +962,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
836
962
|
setContextualUpgradeType(payload: any): void;
|
|
837
963
|
setIsSaving(payload: any): void;
|
|
838
964
|
setIsUpgradeModalVisible(payload: any): void;
|
|
965
|
+
setIsHostModalVisible(payload: {
|
|
966
|
+
isVisible: boolean;
|
|
967
|
+
}): void;
|
|
839
968
|
setPublishErrorMessage(payload: any): void;
|
|
840
969
|
setTriggerSaveSuccessMessage(payload: any): void;
|
|
841
970
|
setSlug(payload: any): void;
|
|
@@ -883,6 +1012,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
883
1012
|
saveBrandPage(payload?: {
|
|
884
1013
|
isPublish?: boolean;
|
|
885
1014
|
eventButtonLocation?: string;
|
|
1015
|
+
saveOnly?: boolean;
|
|
886
1016
|
}): Promise<false | {
|
|
887
1017
|
saved: boolean;
|
|
888
1018
|
canPublish: boolean;
|
|
@@ -37,6 +37,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
37
37
|
}>, {}, {}, {}, {
|
|
38
38
|
saveBrandPage(): void;
|
|
39
39
|
saveAndPublishBrandPage(): void;
|
|
40
|
+
previewBrandPage(): void;
|
|
40
41
|
handleBackClick(): void;
|
|
41
42
|
onCreateTeamCards(payload: {
|
|
42
43
|
cta_location: string;
|