@designcrowd/library.brand-page 5.16.0 → 5.16.2-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-DqoHzxXx.js → CreatedOnBrandCrowd-de-de-BTQjYiwH.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-BmtA8uCU.js → CreatedOnBrandCrowd-en-us-DzswEvvL.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-D1cIlk-E.js → CreatedOnBrandCrowd-es-es-DPCSqIpT.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-C_v_2nKA.js → CreatedOnBrandCrowd-fr-ca-CZ29VWa6.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-C_v_2nKA.js → CreatedOnBrandCrowd-fr-fr-CZ29VWa6.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-Bg05a8ef.js → CreatedOnBrandCrowd-pt-br-Da_WGhKg.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-Bg05a8ef.js → CreatedOnBrandCrowd-pt-pt-Da_WGhKg.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-BuZW8uEb.js → CreatedOnDcom-de-de-blHR4WbT.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-DKNTU2Em.js → CreatedOnDcom-en-us-fRN0Ox2R.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-BrEOCA3u.js → CreatedOnDcom-es-es-afLu2Y1A.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-BlqNBDRR.js → CreatedOnDcom-fr-ca-fvpFoGkr.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-CPXKbL_j.js → CreatedOnDcom-fr-fr-CEnbchMK.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-CwiIOKS2.js → CreatedOnDcom-pt-br-B0QuvNvD.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-BIGL3yHI.js → CreatedOnDcom-pt-pt-Cg-reIwt.js} +1 -1
- package/lib/src/brand-page/utils/migration/migration-07.js +1 -1
- package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +3 -0
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +4 -0
- package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.d.ts +3 -0
- package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +22 -0
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +243 -1
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.js +64 -4
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +9 -1
- package/lib/src/brand-page-maker/stores/route/localised-route-store.d.ts +23 -0
- package/lib/src/brand-page-maker/stores/route/localised-route-store.js +16 -0
- package/lib/src/brand-page-maker/stores/user/user-store.d.ts +4 -0
- package/lib/src/brand-page-maker/stores/user/user-store.js +4 -0
- package/lib/src/clients/design-template-client.d.ts +1 -0
- package/lib/src/clients/models.d.ts +1 -0
- package/lib/src/css/library.brand-page-brandCrowd.min.css +46 -21
- package/lib/src/css/library.brand-page-brandPage.min.css +46 -21
- package/lib/src/css/library.brand-page-designCom.min.css +46 -21
- package/lib/src/css/library.brand-page-preview.min.css +46 -21
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-BmBek0uR.js → lib-xSt_yR6c.js} +13276 -13165
- package/lib/src/shared/background-settings/components/background-shapes/BackgroundShapeSettings.mixin.d.ts +3 -0
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +3 -0
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +3 -0
- package/lib/src/shared/content-settings/components/page-dropdown-field/PageDropdownField.mixin.d.ts +3 -0
- package/lib/src/shared/page-settings/components/delete-page-modal/DeletePageModal.mixin.d.ts +1 -1
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +3 -0
- package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +3 -0
- package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +3 -0
- package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.d.ts +1 -0
- package/lib/src/shared/template-settings/models.d.ts +2 -0
- package/lib/src/shared/template-settings/store/template-settings-store.d.ts +5 -0
- package/lib/src/shared/template-settings/store/template-settings-store.js +74 -8
- package/package.json +1 -1
- package/src/brand-page/components/media/Shape.vue +1 -1
- package/src/brand-page/components/media/Video.vue +14 -13
- package/src/brand-page/components/page/Page.vue +2 -2
- package/src/brand-page/utils/migration/migration-07.ts +6 -4
- package/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.ts +85 -5
- package/src/brand-page-maker/components/template-preview/TemplatePreview.vue +41 -4
- package/src/brand-page-maker/components/template-preview-with-state/TemplatePreviewWithState.vue +4 -6
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +14 -1
- package/src/brand-page-maker/stores/route/localised-route-store.ts +33 -0
- package/src/brand-page-maker/stores/user/user-store.ts +5 -0
- package/src/clients/design-template-client.ts +1 -0
- package/src/clients/models.ts +1 -0
- package/src/shared/template-settings/models.ts +2 -0
- package/src/shared/template-settings/store/template-settings-store.ts +105 -14
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BRAND_PAGE_TYPES, DEFAULT_LOGO_HEIGHT, DEFAULT_LOGO_WIDTH,
|
|
1
|
+
import { BRAND_PAGE_TYPES, DEFAULT_LOGO_HEIGHT, DEFAULT_LOGO_WIDTH, } from '../..';
|
|
2
2
|
import { FabricRenderClient } from '../../../clients/fabric-render-client';
|
|
3
3
|
import { calculateLogoDimensions } from '../logo.util';
|
|
4
4
|
export const migration07 = async (migrationResult, options) => {
|
|
@@ -11,6 +11,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
11
11
|
isAdmin: boolean;
|
|
12
12
|
}): void;
|
|
13
13
|
setBrandPageCommissionPercentage(payload: number): void;
|
|
14
|
+
setUserToken(payload: {
|
|
15
|
+
userToken: string;
|
|
16
|
+
}): void;
|
|
14
17
|
}>;
|
|
15
18
|
brandPageMakerStore: import("pinia").Store<"brandPageMaker", import("../../stores").BrandPageMakerState, {
|
|
16
19
|
contentErrorCount(): number;
|
|
@@ -197,6 +197,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
197
197
|
isAdmin: boolean;
|
|
198
198
|
}): void;
|
|
199
199
|
setBrandPageCommissionPercentage(payload: number): void;
|
|
200
|
+
setUserToken(payload: {
|
|
201
|
+
userToken: string;
|
|
202
|
+
}): void;
|
|
200
203
|
}>;
|
|
201
204
|
containerStore: import("pinia").Store<"brandPageContainer", import("../../stores").BrandPageContainerState, {
|
|
202
205
|
brandPageContentTypes(): string[];
|
|
@@ -1021,6 +1024,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1021
1024
|
}): void;
|
|
1022
1025
|
clearTemplates(): void;
|
|
1023
1026
|
getTemplateByTemplateId(id: string): import("../../../shared/template-settings/models").TemplateSettingsTemplate | undefined;
|
|
1027
|
+
setupLogoChangeWatcher(): void;
|
|
1024
1028
|
}>;
|
|
1025
1029
|
shopSettingStore: import("pinia").Store<"shopConfig", import("../../../shared/ecommerce-settings/store/shop-settings-store").ShopConfigState, {
|
|
1026
1030
|
productsJson(state: {
|
|
@@ -143,6 +143,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
143
143
|
isAdmin: boolean;
|
|
144
144
|
}): void;
|
|
145
145
|
setBrandPageCommissionPercentage(payload: number): void;
|
|
146
|
+
setUserToken(payload: {
|
|
147
|
+
userToken: string;
|
|
148
|
+
}): void;
|
|
146
149
|
}>;
|
|
147
150
|
}, {
|
|
148
151
|
imageExtension: string[];
|
|
@@ -375,6 +375,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
375
375
|
currentPublishedSlugUrl: (state: {
|
|
376
376
|
baseFabricRenderDomain: string;
|
|
377
377
|
baseBrandPageDomain: string;
|
|
378
|
+
baseTemplatePreviewDomain: string;
|
|
378
379
|
upgradeSubscriptionUrlPath: string;
|
|
379
380
|
reactivationUrlPath: string;
|
|
380
381
|
backToWebsiteManageUrlPath: string;
|
|
@@ -393,6 +394,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
393
394
|
currentBrandPageUrl: (state: {
|
|
394
395
|
baseFabricRenderDomain: string;
|
|
395
396
|
baseBrandPageDomain: string;
|
|
397
|
+
baseTemplatePreviewDomain: string;
|
|
396
398
|
upgradeSubscriptionUrlPath: string;
|
|
397
399
|
reactivationUrlPath: string;
|
|
398
400
|
backToWebsiteManageUrlPath: string;
|
|
@@ -412,6 +414,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
412
414
|
getBuilderLandingPageByTypeUrl: (state: {
|
|
413
415
|
baseFabricRenderDomain: string;
|
|
414
416
|
baseBrandPageDomain: string;
|
|
417
|
+
baseTemplatePreviewDomain: string;
|
|
415
418
|
upgradeSubscriptionUrlPath: string;
|
|
416
419
|
reactivationUrlPath: string;
|
|
417
420
|
backToWebsiteManageUrlPath: string;
|
|
@@ -428,6 +431,25 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
428
431
|
localisedBaseUrl: string;
|
|
429
432
|
} & import("pinia").PiniaCustomStateProperties<import("../../stores").LocalisedRouteState>) => (isPreview: boolean, brandPageType: string, isDesignCom: boolean, locale: string) => string;
|
|
430
433
|
getWebsiteBaseUrl: () => (isDesignCom: boolean) => "https://www.design.com" | "https://www.brandcrowd.com";
|
|
434
|
+
getTemplatePreviewUrl: (state: {
|
|
435
|
+
baseFabricRenderDomain: string;
|
|
436
|
+
baseBrandPageDomain: string;
|
|
437
|
+
baseTemplatePreviewDomain: string;
|
|
438
|
+
upgradeSubscriptionUrlPath: string;
|
|
439
|
+
reactivationUrlPath: string;
|
|
440
|
+
backToWebsiteManageUrlPath: string;
|
|
441
|
+
manageWebsiteDesignsUrlPath: string;
|
|
442
|
+
createNewDesignUrlPath: string;
|
|
443
|
+
termsOfUseUrlPath: string;
|
|
444
|
+
websiteBuilderUrlPath: string;
|
|
445
|
+
digitalBusinessCardBuilderUrlPath: string;
|
|
446
|
+
linkInBioBuilderUrlPath: string;
|
|
447
|
+
brandPageEditorUrlPath: string;
|
|
448
|
+
brandSiteEditorUrlPath: string;
|
|
449
|
+
brandContactEditorUrlPath: string;
|
|
450
|
+
logoEditUrlPath: string;
|
|
451
|
+
localisedBaseUrl: string;
|
|
452
|
+
} & import("pinia").PiniaCustomStateProperties<import("../../stores").LocalisedRouteState>) => (templateId: string, logoDraftToken: string, deviceType: "desktop" | "mobile", contentKey?: string | undefined, userToken?: string | undefined, runtimeEnvironment?: string | undefined, isAiTemplate?: boolean | undefined) => string;
|
|
431
453
|
}, {
|
|
432
454
|
initialise(payload: any): void;
|
|
433
455
|
}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="types/lodash-shims" />
|
|
2
2
|
import type { PropType } from 'vue';
|
|
3
3
|
import type { BrandPageContext, BrandPageViewModel, LogoImageModel, LogoTemplateImageModel, LogoTheme, UserPersonalisation } from '../../../brand-page';
|
|
4
|
-
import type
|
|
4
|
+
import { type TemplateSettingsTemplate } from '../../../shared/template-settings/models';
|
|
5
5
|
import type { DebounceHandle } from 'lodash.debounce';
|
|
6
6
|
interface TemplatePreviewData {
|
|
7
7
|
containerStyle: BrandPageCssStyle;
|
|
@@ -15,6 +15,8 @@ interface TemplatePreviewData {
|
|
|
15
15
|
renderHeight: number;
|
|
16
16
|
renderWidth: number;
|
|
17
17
|
rootStyles: BrandPageCssStyle;
|
|
18
|
+
imageLoadError: boolean;
|
|
19
|
+
imageLoading: boolean;
|
|
18
20
|
}
|
|
19
21
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
20
22
|
logoImage: {
|
|
@@ -61,6 +63,242 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
61
63
|
};
|
|
62
64
|
}>, {
|
|
63
65
|
selectedTemplateId: import("vue").ComputedRef<string | false>;
|
|
66
|
+
isPrePurchase: import("vue").ComputedRef<boolean>;
|
|
67
|
+
runtimeEnvironment: import("vue").ComputedRef<string>;
|
|
68
|
+
isAdmin: import("vue").ComputedRef<boolean>;
|
|
69
|
+
userToken: import("vue").ComputedRef<string | undefined>;
|
|
70
|
+
isBrandSite: import("vue").ComputedRef<boolean>;
|
|
71
|
+
selectedTab: import("vue").ComputedRef<string>;
|
|
72
|
+
brandPageMakerUserStore: import("pinia").Store<"brandPageMakerUser", import("../../stores").UserState, {}, {
|
|
73
|
+
setEmailAddress(payload: string): void;
|
|
74
|
+
setFeatures(payload: Partial<import("../../../constants/ui").UIUserFeatures>): void;
|
|
75
|
+
setHasBrandPagePremiumSubscription(payload: boolean): void;
|
|
76
|
+
setIsAdmin(payload: {
|
|
77
|
+
isAdmin: boolean;
|
|
78
|
+
}): void;
|
|
79
|
+
setBrandPageCommissionPercentage(payload: number): void;
|
|
80
|
+
setUserToken(payload: {
|
|
81
|
+
userToken: string;
|
|
82
|
+
}): void;
|
|
83
|
+
}>;
|
|
84
|
+
brandPageContainerStore: import("pinia").Store<"brandPageContainer", import("../../stores").BrandPageContainerState, {
|
|
85
|
+
brandPageContentTypes(): string[];
|
|
86
|
+
isAdmin(): boolean;
|
|
87
|
+
isPublished: (state: {
|
|
88
|
+
availableTaxes: any[];
|
|
89
|
+
brandPageBaseUrl: string;
|
|
90
|
+
baseFabricRenderUrl: string;
|
|
91
|
+
brandPageDescription: string;
|
|
92
|
+
brandPageDisplayName: string;
|
|
93
|
+
sensitiveContent: number;
|
|
94
|
+
brandPageSlug: string;
|
|
95
|
+
brandPageStatus: string;
|
|
96
|
+
brandPageToken: string | undefined;
|
|
97
|
+
brandPageTitle: string;
|
|
98
|
+
customDomain: {
|
|
99
|
+
id: string;
|
|
100
|
+
created: Date;
|
|
101
|
+
updated: Date;
|
|
102
|
+
brandPageToken: string;
|
|
103
|
+
domainName: string;
|
|
104
|
+
status: "active" | "pending" | "failed" | "renewFailed" | "deleted";
|
|
105
|
+
dnsConfigurationStatus: "request_expired" | "missing_expected_dns_records" | "invalid_multiple_dns_records_exist" | "unexpected_aaaa_record" | "completed";
|
|
106
|
+
triggerOrigin?: string | undefined;
|
|
107
|
+
} | null;
|
|
108
|
+
createCustomDomainErrorMessage: string | null;
|
|
109
|
+
customDomainConfig?: {
|
|
110
|
+
dns: {
|
|
111
|
+
ipAddresses: string[];
|
|
112
|
+
};
|
|
113
|
+
} | undefined;
|
|
114
|
+
designDraftToken?: string | undefined;
|
|
115
|
+
designTemplateToken: string;
|
|
116
|
+
isCustomDomainEnabled: boolean;
|
|
117
|
+
isBrandPageSlugEditMode: boolean;
|
|
118
|
+
isPublishModalVisible: boolean;
|
|
119
|
+
isUpgradeModalVisible: boolean;
|
|
120
|
+
isPublishing: boolean;
|
|
121
|
+
isProduction: boolean;
|
|
122
|
+
isSellDomainNameEnabled: boolean;
|
|
123
|
+
isStripeOnboardingModalVisible: boolean;
|
|
124
|
+
isReactivationModal: boolean;
|
|
125
|
+
isPublishUpgradeModal: boolean;
|
|
126
|
+
isSaving: boolean;
|
|
127
|
+
backButtonLabel: string;
|
|
128
|
+
manageWebsiteDesignsUrl: string;
|
|
129
|
+
publishErrorMessage: string;
|
|
130
|
+
upgradeUrl: string;
|
|
131
|
+
reactivationUrl: string;
|
|
132
|
+
runtimeEnvironment: string;
|
|
133
|
+
selectedTaxId: number | undefined;
|
|
134
|
+
slug: string;
|
|
135
|
+
standalone: boolean;
|
|
136
|
+
triggerSaveSuccessMessage: boolean;
|
|
137
|
+
isDesignCom: boolean;
|
|
138
|
+
isPrePurchase: boolean;
|
|
139
|
+
makerFonts: any[];
|
|
140
|
+
eventButtonLocation?: string | undefined;
|
|
141
|
+
websiteUpsellModalViewModel?: any;
|
|
142
|
+
showPublishOptionModal?: boolean | undefined;
|
|
143
|
+
abTests: Record<string, string>;
|
|
144
|
+
isSubsequentPublish: boolean;
|
|
145
|
+
} & import("pinia").PiniaCustomStateProperties<import("../../stores").BrandPageContainerState>) => boolean;
|
|
146
|
+
isUserDraft: (state: {
|
|
147
|
+
availableTaxes: any[];
|
|
148
|
+
brandPageBaseUrl: string;
|
|
149
|
+
baseFabricRenderUrl: string;
|
|
150
|
+
brandPageDescription: string;
|
|
151
|
+
brandPageDisplayName: string;
|
|
152
|
+
sensitiveContent: number;
|
|
153
|
+
brandPageSlug: string;
|
|
154
|
+
brandPageStatus: string;
|
|
155
|
+
brandPageToken: string | undefined;
|
|
156
|
+
brandPageTitle: string;
|
|
157
|
+
customDomain: {
|
|
158
|
+
id: string;
|
|
159
|
+
created: Date;
|
|
160
|
+
updated: Date;
|
|
161
|
+
brandPageToken: string;
|
|
162
|
+
domainName: string;
|
|
163
|
+
status: "active" | "pending" | "failed" | "renewFailed" | "deleted";
|
|
164
|
+
dnsConfigurationStatus: "request_expired" | "missing_expected_dns_records" | "invalid_multiple_dns_records_exist" | "unexpected_aaaa_record" | "completed";
|
|
165
|
+
triggerOrigin?: string | undefined;
|
|
166
|
+
} | null;
|
|
167
|
+
createCustomDomainErrorMessage: string | null;
|
|
168
|
+
customDomainConfig?: {
|
|
169
|
+
dns: {
|
|
170
|
+
ipAddresses: string[];
|
|
171
|
+
};
|
|
172
|
+
} | undefined;
|
|
173
|
+
designDraftToken?: string | undefined;
|
|
174
|
+
designTemplateToken: string;
|
|
175
|
+
isCustomDomainEnabled: boolean;
|
|
176
|
+
isBrandPageSlugEditMode: boolean;
|
|
177
|
+
isPublishModalVisible: boolean;
|
|
178
|
+
isUpgradeModalVisible: boolean;
|
|
179
|
+
isPublishing: boolean;
|
|
180
|
+
isProduction: boolean;
|
|
181
|
+
isSellDomainNameEnabled: boolean;
|
|
182
|
+
isStripeOnboardingModalVisible: boolean;
|
|
183
|
+
isReactivationModal: boolean;
|
|
184
|
+
isPublishUpgradeModal: boolean;
|
|
185
|
+
isSaving: boolean;
|
|
186
|
+
backButtonLabel: string;
|
|
187
|
+
manageWebsiteDesignsUrl: string;
|
|
188
|
+
publishErrorMessage: string;
|
|
189
|
+
upgradeUrl: string;
|
|
190
|
+
reactivationUrl: string;
|
|
191
|
+
runtimeEnvironment: string;
|
|
192
|
+
selectedTaxId: number | undefined;
|
|
193
|
+
slug: string;
|
|
194
|
+
standalone: boolean;
|
|
195
|
+
triggerSaveSuccessMessage: boolean;
|
|
196
|
+
isDesignCom: boolean;
|
|
197
|
+
isPrePurchase: boolean;
|
|
198
|
+
makerFonts: any[];
|
|
199
|
+
eventButtonLocation?: string | undefined;
|
|
200
|
+
websiteUpsellModalViewModel?: any;
|
|
201
|
+
showPublishOptionModal?: boolean | undefined;
|
|
202
|
+
abTests: Record<string, string>;
|
|
203
|
+
isSubsequentPublish: boolean;
|
|
204
|
+
} & import("pinia").PiniaCustomStateProperties<import("../../stores").BrandPageContainerState>) => boolean;
|
|
205
|
+
}, {
|
|
206
|
+
initialise(payload: import("../../stores/brandpage-container").InitialisePayload): void;
|
|
207
|
+
setDesignTemplateToken(payload: any): void;
|
|
208
|
+
setDesignDraftToken(payload: any): void;
|
|
209
|
+
setIsBrandPageSlugEditMode(payload: any): void;
|
|
210
|
+
setIsPublishing(payload: any): void;
|
|
211
|
+
setIsPublishModalVisible(payload: any): void;
|
|
212
|
+
setIsPublishUpgradeModal(payload: any): void;
|
|
213
|
+
setIsSaving(payload: any): void;
|
|
214
|
+
setIsUpgradeModalVisible(payload: any): void;
|
|
215
|
+
setPublishErrorMessage(payload: any): void;
|
|
216
|
+
setTriggerSaveSuccessMessage(payload: any): void;
|
|
217
|
+
setSlug(payload: any): void;
|
|
218
|
+
updateBrandPageMeta(payload: any): void;
|
|
219
|
+
updateBrandPageSensitiveContent(payload: any): void;
|
|
220
|
+
setLogoDraftToken(payload: {
|
|
221
|
+
logoDraftToken: string;
|
|
222
|
+
}): void;
|
|
223
|
+
setBackUrl(payload: any): void;
|
|
224
|
+
setIsStripeOnboardingModalVisible(payload: any): void;
|
|
225
|
+
setSelectedTaxId(payload: any): void;
|
|
226
|
+
setBrandPageCustomDomainConfig({ customDomainConfig }: {
|
|
227
|
+
customDomainConfig: any;
|
|
228
|
+
}): void;
|
|
229
|
+
setBrandPageCustomDomain(payload: {
|
|
230
|
+
customDomain: import("../../models").CustomDomainModel | null;
|
|
231
|
+
}): void;
|
|
232
|
+
setCreateCustomDomainErrorMessage(payload: any): void;
|
|
233
|
+
setBrandPageIsCustomDomainEnabled(payload: any): void;
|
|
234
|
+
setIsSubsequentPublish(payload: any): void;
|
|
235
|
+
clearPublishErrorMessage(): void;
|
|
236
|
+
closePublishModal(payload?: {
|
|
237
|
+
skipShowNextNotificationMessage?: boolean | undefined;
|
|
238
|
+
}): Promise<void>;
|
|
239
|
+
closeUpgradeModal(): Promise<void>;
|
|
240
|
+
endBrandPageSlugEditMode(): void;
|
|
241
|
+
publishBrandPage({ shouldPublish, slug }: {
|
|
242
|
+
shouldPublish: any;
|
|
243
|
+
slug: any;
|
|
244
|
+
}): Promise<false | {
|
|
245
|
+
success: boolean;
|
|
246
|
+
websiteUpsellModalViewModel: any;
|
|
247
|
+
}>;
|
|
248
|
+
publishBrandPageWithCustomDomainAsync({ shouldPublish, slug, domain, isPurchasedDomain, }: {
|
|
249
|
+
shouldPublish: any;
|
|
250
|
+
slug: any;
|
|
251
|
+
domain: any;
|
|
252
|
+
isPurchasedDomain: any;
|
|
253
|
+
}): Promise<boolean | undefined>;
|
|
254
|
+
checkWebsiteSlugAsync(slug: string): Promise<import("../../models/api.model").WebsiteSlugCheckResponse | null>;
|
|
255
|
+
redirectToLogoEditPage(logoEditUrl: string, locale: string): Promise<void>;
|
|
256
|
+
redirectToCreateNewDesignPage(): Promise<void>;
|
|
257
|
+
redirectToStripeOnboarding(): Promise<void>;
|
|
258
|
+
exportDesignAsync(): Promise<any>;
|
|
259
|
+
saveBrandPage(payload?: {
|
|
260
|
+
isPublish?: boolean | undefined;
|
|
261
|
+
eventButtonLocation?: string | undefined;
|
|
262
|
+
}): Promise<false | {
|
|
263
|
+
saved: boolean;
|
|
264
|
+
canPublish: boolean;
|
|
265
|
+
websiteUpsellModalViewModel: any;
|
|
266
|
+
}>;
|
|
267
|
+
saveAndPublishBrandPage(eventButtonLocation: string): Promise<void>;
|
|
268
|
+
saveTemplate(): Promise<void>;
|
|
269
|
+
setBrandPageStatus(status: any): Promise<void>;
|
|
270
|
+
showPublishModal(eventButtonLocation?: string | undefined, websiteUpsellModalViewModel?: any, isSubsequentPublish?: boolean | undefined): void;
|
|
271
|
+
showBrandPageSlugEditModal(eventButtonLocation: string): Promise<void>;
|
|
272
|
+
showUpgradeModalAndSaveAsync(): Promise<void>;
|
|
273
|
+
showStripeOnboardingModal(): void;
|
|
274
|
+
closeStripeOnboardingModal(): void;
|
|
275
|
+
showSaveSuccessMessage(): Promise<void>;
|
|
276
|
+
startBrandPageSlugEditMode(): void;
|
|
277
|
+
triggerLockedContentClickedEvent(contentType: string): Promise<void>;
|
|
278
|
+
unpublishBrandPage(): Promise<void>;
|
|
279
|
+
updateBrandPageSettings({ description, title }: {
|
|
280
|
+
description: any;
|
|
281
|
+
title: any;
|
|
282
|
+
}): Promise<void>;
|
|
283
|
+
updateSensitiveContent({ sensitiveContent }: {
|
|
284
|
+
sensitiveContent: any;
|
|
285
|
+
}): Promise<void>;
|
|
286
|
+
createBrandPageCustomDomain({ domainName }: {
|
|
287
|
+
domainName: any;
|
|
288
|
+
}): Promise<false | undefined>;
|
|
289
|
+
createBrandPageWithPurchasedDomain({ domainName }: {
|
|
290
|
+
domainName: any;
|
|
291
|
+
}): Promise<false | undefined>;
|
|
292
|
+
deleteBrandPageCustomDomain({ designDraftToken, customDomainId }: {
|
|
293
|
+
designDraftToken: any;
|
|
294
|
+
customDomainId: any;
|
|
295
|
+
}): Promise<void>;
|
|
296
|
+
refreshBrandPageCustomDomainConfig(): Promise<void>;
|
|
297
|
+
refreshBrandPageCustomDomain(): Promise<void>;
|
|
298
|
+
updateBrandPageIsCustomDomainEnabled({ isCustomDomainEnabled }: {
|
|
299
|
+
isCustomDomainEnabled: any;
|
|
300
|
+
}): Promise<void>;
|
|
301
|
+
}>;
|
|
64
302
|
brandPageMakerStore: import("pinia").Store<"brandPageMaker", import("../../stores").BrandPageMakerState, {
|
|
65
303
|
contentErrorCount(): number;
|
|
66
304
|
brandPageBaseUrl(): string;
|
|
@@ -194,10 +432,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
194
432
|
innerContainerStyle(): BrandPageCssStyle;
|
|
195
433
|
isPersonalisable(): boolean;
|
|
196
434
|
cssVariablesStyle(): Record<string, string>;
|
|
435
|
+
previewImageUrl(): string;
|
|
197
436
|
}, {
|
|
198
437
|
onOverlayClicked(): void;
|
|
199
438
|
onResize(): void;
|
|
200
439
|
onSetPreviewStyles(styles: BrandPageCssStyle): void;
|
|
440
|
+
onImageError(): void;
|
|
441
|
+
onImageLoad(): void;
|
|
442
|
+
regeneratePreview(): void;
|
|
201
443
|
updateViewModel(forceUpdate?: boolean): Promise<void>;
|
|
202
444
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "template-selected"[], "template-selected", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
203
445
|
logoImage: {
|
|
@@ -2,9 +2,11 @@ import { computed, defineComponent } from 'vue';
|
|
|
2
2
|
import { BRAND_PAGE_TYPES, MEDIA_SIZES, VIEWPORTS } from '../../../brand-page';
|
|
3
3
|
import { applyLogoThemeToBrandPageModel, applyUserPersonalisationToBrandPageModelAsync, getBrandPageViewModelFromBrandPageModel, } from '../../../brand-page/utils';
|
|
4
4
|
import { STYLE_THEME_KEYS } from '../../../brand-page/constants';
|
|
5
|
+
import { TEMPLATE_TABS, } from '../../../shared/template-settings/models';
|
|
5
6
|
import debounce from 'lodash.debounce';
|
|
6
7
|
import { MOBILE_HEIGHT, MOBILE_WIDTH } from '../../constants';
|
|
7
|
-
import { useBrandPageMakerStore } from '../../stores';
|
|
8
|
+
import { useBrandPageContainerStore, useBrandPageMakerStore, useBrandPageMakerUserStore, } from '../../stores';
|
|
9
|
+
import { useUiTemplateSettingsStore } from '../../../shared/template-settings/store';
|
|
8
10
|
import { applyLogoImageBase64UrlToBrandPageTemplateModel, applyLogoImageToBrandPageTemplateModel, applyLogoTemplateImageToBrandPageTemplateModel, } from '../../../brand-page/utils/logo.util';
|
|
9
11
|
import { useVideoStore } from '../../../lib';
|
|
10
12
|
const DEBOUNCE_IN_MS = 250;
|
|
@@ -12,8 +14,19 @@ export default defineComponent({
|
|
|
12
14
|
emits: ['template-selected'],
|
|
13
15
|
setup() {
|
|
14
16
|
const brandPageMakerStore = useBrandPageMakerStore();
|
|
17
|
+
const brandPageContainerStore = useBrandPageContainerStore();
|
|
18
|
+
const brandPageMakerUserStore = useBrandPageMakerUserStore();
|
|
19
|
+
const templateSettingsStore = useUiTemplateSettingsStore();
|
|
15
20
|
return {
|
|
16
21
|
selectedTemplateId: computed(() => brandPageMakerStore.selectedTemplateId),
|
|
22
|
+
isPrePurchase: computed(() => brandPageContainerStore.isPrePurchase),
|
|
23
|
+
runtimeEnvironment: computed(() => brandPageContainerStore.runtimeEnvironment),
|
|
24
|
+
isAdmin: computed(() => brandPageMakerUserStore.isAdmin),
|
|
25
|
+
userToken: computed(() => brandPageMakerUserStore.userToken),
|
|
26
|
+
isBrandSite: computed(() => brandPageMakerStore.brandPageType === BRAND_PAGE_TYPES.brandSite),
|
|
27
|
+
selectedTab: computed(() => templateSettingsStore.selectedTab.key),
|
|
28
|
+
brandPageMakerUserStore,
|
|
29
|
+
brandPageContainerStore,
|
|
17
30
|
brandPageMakerStore,
|
|
18
31
|
};
|
|
19
32
|
},
|
|
@@ -73,6 +86,8 @@ export default defineComponent({
|
|
|
73
86
|
renderWidth: 400,
|
|
74
87
|
rootStyles: {},
|
|
75
88
|
viewModel: undefined,
|
|
89
|
+
imageLoadError: false,
|
|
90
|
+
imageLoading: true,
|
|
76
91
|
};
|
|
77
92
|
return data;
|
|
78
93
|
},
|
|
@@ -147,16 +162,44 @@ export default defineComponent({
|
|
|
147
162
|
});
|
|
148
163
|
return cssVariables;
|
|
149
164
|
},
|
|
165
|
+
previewImageUrl() {
|
|
166
|
+
let previewImageUrl = this.template.previewImageUrl;
|
|
167
|
+
if (!previewImageUrl) {
|
|
168
|
+
return '';
|
|
169
|
+
}
|
|
170
|
+
if (this.selectedTab === TEMPLATE_TABS.AI &&
|
|
171
|
+
this.template.contentKey &&
|
|
172
|
+
this.userToken) {
|
|
173
|
+
previewImageUrl += `&contentKey=${this.template.contentKey}&userToken=${this.userToken}`;
|
|
174
|
+
}
|
|
175
|
+
return previewImageUrl;
|
|
176
|
+
},
|
|
150
177
|
},
|
|
151
178
|
watch: {
|
|
179
|
+
template() {
|
|
180
|
+
if (this.isAdmin || this.isPrePurchase) {
|
|
181
|
+
this.updateViewModel();
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
// Reset loading state when template changes for image-based previews
|
|
185
|
+
this.imageLoading = true;
|
|
186
|
+
this.imageLoadError = false;
|
|
187
|
+
}
|
|
188
|
+
},
|
|
152
189
|
logoTheme: {
|
|
153
190
|
handler() {
|
|
154
|
-
this.
|
|
191
|
+
if (this.isAdmin || this.isPrePurchase) {
|
|
192
|
+
this.updateViewModel();
|
|
193
|
+
}
|
|
155
194
|
},
|
|
156
195
|
deep: true,
|
|
157
196
|
},
|
|
158
|
-
|
|
159
|
-
|
|
197
|
+
previewImageUrl() {
|
|
198
|
+
// Reset loading state whenever the preview URL changes
|
|
199
|
+
if (!this.isAdmin && !this.isPrePurchase) {
|
|
200
|
+
this.imageLoading = true;
|
|
201
|
+
this.imageLoadError = false;
|
|
202
|
+
}
|
|
160
203
|
},
|
|
161
204
|
},
|
|
162
205
|
created() {
|
|
@@ -197,7 +240,24 @@ export default defineComponent({
|
|
|
197
240
|
onSetPreviewStyles(styles) {
|
|
198
241
|
this.rootStyles = styles;
|
|
199
242
|
},
|
|
243
|
+
onImageError() {
|
|
244
|
+
this.imageLoadError = true;
|
|
245
|
+
this.imageLoading = false;
|
|
246
|
+
},
|
|
247
|
+
onImageLoad() {
|
|
248
|
+
this.imageLoadError = false;
|
|
249
|
+
this.imageLoading = false;
|
|
250
|
+
},
|
|
251
|
+
regeneratePreview() {
|
|
252
|
+
this.imageLoadError = false;
|
|
253
|
+
this.imageLoading = true;
|
|
254
|
+
this.$forceUpdate();
|
|
255
|
+
},
|
|
200
256
|
async updateViewModel(forceUpdate = true) {
|
|
257
|
+
// Only update view model for admin or pre-purchase mode
|
|
258
|
+
if (!this.isAdmin && !this.isPrePurchase) {
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
201
261
|
const videoStore = useVideoStore();
|
|
202
262
|
let model = this.template.brandPageModel;
|
|
203
263
|
if (this.logoImageBase64Url) {
|
|
@@ -178,13 +178,21 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
178
178
|
if (!this.selectedTemplateId) {
|
|
179
179
|
return;
|
|
180
180
|
}
|
|
181
|
-
|
|
181
|
+
let template = templateSettingsStore.getTemplateByTemplateId(this.selectedTemplateId);
|
|
182
182
|
if (!template) {
|
|
183
183
|
if (process.env.NODE_ENV !== 'production') {
|
|
184
184
|
throw new Error('template should not be falsy');
|
|
185
185
|
}
|
|
186
186
|
return;
|
|
187
187
|
}
|
|
188
|
+
// If template doesn't have brandPageModel (post-purchase mode), fetch it
|
|
189
|
+
if (!template.brandPageModel) {
|
|
190
|
+
template = await templateSettingsStore.getCachedTemplateByTokenAsync(this.selectedTemplateId);
|
|
191
|
+
}
|
|
192
|
+
if (!template?.brandPageModel) {
|
|
193
|
+
console.error('Failed to fetch template brandPageModel');
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
188
196
|
this.isApplyingTemplate = true;
|
|
189
197
|
let brandPageModel = cloneDeep(template.brandPageModel);
|
|
190
198
|
// Apply selected logo image to logo contents
|