@designcrowd/library.brand-page 5.14.1 → 5.14.2-ml3
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-GGeRP-yJ.js → CreatedOnBrandCrowd-de-de-DxLeSo0D.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-D-mcoYKD.js → CreatedOnBrandCrowd-en-us-p9-PKTfD.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-UB-XVZLH.js → CreatedOnBrandCrowd-es-es-Dg1DkZwL.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-BcLwD-Ww.js → CreatedOnBrandCrowd-fr-fr-r6Ers47p.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-DuTtIiT7.js → CreatedOnBrandCrowd-pt-pt-CRvyq6iB.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-6nOtKdaY.js → CreatedOnDcom-de-de-DfCzyu8K.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-BlzEFog2.js → CreatedOnDcom-en-us-CP6lT2IJ.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-B_v3IYem.js → CreatedOnDcom-es-es-CABw9-cD.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-DmWvH9K_.js → CreatedOnDcom-fr-fr-DIN2-W0Q.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-P25mfZVx.js → CreatedOnDcom-pt-pt-BLTdvqrM.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 +2 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +12 -3
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.js +1 -0
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +16 -3
- package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.d.ts +12 -3
- package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +12 -3
- package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +12 -3
- package/lib/src/brand-page-maker/components/seo-settings/UseExistingDomainModal.mixin.d.ts +12 -3
- package/lib/src/brand-page-maker/components/upgrade-to-premium-button/UpgradeToPremiumButton.mixin.d.ts +12 -3
- package/lib/src/brand-page-maker/composables/useEventTracker.d.ts +7 -1
- package/lib/src/brand-page-maker/composables/useEventTracker.js +29 -4
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +14 -3
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.js +56 -9
- package/lib/src/brand-page-maker/stores/route/localised-route-store.js +6 -0
- package/lib/src/clients/brand-page-client.d.ts +20 -3
- package/lib/src/clients/brand-page-client.js +29 -17
- package/lib/src/css/library.brand-page-brandCrowd.min.css +14 -11
- package/lib/src/css/library.brand-page-brandPage.min.css +14 -11
- package/lib/src/css/library.brand-page-designCom.min.css +14 -11
- package/lib/src/css/library.brand-page-preview.min.css +14 -11
- package/lib/src/index.mjs +35 -34
- package/lib/src/{lib-CQSKlB0S.js → lib-OVp_vdPB.js} +20480 -20315
- package/lib/src/mockServiceWorker.js +1 -1
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +4 -0
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +4 -0
- package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +12 -3
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +12 -3
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +16 -3
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +12 -3
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +30 -10
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.js +25 -2
- package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +12 -3
- package/lib/src/shared/side-bar/components/SideBarTabButton.mixin.d.ts +4 -0
- package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +16 -3
- package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.d.ts +4 -0
- package/package.json +2 -2
- package/src/brand-page/models/brand-page-context.model.ts +7 -1
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.ts +1 -0
- package/src/brand-page-maker/composables/useEventTracker.ts +37 -4
- package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.ts +96 -9
- package/src/brand-page-maker/stores/route/localised-route-store.ts +6 -0
- package/src/clients/brand-page-client.ts +55 -20
- package/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.ts +31 -2
- package/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.vue +8 -0
|
@@ -650,8 +650,10 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
650
650
|
isPrePurchase: boolean;
|
|
651
651
|
makerFonts: any[];
|
|
652
652
|
eventButtonLocation?: string | undefined;
|
|
653
|
+
websiteUpsellModalViewModel?: any;
|
|
653
654
|
showPublishOptionModal?: boolean | undefined;
|
|
654
655
|
abTests: Record<string, string>;
|
|
656
|
+
isSubsequentPublish: boolean;
|
|
655
657
|
} & import("pinia").PiniaCustomStateProperties<import("../../../brand-page-maker/stores").BrandPageContainerState>) => boolean;
|
|
656
658
|
isUserDraft: (state: {
|
|
657
659
|
availableTaxes: any[];
|
|
@@ -709,8 +711,10 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
709
711
|
isPrePurchase: boolean;
|
|
710
712
|
makerFonts: any[];
|
|
711
713
|
eventButtonLocation?: string | undefined;
|
|
714
|
+
websiteUpsellModalViewModel?: any;
|
|
712
715
|
showPublishOptionModal?: boolean | undefined;
|
|
713
716
|
abTests: Record<string, string>;
|
|
717
|
+
isSubsequentPublish: boolean;
|
|
714
718
|
} & import("pinia").PiniaCustomStateProperties<import("../../../brand-page-maker/stores").BrandPageContainerState>) => boolean;
|
|
715
719
|
}, {
|
|
716
720
|
clearTriggerSaveEventApiOnPublishModalClose(): void;
|
|
@@ -743,6 +747,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
743
747
|
}): void;
|
|
744
748
|
setCreateCustomDomainErrorMessage(payload: any): void;
|
|
745
749
|
setBrandPageIsCustomDomainEnabled(payload: any): void;
|
|
750
|
+
setIsSubsequentPublish(payload: any): void;
|
|
746
751
|
clearPublishErrorMessage(): void;
|
|
747
752
|
closePublishModal(payload?: {
|
|
748
753
|
skipShowNextNotificationMessage?: boolean | undefined;
|
|
@@ -752,7 +757,10 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
752
757
|
publishBrandPage({ shouldPublish, slug }: {
|
|
753
758
|
shouldPublish: any;
|
|
754
759
|
slug: any;
|
|
755
|
-
}): Promise<
|
|
760
|
+
}): Promise<false | {
|
|
761
|
+
success: boolean;
|
|
762
|
+
websiteUpsellModalViewModel: any;
|
|
763
|
+
}>;
|
|
756
764
|
publishBrandPageWithCustomDomainAsync({ shouldPublish, slug, domain, isPurchasedDomain, }: {
|
|
757
765
|
shouldPublish: any;
|
|
758
766
|
slug: any;
|
|
@@ -769,12 +777,13 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
769
777
|
eventButtonLocation?: string | undefined;
|
|
770
778
|
}): Promise<false | {
|
|
771
779
|
saved: boolean;
|
|
772
|
-
canPublish:
|
|
780
|
+
canPublish: boolean;
|
|
781
|
+
websiteUpsellModalViewModel: any;
|
|
773
782
|
}>;
|
|
774
783
|
saveAndPublishBrandPage(eventButtonLocation: string): Promise<void>;
|
|
775
784
|
saveTemplate(): Promise<void>;
|
|
776
785
|
setBrandPageStatus(status: any): Promise<void>;
|
|
777
|
-
showPublishModal(eventButtonLocation?: string | undefined): void;
|
|
786
|
+
showPublishModal(eventButtonLocation?: string | undefined, websiteUpsellModalViewModel?: any, isSubsequentPublish?: boolean | undefined): void;
|
|
778
787
|
showBrandPageSlugEditModal(): Promise<void>;
|
|
779
788
|
showUpgradeModalAndSaveAsync(): Promise<void>;
|
|
780
789
|
showStripeOnboardingModal(): void;
|
|
@@ -840,6 +849,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
840
849
|
setRecommendedLogoColors(payload: import("../../background-settings/background-settings-models").SetRecommendedLogoColorsPayload): void;
|
|
841
850
|
}>;
|
|
842
851
|
eventTracker: {
|
|
852
|
+
sendExperimentStartedEvent: (abTestKey: string, abTestValue: string) => void;
|
|
843
853
|
setGlobalEventProps: (props: Omit<import("../../../brand-page-maker/composables/useEventTracker").BpGlobalEventProps, "template_category">) => void;
|
|
844
854
|
setUpsellBridgeState: (props: import("../../../brand-page-maker/composables/useEventTracker").BpUpsellEventProps) => void;
|
|
845
855
|
subscribe: (callbackFn: (event: import("../../../brand-page-maker/composables/useEventTracker").BpEventTrackerEvent) => void) => void;
|
|
@@ -848,6 +858,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
848
858
|
sendUpsellOpenEvent: () => void;
|
|
849
859
|
sendUpsellContinuationEvent: (continuation: string) => void;
|
|
850
860
|
sendPublishOpenEvent: () => void;
|
|
861
|
+
appendPublishBridgeState: (props: any) => void;
|
|
851
862
|
sendPublishContinuationEvent: (continuation: string, domain: string | null) => void;
|
|
852
863
|
sendWebsiteManageAddPageEvent: (pageName: string) => void;
|
|
853
864
|
sendWebsiteManageRemovePageEvent: (pageName: string) => void;
|
|
@@ -860,6 +871,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
860
871
|
sendTemplateCategorySelectEvent: (category: string) => void;
|
|
861
872
|
sendSidebarCategoryClickedEvent: (tabName: string) => void;
|
|
862
873
|
sendAddContentContinuationEvent: (continuation: string) => void;
|
|
874
|
+
sendUpsellOfferEvent: (upsellType: string) => void;
|
|
875
|
+
sendUpsellOfferActionEvent: (upsellType: string, action: string) => void;
|
|
863
876
|
};
|
|
864
877
|
}, {
|
|
865
878
|
styleThemeKeys: Readonly<{
|
|
@@ -556,6 +556,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
556
556
|
}>;
|
|
557
557
|
isDesignCom: import("vue").ComputedRef<boolean>;
|
|
558
558
|
eventTracker: {
|
|
559
|
+
sendExperimentStartedEvent: (abTestKey: string, abTestValue: string) => void;
|
|
559
560
|
setGlobalEventProps: (props: Omit<import("../../../brand-page-maker/composables/useEventTracker").BpGlobalEventProps, "template_category">) => void;
|
|
560
561
|
setUpsellBridgeState: (props: import("../../../brand-page-maker/composables/useEventTracker").BpUpsellEventProps) => void;
|
|
561
562
|
subscribe: (callbackFn: (event: import("../../../brand-page-maker/composables/useEventTracker").BpEventTrackerEvent) => void) => void;
|
|
@@ -564,6 +565,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
564
565
|
sendUpsellOpenEvent: () => void;
|
|
565
566
|
sendUpsellContinuationEvent: (continuation: string) => void;
|
|
566
567
|
sendPublishOpenEvent: () => void;
|
|
568
|
+
appendPublishBridgeState: (props: any) => void;
|
|
567
569
|
sendPublishContinuationEvent: (continuation: string, domain: string | null) => void;
|
|
568
570
|
sendWebsiteManageAddPageEvent: (pageName: string) => void;
|
|
569
571
|
sendWebsiteManageRemovePageEvent: (pageName: string) => void;
|
|
@@ -576,6 +578,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
576
578
|
sendTemplateCategorySelectEvent: (category: string) => void;
|
|
577
579
|
sendSidebarCategoryClickedEvent: (tabName: string) => void;
|
|
578
580
|
sendAddContentContinuationEvent: (continuation: string) => void;
|
|
581
|
+
sendUpsellOfferEvent: (upsellType: string) => void;
|
|
582
|
+
sendUpsellOfferActionEvent: (upsellType: string, action: string) => void;
|
|
579
583
|
};
|
|
580
584
|
}, {
|
|
581
585
|
tabs: string[];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@designcrowd/library.brand-page",
|
|
3
3
|
"description": "A collection of Maker/Designer applications",
|
|
4
|
-
"version": "5.14.
|
|
4
|
+
"version": "5.14.2-ml3",
|
|
5
5
|
"author": "Design.com Eng",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@ckpack/vue-color": "1.4.1",
|
|
58
|
-
"@designcrowd/fe-shared-lib": "1.3.
|
|
58
|
+
"@designcrowd/fe-shared-lib": "1.3.2",
|
|
59
59
|
"@pinia/nuxt": "0.11.0",
|
|
60
60
|
"@storybook/react": "9.0.4",
|
|
61
61
|
"@tiptap/extension-bubble-menu": "^2.14.0",
|
|
@@ -48,10 +48,13 @@ export interface AbTestResult {
|
|
|
48
48
|
|
|
49
49
|
const AB_TEST_KEYS = {
|
|
50
50
|
BP_3926_FREEMIUM_WATERMARK: 'bc-bp-3926-freemium-cta-in-website-editor',
|
|
51
|
+
BP_4092_ROTATING_UPSELLS_AT_PUBLISH:
|
|
52
|
+
'bc-bp-4092-rotating-upsells-at-website-publish',
|
|
51
53
|
};
|
|
52
54
|
|
|
53
55
|
export interface AbTest {
|
|
54
56
|
bp_3926_freemium_watermark?: AbTestResult;
|
|
57
|
+
bp_4092_rotating_upsells_at_publish?: AbTestResult;
|
|
55
58
|
}
|
|
56
59
|
export const MEDIA_SIZES = {
|
|
57
60
|
size1x: 'size1x',
|
|
@@ -93,7 +96,10 @@ export interface BrandPageContext {
|
|
|
93
96
|
disableLogoRenderOnServerside?: boolean;
|
|
94
97
|
}
|
|
95
98
|
|
|
96
|
-
const getValueType = (
|
|
99
|
+
export const getValueType = (
|
|
100
|
+
key: string,
|
|
101
|
+
abtestValue?: string,
|
|
102
|
+
): AbTestResult => {
|
|
97
103
|
return {
|
|
98
104
|
key: key,
|
|
99
105
|
value: abtestValue || '',
|
|
@@ -265,6 +265,7 @@ const InitialiseMakerStores = (options: {
|
|
|
265
265
|
triggerSaveSuccessMessage: false,
|
|
266
266
|
triggerSaveEventApiOnPublishModalClose: false,
|
|
267
267
|
abTests: {},
|
|
268
|
+
isSubsequentPublish: false,
|
|
268
269
|
});
|
|
269
270
|
|
|
270
271
|
userStore.setIsAdmin({ isAdmin: options.isAdmin || false });
|
|
@@ -25,9 +25,9 @@ export interface BpEventTrackerEvent {
|
|
|
25
25
|
eventProps: any;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
// Event names should driven with prefix `
|
|
28
|
+
// Event names should driven with prefix `website_maker_` to distinguish the event from other events around the site
|
|
29
29
|
export const EVENTS = {
|
|
30
|
-
|
|
30
|
+
EXPERIMENT_STARTED: '$experiment_started',
|
|
31
31
|
WEBSITE_MAKER_ADD_CONTENT: 'website_maker_add_content',
|
|
32
32
|
WEBSITE_MAKER_REMOVE_CONTENT: 'website_maker_remove_content',
|
|
33
33
|
WEBSITE_MAKER_SELECT_CONTENT: 'website_maker_select_content',
|
|
@@ -49,6 +49,8 @@ export const EVENTS = {
|
|
|
49
49
|
WEBSITE_MAKER_HYPERLINK_CLICK: 'website_maker_hyperlink_click',
|
|
50
50
|
WEBSITE_MAKER_HYPERLINK_EDIT: 'website_maker_hyperlink_edit',
|
|
51
51
|
WEBSITE_MAKER_CALENDLY_LINK_CLICKED: 'website_maker_calendly_link_clicked',
|
|
52
|
+
WEBSITE_MAKER_UPSELL_OFFER: 'website_maker_upsell_offer',
|
|
53
|
+
WEBSITE_MAKER_UPSELL_ACTION: 'website_maker_upsell_action',
|
|
52
54
|
};
|
|
53
55
|
|
|
54
56
|
export const SELECT_LOCATIONS = {
|
|
@@ -103,12 +105,16 @@ const bridgeState = shallowRef({
|
|
|
103
105
|
|
|
104
106
|
const LISTENERS = shallowRef<((event: BpEventTrackerEvent) => void)[]>([]);
|
|
105
107
|
|
|
106
|
-
const _publishEvent = (
|
|
108
|
+
const _publishEvent = (
|
|
109
|
+
eventName: string,
|
|
110
|
+
eventProps: any,
|
|
111
|
+
excludeGlobal = false,
|
|
112
|
+
) => {
|
|
107
113
|
LISTENERS.value.forEach((listener) => {
|
|
108
114
|
listener({
|
|
109
115
|
eventName: eventName,
|
|
110
116
|
eventProps: {
|
|
111
|
-
...GLOBAL_EVENT_PROPS.value,
|
|
117
|
+
...(excludeGlobal ? {} : GLOBAL_EVENT_PROPS.value),
|
|
112
118
|
...eventProps,
|
|
113
119
|
},
|
|
114
120
|
});
|
|
@@ -117,6 +123,16 @@ const _publishEvent = (eventName: string, eventProps: any) => {
|
|
|
117
123
|
|
|
118
124
|
const useEventTracker = () => {
|
|
119
125
|
return {
|
|
126
|
+
sendExperimentStartedEvent: (abTestKey: string, abTestValue: string) => {
|
|
127
|
+
_publishEvent(
|
|
128
|
+
EVENTS.EXPERIMENT_STARTED,
|
|
129
|
+
{
|
|
130
|
+
'Experiment name': abTestKey,
|
|
131
|
+
'Variant name': abTestValue,
|
|
132
|
+
},
|
|
133
|
+
true,
|
|
134
|
+
);
|
|
135
|
+
},
|
|
120
136
|
setGlobalEventProps: (
|
|
121
137
|
props: Omit<BpGlobalEventProps, 'template_category'>,
|
|
122
138
|
) => {
|
|
@@ -158,6 +174,12 @@ const useEventTracker = () => {
|
|
|
158
174
|
continuation: null,
|
|
159
175
|
});
|
|
160
176
|
},
|
|
177
|
+
appendPublishBridgeState: (props) => {
|
|
178
|
+
bridgeState.value.publishOpenEventProps = {
|
|
179
|
+
...bridgeState.value.publishOpenEventProps,
|
|
180
|
+
...props,
|
|
181
|
+
};
|
|
182
|
+
},
|
|
161
183
|
sendPublishContinuationEvent: (
|
|
162
184
|
continuation: string,
|
|
163
185
|
domain: string | null,
|
|
@@ -228,6 +250,17 @@ const useEventTracker = () => {
|
|
|
228
250
|
continuation,
|
|
229
251
|
});
|
|
230
252
|
},
|
|
253
|
+
sendUpsellOfferEvent: (upsellType: string) => {
|
|
254
|
+
_publishEvent(EVENTS.WEBSITE_MAKER_UPSELL_OFFER, {
|
|
255
|
+
upsellType,
|
|
256
|
+
});
|
|
257
|
+
},
|
|
258
|
+
sendUpsellOfferActionEvent: (upsellType: string, action: string) => {
|
|
259
|
+
_publishEvent(EVENTS.WEBSITE_MAKER_UPSELL_ACTION, {
|
|
260
|
+
upsellType,
|
|
261
|
+
action,
|
|
262
|
+
});
|
|
263
|
+
},
|
|
231
264
|
};
|
|
232
265
|
};
|
|
233
266
|
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
BRAND_PAGE_TYPES,
|
|
16
16
|
SENSITIVE_CONTENT_TYPES,
|
|
17
17
|
getAbTestResults,
|
|
18
|
+
getValueType,
|
|
18
19
|
type LogoContent,
|
|
19
20
|
} from '../../../brand-page';
|
|
20
21
|
import { isLogoContent } from '../../../brand-page/utils';
|
|
@@ -30,7 +31,6 @@ import {
|
|
|
30
31
|
import { navigationTr } from '../../../composables/useTranslate';
|
|
31
32
|
import type { WebsiteSlugCheckResponse } from '../../../brand-page-maker/models/api.model';
|
|
32
33
|
import { errorTr, constantsTr } from '../../../composables/useTranslate';
|
|
33
|
-
import { useUiTemplateSettingsStore } from '../../../shared/template-settings/store';
|
|
34
34
|
|
|
35
35
|
export interface BrandPageContainerState {
|
|
36
36
|
availableTaxes: any[];
|
|
@@ -75,8 +75,10 @@ export interface BrandPageContainerState {
|
|
|
75
75
|
isPrePurchase: boolean;
|
|
76
76
|
makerFonts: any[];
|
|
77
77
|
eventButtonLocation?: string;
|
|
78
|
+
websiteUpsellModalViewModel?: any;
|
|
78
79
|
showPublishOptionModal?: boolean; // select an option modal on publish
|
|
79
80
|
abTests: Record<string, string>;
|
|
81
|
+
isSubsequentPublish: boolean;
|
|
80
82
|
}
|
|
81
83
|
|
|
82
84
|
export type InitialisePayload = Omit<
|
|
@@ -140,8 +142,10 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
140
142
|
isPrePurchase: false,
|
|
141
143
|
makerFonts: [],
|
|
142
144
|
eventButtonLocation: undefined,
|
|
145
|
+
websiteUpsellModalViewModel: undefined,
|
|
143
146
|
showPublishOptionModal: false,
|
|
144
147
|
abTests: {},
|
|
148
|
+
isSubsequentPublish: false,
|
|
145
149
|
};
|
|
146
150
|
},
|
|
147
151
|
actions: {
|
|
@@ -209,8 +213,8 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
209
213
|
this.isPrePurchase = payload.isPrePurchase;
|
|
210
214
|
this.makerFonts = payload.makerFonts || [];
|
|
211
215
|
this.showPublishOptionModal = payload.showPublishOptionModal;
|
|
212
|
-
|
|
213
216
|
this.abTests = getAbTestResults(payload.abTests || {});
|
|
217
|
+
this.isSubsequentPublish = payload.isSubsequentPublish;
|
|
214
218
|
|
|
215
219
|
const logoStore = useLogoStore();
|
|
216
220
|
|
|
@@ -249,6 +253,7 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
249
253
|
setIsPublishModalVisible(payload) {
|
|
250
254
|
this.isPublishModalVisible = payload.isVisible;
|
|
251
255
|
this.eventButtonLocation = payload.eventButtonLocation;
|
|
256
|
+
this.websiteUpsellModalViewModel = payload.websiteUpsellModalViewModel;
|
|
252
257
|
},
|
|
253
258
|
|
|
254
259
|
setIsPublishUpgradeModal(payload) {
|
|
@@ -334,6 +339,10 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
334
339
|
this.isCustomDomainEnabled = payload.isCustomDomainEnabled;
|
|
335
340
|
},
|
|
336
341
|
|
|
342
|
+
setIsSubsequentPublish(payload) {
|
|
343
|
+
this.isSubsequentPublish = payload.isSubsequentPublish;
|
|
344
|
+
},
|
|
345
|
+
|
|
337
346
|
clearPublishErrorMessage() {
|
|
338
347
|
this.setPublishErrorMessage({ errorMessage: undefined });
|
|
339
348
|
},
|
|
@@ -397,6 +406,7 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
397
406
|
|
|
398
407
|
async publishBrandPage({ shouldPublish, slug }) {
|
|
399
408
|
const brandPageMakerStore = useBrandPageMakerStore();
|
|
409
|
+
const eventTracker = useEventTracker();
|
|
400
410
|
|
|
401
411
|
if (!this.designDraftToken) {
|
|
402
412
|
throw new Error(
|
|
@@ -421,6 +431,22 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
421
431
|
},
|
|
422
432
|
);
|
|
423
433
|
|
|
434
|
+
if (!response) {
|
|
435
|
+
throw new Error('Failed to set brand page slug');
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
if (response.websiteUpsellAbTestKey) {
|
|
439
|
+
this.abTests.bp_4092_rotating_upsells_at_publish = getValueType(
|
|
440
|
+
response.websiteUpsellAbTestKey,
|
|
441
|
+
response.websiteUpsellAbTestValue,
|
|
442
|
+
);
|
|
443
|
+
|
|
444
|
+
eventTracker.sendExperimentStartedEvent(
|
|
445
|
+
response.websiteUpsellAbTestKey,
|
|
446
|
+
response.websiteUpsellAbTestValue,
|
|
447
|
+
);
|
|
448
|
+
}
|
|
449
|
+
|
|
424
450
|
if (shouldPublish) {
|
|
425
451
|
this.clearTriggerSaveEventApiOnPublishModalClose();
|
|
426
452
|
}
|
|
@@ -449,7 +475,10 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
449
475
|
await this.closePublishModal();
|
|
450
476
|
}
|
|
451
477
|
|
|
452
|
-
return
|
|
478
|
+
return {
|
|
479
|
+
success: true,
|
|
480
|
+
websiteUpsellModalViewModel: response.websiteUpsellModalViewModel,
|
|
481
|
+
};
|
|
453
482
|
} catch (err: any) {
|
|
454
483
|
if (err.response?.data?.showUpgradeModal === true) {
|
|
455
484
|
const eventTracker = useEventTracker();
|
|
@@ -486,7 +515,6 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
486
515
|
|
|
487
516
|
return false;
|
|
488
517
|
} finally {
|
|
489
|
-
this.setIsPublishModalVisible({ isVisible: true });
|
|
490
518
|
this.setIsPublishing({ isPublishing: false });
|
|
491
519
|
}
|
|
492
520
|
},
|
|
@@ -498,6 +526,7 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
498
526
|
isPurchasedDomain,
|
|
499
527
|
}) {
|
|
500
528
|
const brandPageMakerStore = useBrandPageMakerStore();
|
|
529
|
+
const eventTracker = useEventTracker();
|
|
501
530
|
|
|
502
531
|
if (!this.designDraftToken) {
|
|
503
532
|
throw new Error(
|
|
@@ -555,6 +584,22 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
555
584
|
},
|
|
556
585
|
);
|
|
557
586
|
|
|
587
|
+
if (!response) {
|
|
588
|
+
throw new Error('Failed to set brand page slug');
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
if (response.websiteUpsellAbTestKey) {
|
|
592
|
+
this.abTests.bp_4092_rotating_upsells_at_publish = getValueType(
|
|
593
|
+
response.websiteUpsellAbTestKey,
|
|
594
|
+
response.websiteUpsellAbTestValue,
|
|
595
|
+
);
|
|
596
|
+
|
|
597
|
+
eventTracker.sendExperimentStartedEvent(
|
|
598
|
+
response.websiteUpsellAbTestKey,
|
|
599
|
+
response.websiteUpsellAbTestValue,
|
|
600
|
+
);
|
|
601
|
+
}
|
|
602
|
+
|
|
558
603
|
await brandPageClient.getBrandPageIsCustomDomainEnabledAsync(
|
|
559
604
|
brandPageMakerStore.brandPageType,
|
|
560
605
|
this.designDraftToken,
|
|
@@ -808,6 +853,7 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
808
853
|
) {
|
|
809
854
|
const userStore = useBrandPageMakerUserStore();
|
|
810
855
|
const brandPageMakerStore = useBrandPageMakerStore();
|
|
856
|
+
const eventTracker = useEventTracker();
|
|
811
857
|
|
|
812
858
|
if (userStore.isAdmin) {
|
|
813
859
|
throw new Error('save brand page is not allowed in admin mode');
|
|
@@ -836,6 +882,18 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
836
882
|
return false;
|
|
837
883
|
}
|
|
838
884
|
|
|
885
|
+
if (response.websiteUpsellAbTestKey) {
|
|
886
|
+
this.abTests.bp_4092_rotating_upsells_at_publish = getValueType(
|
|
887
|
+
response.websiteUpsellAbTestKey,
|
|
888
|
+
response.websiteUpsellAbTestValue,
|
|
889
|
+
);
|
|
890
|
+
|
|
891
|
+
eventTracker.sendExperimentStartedEvent(
|
|
892
|
+
response.websiteUpsellAbTestKey,
|
|
893
|
+
response.websiteUpsellAbTestValue,
|
|
894
|
+
);
|
|
895
|
+
}
|
|
896
|
+
|
|
839
897
|
if (this.brandPageStatus !== response.status) {
|
|
840
898
|
await this.setBrandPageStatus(response.status);
|
|
841
899
|
}
|
|
@@ -907,7 +965,11 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
907
965
|
await brandPageMakerStore.showNextNotificationMessage();
|
|
908
966
|
}
|
|
909
967
|
|
|
910
|
-
return {
|
|
968
|
+
return {
|
|
969
|
+
saved: true,
|
|
970
|
+
canPublish: response.canPublish,
|
|
971
|
+
websiteUpsellModalViewModel: response.websiteUpsellModalViewModel,
|
|
972
|
+
};
|
|
911
973
|
} catch (err: any) {
|
|
912
974
|
if (err.response?.data?.showUpgradeModal === true) {
|
|
913
975
|
const eventTracker = useEventTracker();
|
|
@@ -964,7 +1026,10 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
964
1026
|
|
|
965
1027
|
return;
|
|
966
1028
|
} else {
|
|
967
|
-
await this.showPublishModal(
|
|
1029
|
+
await this.showPublishModal(
|
|
1030
|
+
eventButtonLocation,
|
|
1031
|
+
response.websiteUpsellModalViewModel,
|
|
1032
|
+
);
|
|
968
1033
|
}
|
|
969
1034
|
},
|
|
970
1035
|
|
|
@@ -1002,12 +1067,34 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
1002
1067
|
this.brandPageStatus = status;
|
|
1003
1068
|
},
|
|
1004
1069
|
|
|
1005
|
-
showPublishModal(
|
|
1070
|
+
showPublishModal(
|
|
1071
|
+
eventButtonLocation?: string,
|
|
1072
|
+
websiteUpsellModalViewModel?: any,
|
|
1073
|
+
isSubsequentPublish?: boolean,
|
|
1074
|
+
) {
|
|
1006
1075
|
const eventTracker = useEventTracker();
|
|
1007
1076
|
|
|
1077
|
+
const subsequentPublishValue =
|
|
1078
|
+
isSubsequentPublish !== undefined
|
|
1079
|
+
? isSubsequentPublish
|
|
1080
|
+
: (this.brandPageSlug && this.brandPageSlug.trim() !== '') ||
|
|
1081
|
+
this.isPublished;
|
|
1082
|
+
|
|
1083
|
+
this.setIsSubsequentPublish({
|
|
1084
|
+
isSubsequentPublish: subsequentPublishValue,
|
|
1085
|
+
});
|
|
1086
|
+
|
|
1087
|
+
eventTracker.appendPublishBridgeState({
|
|
1088
|
+
isSubsequentPublish: this.isSubsequentPublish,
|
|
1089
|
+
});
|
|
1090
|
+
|
|
1008
1091
|
eventTracker.sendPublishOpenEvent();
|
|
1009
1092
|
|
|
1010
|
-
this.setIsPublishModalVisible({
|
|
1093
|
+
this.setIsPublishModalVisible({
|
|
1094
|
+
isVisible: true,
|
|
1095
|
+
eventButtonLocation,
|
|
1096
|
+
websiteUpsellModalViewModel,
|
|
1097
|
+
});
|
|
1011
1098
|
},
|
|
1012
1099
|
|
|
1013
1100
|
async showBrandPageSlugEditModal() {
|
|
@@ -1076,7 +1163,7 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
1076
1163
|
this.designDraftToken,
|
|
1077
1164
|
);
|
|
1078
1165
|
|
|
1079
|
-
await this.setBrandPageStatus(response
|
|
1166
|
+
await this.setBrandPageStatus(response?.status);
|
|
1080
1167
|
} catch (err) {
|
|
1081
1168
|
console.error(err);
|
|
1082
1169
|
}
|
|
@@ -8,20 +8,26 @@ const getLocalisedSlug = (defaultSlug: string, locale: string): string => {
|
|
|
8
8
|
'/website-builder': {
|
|
9
9
|
'de-DE': '/website-erstellen',
|
|
10
10
|
'fr-FR': '/createur-site-web',
|
|
11
|
+
'fr-CA': '/createur-site-web',
|
|
11
12
|
'es-ES': '/creador-paginas-web',
|
|
12
13
|
'pt-PT': '/criador-site',
|
|
14
|
+
'pt-BR': '/criador-site',
|
|
13
15
|
},
|
|
14
16
|
'/digital-business-card': {
|
|
15
17
|
'de-DE': '/digitale-visitenkarte',
|
|
16
18
|
'fr-FR': '/carte-de-visite-numerique',
|
|
19
|
+
'fr-CA': '/carte-de-visite-numerique',
|
|
17
20
|
'es-ES': '/tarjeta-de-visita-digital',
|
|
18
21
|
'pt-PT': '/cartao-de-visita-digital',
|
|
22
|
+
'pt-BR': '/cartao-de-visita-digital',
|
|
19
23
|
},
|
|
20
24
|
'/link-in-bio': {
|
|
21
25
|
'de-DE': '/link-in-bio',
|
|
22
26
|
'fr-FR': '/lien-en-bio',
|
|
27
|
+
'fr-CA': '/lien-en-bio',
|
|
23
28
|
'es-ES': '/link-en-bio',
|
|
24
29
|
'pt-PT': '/link-na-bio',
|
|
30
|
+
'pt-BR': '/link-na-bio',
|
|
25
31
|
},
|
|
26
32
|
};
|
|
27
33
|
|