@designcrowd/library.brand-page 5.15.25 → 5.15.26-ast-preview
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-II5HBA2z.js → CreatedOnBrandCrowd-de-de-BEhfxDj-.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-BF3gSGSu.js → CreatedOnBrandCrowd-en-us-DV6md3SA.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-DXFd6CGi.js → CreatedOnBrandCrowd-es-es-D0i3_YsG.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-B9A4Krk4.js → CreatedOnBrandCrowd-fr-ca-CZ5qsZe9.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-B9A4Krk4.js → CreatedOnBrandCrowd-fr-fr-CZ5qsZe9.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-QHQIFute.js → CreatedOnBrandCrowd-pt-br-B2srpeD5.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-QHQIFute.js → CreatedOnBrandCrowd-pt-pt-B2srpeD5.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-BeHh2527.js → CreatedOnDcom-de-de-oIM2N1MF.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-DcoYNExT.js → CreatedOnDcom-en-us-LuSMKoOZ.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-B8ocvVj7.js → CreatedOnDcom-es-es-BKwvnGm0.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-Cek7nR7V.js → CreatedOnDcom-fr-ca-DnoStomx.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-PBCtuU_L.js → CreatedOnDcom-fr-fr-BtZJGcS8.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-DrkBhslC.js → CreatedOnDcom-pt-br-xeQ4MrsO.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-DN_QMD7Z.js → CreatedOnDcom-pt-pt-BPBOZ2ls.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 +3 -0
- package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.d.ts +3 -0
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +0 -228
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.js +5 -48
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +1 -11
- 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/css/library.brand-page-brandCrowd.min.css +19 -43
- package/lib/src/css/library.brand-page-brandPage.min.css +19 -43
- package/lib/src/css/library.brand-page-designCom.min.css +19 -43
- package/lib/src/css/library.brand-page-preview.min.css +19 -43
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-Ib4Ean0k.js → lib-4pVKFboM.js} +2328 -2393
- 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/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/store/template-settings-store.js +5 -18
- package/package.json +1 -1
- package/src/brand-page/components/page/Page.vue +2 -2
- package/src/brand-page/utils/migration/migration-07.ts +4 -6
- package/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.ts +5 -69
- package/src/brand-page-maker/components/template-preview/TemplatePreview.vue +4 -42
- package/src/brand-page-maker/components/template-preview-with-state/TemplatePreviewWithState.vue +6 -4
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +1 -16
- package/src/brand-page-maker/stores/user/user-store.ts +5 -0
- package/src/shared/template-settings/store/template-settings-store.ts +14 -27
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BRAND_PAGE_TYPES, DEFAULT_LOGO_HEIGHT, DEFAULT_LOGO_WIDTH, } from '../..';
|
|
1
|
+
import { BRAND_PAGE_TYPES, DEFAULT_LOGO_HEIGHT, DEFAULT_LOGO_WIDTH, PageFooterDesktop, PageFooterMobile, PageHeaderDesktop, PageHeaderMobile, } 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
|
+
setUserId(payload: {
|
|
15
|
+
userId: string;
|
|
16
|
+
}): void;
|
|
14
17
|
}>;
|
|
15
18
|
brandPageMakerStore: import("pinia").Store<"brandPageMaker", import("../../stores").BrandPageMakerState, {
|
|
16
19
|
contentErrorCount(): number;
|
|
@@ -195,6 +195,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
195
195
|
isAdmin: boolean;
|
|
196
196
|
}): void;
|
|
197
197
|
setBrandPageCommissionPercentage(payload: number): void;
|
|
198
|
+
setUserId(payload: {
|
|
199
|
+
userId: string;
|
|
200
|
+
}): void;
|
|
198
201
|
}>;
|
|
199
202
|
containerStore: import("pinia").Store<"brandPageContainer", import("../../stores").BrandPageContainerState, {
|
|
200
203
|
brandPageContentTypes(): string[];
|
|
@@ -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
|
+
setUserId(payload: {
|
|
147
|
+
userId: string;
|
|
148
|
+
}): void;
|
|
146
149
|
}>;
|
|
147
150
|
}, {
|
|
148
151
|
imageExtension: string[];
|
|
@@ -15,8 +15,6 @@ interface TemplatePreviewData {
|
|
|
15
15
|
renderHeight: number;
|
|
16
16
|
renderWidth: number;
|
|
17
17
|
rootStyles: BrandPageCssStyle;
|
|
18
|
-
imageLoadError: boolean;
|
|
19
|
-
imageLoading: boolean;
|
|
20
18
|
}
|
|
21
19
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
22
20
|
logoImage: {
|
|
@@ -63,8 +61,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
63
61
|
};
|
|
64
62
|
}>, {
|
|
65
63
|
selectedTemplateId: import("vue").ComputedRef<string | false>;
|
|
66
|
-
isPrePurchase: import("vue").ComputedRef<boolean>;
|
|
67
|
-
runtimeEnvironment: import("vue").ComputedRef<string>;
|
|
68
64
|
brandPageMakerStore: import("pinia").Store<"brandPageMaker", import("../../stores").BrandPageMakerState, {
|
|
69
65
|
contentErrorCount(): number;
|
|
70
66
|
brandPageBaseUrl(): string;
|
|
@@ -191,224 +187,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
191
187
|
showStripeOnboardingModal(): Promise<void>;
|
|
192
188
|
selectInitialCategories(payload: import("../../../shared/template-settings/models").InitialCategories): void;
|
|
193
189
|
}>;
|
|
194
|
-
brandPageContainerStore: import("pinia").Store<"brandPageContainer", import("../../stores").BrandPageContainerState, {
|
|
195
|
-
brandPageContentTypes(): string[];
|
|
196
|
-
isAdmin(): boolean;
|
|
197
|
-
isPublished: (state: {
|
|
198
|
-
availableTaxes: any[];
|
|
199
|
-
brandPageBaseUrl: string;
|
|
200
|
-
baseFabricRenderUrl: string;
|
|
201
|
-
brandPageDescription: string;
|
|
202
|
-
brandPageDisplayName: string;
|
|
203
|
-
sensitiveContent: number;
|
|
204
|
-
brandPageSlug: string;
|
|
205
|
-
brandPageStatus: string;
|
|
206
|
-
brandPageToken: string | undefined;
|
|
207
|
-
brandPageTitle: string;
|
|
208
|
-
customDomain: {
|
|
209
|
-
id: string;
|
|
210
|
-
created: Date;
|
|
211
|
-
updated: Date;
|
|
212
|
-
brandPageToken: string;
|
|
213
|
-
domainName: string;
|
|
214
|
-
status: "active" | "pending" | "failed" | "renewFailed" | "deleted";
|
|
215
|
-
dnsConfigurationStatus: "request_expired" | "missing_expected_dns_records" | "invalid_multiple_dns_records_exist" | "unexpected_aaaa_record" | "completed";
|
|
216
|
-
triggerOrigin?: string | undefined;
|
|
217
|
-
} | null;
|
|
218
|
-
createCustomDomainErrorMessage: string | null;
|
|
219
|
-
customDomainConfig?: {
|
|
220
|
-
dns: {
|
|
221
|
-
ipAddresses: string[];
|
|
222
|
-
};
|
|
223
|
-
} | undefined;
|
|
224
|
-
designDraftToken?: string | undefined;
|
|
225
|
-
designTemplateToken: string;
|
|
226
|
-
isCustomDomainEnabled: boolean;
|
|
227
|
-
isBrandPageSlugEditMode: boolean;
|
|
228
|
-
isPublishModalVisible: boolean;
|
|
229
|
-
isUpgradeModalVisible: boolean;
|
|
230
|
-
isPublishing: boolean;
|
|
231
|
-
isProduction: boolean;
|
|
232
|
-
isSellDomainNameEnabled: boolean;
|
|
233
|
-
isStripeOnboardingModalVisible: boolean;
|
|
234
|
-
isReactivationModal: boolean;
|
|
235
|
-
isPublishUpgradeModal: boolean;
|
|
236
|
-
isSaving: boolean;
|
|
237
|
-
backButtonLabel: string;
|
|
238
|
-
manageWebsiteDesignsUrl: string;
|
|
239
|
-
publishErrorMessage: string;
|
|
240
|
-
upgradeUrl: string;
|
|
241
|
-
reactivationUrl: string;
|
|
242
|
-
runtimeEnvironment: string;
|
|
243
|
-
selectedTaxId: number | undefined;
|
|
244
|
-
slug: string;
|
|
245
|
-
standalone: boolean;
|
|
246
|
-
triggerSaveSuccessMessage: boolean;
|
|
247
|
-
isDesignCom: boolean;
|
|
248
|
-
isPrePurchase: boolean;
|
|
249
|
-
makerFonts: any[];
|
|
250
|
-
eventButtonLocation?: string | undefined;
|
|
251
|
-
websiteUpsellModalViewModel?: any;
|
|
252
|
-
showPublishOptionModal?: boolean | undefined;
|
|
253
|
-
abTests: Record<string, string>;
|
|
254
|
-
isSubsequentPublish: boolean;
|
|
255
|
-
} & import("pinia").PiniaCustomStateProperties<import("../../stores").BrandPageContainerState>) => boolean;
|
|
256
|
-
isUserDraft: (state: {
|
|
257
|
-
availableTaxes: any[];
|
|
258
|
-
brandPageBaseUrl: string;
|
|
259
|
-
baseFabricRenderUrl: string;
|
|
260
|
-
brandPageDescription: string;
|
|
261
|
-
brandPageDisplayName: string;
|
|
262
|
-
sensitiveContent: number;
|
|
263
|
-
brandPageSlug: string;
|
|
264
|
-
brandPageStatus: string;
|
|
265
|
-
brandPageToken: string | undefined;
|
|
266
|
-
brandPageTitle: string;
|
|
267
|
-
customDomain: {
|
|
268
|
-
id: string;
|
|
269
|
-
created: Date;
|
|
270
|
-
updated: Date;
|
|
271
|
-
brandPageToken: string;
|
|
272
|
-
domainName: string;
|
|
273
|
-
status: "active" | "pending" | "failed" | "renewFailed" | "deleted";
|
|
274
|
-
dnsConfigurationStatus: "request_expired" | "missing_expected_dns_records" | "invalid_multiple_dns_records_exist" | "unexpected_aaaa_record" | "completed";
|
|
275
|
-
triggerOrigin?: string | undefined;
|
|
276
|
-
} | null;
|
|
277
|
-
createCustomDomainErrorMessage: string | null;
|
|
278
|
-
customDomainConfig?: {
|
|
279
|
-
dns: {
|
|
280
|
-
ipAddresses: string[];
|
|
281
|
-
};
|
|
282
|
-
} | undefined;
|
|
283
|
-
designDraftToken?: string | undefined;
|
|
284
|
-
designTemplateToken: string;
|
|
285
|
-
isCustomDomainEnabled: boolean;
|
|
286
|
-
isBrandPageSlugEditMode: boolean;
|
|
287
|
-
isPublishModalVisible: boolean;
|
|
288
|
-
isUpgradeModalVisible: boolean;
|
|
289
|
-
isPublishing: boolean;
|
|
290
|
-
isProduction: boolean;
|
|
291
|
-
isSellDomainNameEnabled: boolean;
|
|
292
|
-
isStripeOnboardingModalVisible: boolean;
|
|
293
|
-
isReactivationModal: boolean;
|
|
294
|
-
isPublishUpgradeModal: boolean;
|
|
295
|
-
isSaving: boolean;
|
|
296
|
-
backButtonLabel: string;
|
|
297
|
-
manageWebsiteDesignsUrl: string;
|
|
298
|
-
publishErrorMessage: string;
|
|
299
|
-
upgradeUrl: string;
|
|
300
|
-
reactivationUrl: string;
|
|
301
|
-
runtimeEnvironment: string;
|
|
302
|
-
selectedTaxId: number | undefined;
|
|
303
|
-
slug: string;
|
|
304
|
-
standalone: boolean;
|
|
305
|
-
triggerSaveSuccessMessage: boolean;
|
|
306
|
-
isDesignCom: boolean;
|
|
307
|
-
isPrePurchase: boolean;
|
|
308
|
-
makerFonts: any[];
|
|
309
|
-
eventButtonLocation?: string | undefined;
|
|
310
|
-
websiteUpsellModalViewModel?: any;
|
|
311
|
-
showPublishOptionModal?: boolean | undefined;
|
|
312
|
-
abTests: Record<string, string>;
|
|
313
|
-
isSubsequentPublish: boolean;
|
|
314
|
-
} & import("pinia").PiniaCustomStateProperties<import("../../stores").BrandPageContainerState>) => boolean;
|
|
315
|
-
}, {
|
|
316
|
-
initialise(payload: import("../../stores/brandpage-container").InitialisePayload): void;
|
|
317
|
-
setDesignTemplateToken(payload: any): void;
|
|
318
|
-
setDesignDraftToken(payload: any): void;
|
|
319
|
-
setIsBrandPageSlugEditMode(payload: any): void;
|
|
320
|
-
setIsPublishing(payload: any): void;
|
|
321
|
-
setIsPublishModalVisible(payload: any): void;
|
|
322
|
-
setIsPublishUpgradeModal(payload: any): void;
|
|
323
|
-
setIsSaving(payload: any): void;
|
|
324
|
-
setIsUpgradeModalVisible(payload: any): void;
|
|
325
|
-
setPublishErrorMessage(payload: any): void;
|
|
326
|
-
setTriggerSaveSuccessMessage(payload: any): void;
|
|
327
|
-
setSlug(payload: any): void;
|
|
328
|
-
updateBrandPageMeta(payload: any): void;
|
|
329
|
-
updateBrandPageSensitiveContent(payload: any): void;
|
|
330
|
-
setLogoDraftToken(payload: {
|
|
331
|
-
logoDraftToken: string;
|
|
332
|
-
}): void;
|
|
333
|
-
setBackUrl(payload: any): void;
|
|
334
|
-
setIsStripeOnboardingModalVisible(payload: any): void;
|
|
335
|
-
setSelectedTaxId(payload: any): void;
|
|
336
|
-
setBrandPageCustomDomainConfig({ customDomainConfig }: {
|
|
337
|
-
customDomainConfig: any;
|
|
338
|
-
}): void;
|
|
339
|
-
setBrandPageCustomDomain(payload: {
|
|
340
|
-
customDomain: import("../../models").CustomDomainModel | null;
|
|
341
|
-
}): void;
|
|
342
|
-
setCreateCustomDomainErrorMessage(payload: any): void;
|
|
343
|
-
setBrandPageIsCustomDomainEnabled(payload: any): void;
|
|
344
|
-
setIsSubsequentPublish(payload: any): void;
|
|
345
|
-
clearPublishErrorMessage(): void;
|
|
346
|
-
closePublishModal(payload?: {
|
|
347
|
-
skipShowNextNotificationMessage?: boolean | undefined;
|
|
348
|
-
}): Promise<void>;
|
|
349
|
-
closeUpgradeModal(): Promise<void>;
|
|
350
|
-
endBrandPageSlugEditMode(): void;
|
|
351
|
-
publishBrandPage({ shouldPublish, slug }: {
|
|
352
|
-
shouldPublish: any;
|
|
353
|
-
slug: any;
|
|
354
|
-
}): Promise<false | {
|
|
355
|
-
success: boolean;
|
|
356
|
-
websiteUpsellModalViewModel: any;
|
|
357
|
-
}>;
|
|
358
|
-
publishBrandPageWithCustomDomainAsync({ shouldPublish, slug, domain, isPurchasedDomain, }: {
|
|
359
|
-
shouldPublish: any;
|
|
360
|
-
slug: any;
|
|
361
|
-
domain: any;
|
|
362
|
-
isPurchasedDomain: any;
|
|
363
|
-
}): Promise<boolean | undefined>;
|
|
364
|
-
checkWebsiteSlugAsync(slug: string): Promise<import("../../models/api.model").WebsiteSlugCheckResponse | null>;
|
|
365
|
-
redirectToLogoEditPage(logoEditUrl: string, locale: string): Promise<void>;
|
|
366
|
-
redirectToCreateNewDesignPage(): Promise<void>;
|
|
367
|
-
redirectToStripeOnboarding(): Promise<void>;
|
|
368
|
-
exportDesignAsync(): Promise<any>;
|
|
369
|
-
saveBrandPage(payload?: {
|
|
370
|
-
isPublish?: boolean | undefined;
|
|
371
|
-
eventButtonLocation?: string | undefined;
|
|
372
|
-
}): Promise<false | {
|
|
373
|
-
saved: boolean;
|
|
374
|
-
canPublish: boolean;
|
|
375
|
-
websiteUpsellModalViewModel: any;
|
|
376
|
-
}>;
|
|
377
|
-
saveAndPublishBrandPage(eventButtonLocation: string): Promise<void>;
|
|
378
|
-
saveTemplate(): Promise<void>;
|
|
379
|
-
setBrandPageStatus(status: any): Promise<void>;
|
|
380
|
-
showPublishModal(eventButtonLocation?: string | undefined, websiteUpsellModalViewModel?: any, isSubsequentPublish?: boolean | undefined): void;
|
|
381
|
-
showBrandPageSlugEditModal(eventButtonLocation: string): Promise<void>;
|
|
382
|
-
showUpgradeModalAndSaveAsync(): Promise<void>;
|
|
383
|
-
showStripeOnboardingModal(): void;
|
|
384
|
-
closeStripeOnboardingModal(): void;
|
|
385
|
-
showSaveSuccessMessage(): Promise<void>;
|
|
386
|
-
startBrandPageSlugEditMode(): void;
|
|
387
|
-
triggerLockedContentClickedEvent(contentType: string): Promise<void>;
|
|
388
|
-
unpublishBrandPage(): Promise<void>;
|
|
389
|
-
updateBrandPageSettings({ description, title }: {
|
|
390
|
-
description: any;
|
|
391
|
-
title: any;
|
|
392
|
-
}): Promise<void>;
|
|
393
|
-
updateSensitiveContent({ sensitiveContent }: {
|
|
394
|
-
sensitiveContent: any;
|
|
395
|
-
}): Promise<void>;
|
|
396
|
-
createBrandPageCustomDomain({ domainName }: {
|
|
397
|
-
domainName: any;
|
|
398
|
-
}): Promise<false | undefined>;
|
|
399
|
-
createBrandPageWithPurchasedDomain({ domainName }: {
|
|
400
|
-
domainName: any;
|
|
401
|
-
}): Promise<false | undefined>;
|
|
402
|
-
deleteBrandPageCustomDomain({ designDraftToken, customDomainId }: {
|
|
403
|
-
designDraftToken: any;
|
|
404
|
-
customDomainId: any;
|
|
405
|
-
}): Promise<void>;
|
|
406
|
-
refreshBrandPageCustomDomainConfig(): Promise<void>;
|
|
407
|
-
refreshBrandPageCustomDomain(): Promise<void>;
|
|
408
|
-
updateBrandPageIsCustomDomainEnabled({ isCustomDomainEnabled }: {
|
|
409
|
-
isCustomDomainEnabled: any;
|
|
410
|
-
}): Promise<void>;
|
|
411
|
-
}>;
|
|
412
190
|
}, TemplatePreviewData, {
|
|
413
191
|
context(): BrandPageContext;
|
|
414
192
|
previewViewport(): string;
|
|
@@ -416,16 +194,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
416
194
|
innerContainerStyle(): BrandPageCssStyle;
|
|
417
195
|
isPersonalisable(): boolean;
|
|
418
196
|
cssVariablesStyle(): Record<string, string>;
|
|
419
|
-
previewImageUrl(): string;
|
|
420
197
|
}, {
|
|
421
198
|
onOverlayClicked(): void;
|
|
422
199
|
onResize(): void;
|
|
423
200
|
onSetPreviewStyles(styles: BrandPageCssStyle): void;
|
|
424
|
-
onImageError(): void;
|
|
425
|
-
onImageLoad(): void;
|
|
426
|
-
generatePreviewImageUrl(): string;
|
|
427
|
-
getPreviewBaseUrl(): string;
|
|
428
|
-
regeneratePreview(): void;
|
|
429
201
|
updateViewModel(forceUpdate?: boolean): Promise<void>;
|
|
430
202
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "template-selected"[], "template-selected", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
431
203
|
logoImage: {
|
|
@@ -4,7 +4,7 @@ import { applyLogoThemeToBrandPageModel, applyUserPersonalisationToBrandPageMode
|
|
|
4
4
|
import { STYLE_THEME_KEYS } from '../../../brand-page/constants';
|
|
5
5
|
import debounce from 'lodash.debounce';
|
|
6
6
|
import { MOBILE_HEIGHT, MOBILE_WIDTH } from '../../constants';
|
|
7
|
-
import {
|
|
7
|
+
import { useBrandPageMakerStore } from '../../stores';
|
|
8
8
|
import { applyLogoImageBase64UrlToBrandPageTemplateModel, applyLogoImageToBrandPageTemplateModel, applyLogoTemplateImageToBrandPageTemplateModel, } from '../../../brand-page/utils/logo.util';
|
|
9
9
|
import { useVideoStore } from '../../../lib';
|
|
10
10
|
const DEBOUNCE_IN_MS = 250;
|
|
@@ -12,13 +12,9 @@ export default defineComponent({
|
|
|
12
12
|
emits: ['template-selected'],
|
|
13
13
|
setup() {
|
|
14
14
|
const brandPageMakerStore = useBrandPageMakerStore();
|
|
15
|
-
const brandPageContainerStore = useBrandPageContainerStore();
|
|
16
15
|
return {
|
|
17
16
|
selectedTemplateId: computed(() => brandPageMakerStore.selectedTemplateId),
|
|
18
|
-
isPrePurchase: computed(() => brandPageContainerStore.isPrePurchase),
|
|
19
|
-
runtimeEnvironment: computed(() => brandPageContainerStore.runtimeEnvironment),
|
|
20
17
|
brandPageMakerStore,
|
|
21
|
-
brandPageContainerStore,
|
|
22
18
|
};
|
|
23
19
|
},
|
|
24
20
|
props: {
|
|
@@ -77,8 +73,6 @@ export default defineComponent({
|
|
|
77
73
|
renderWidth: 400,
|
|
78
74
|
rootStyles: {},
|
|
79
75
|
viewModel: undefined,
|
|
80
|
-
imageLoadError: false,
|
|
81
|
-
imageLoading: true,
|
|
82
76
|
};
|
|
83
77
|
return data;
|
|
84
78
|
},
|
|
@@ -153,24 +147,17 @@ export default defineComponent({
|
|
|
153
147
|
});
|
|
154
148
|
return cssVariables;
|
|
155
149
|
},
|
|
156
|
-
previewImageUrl() {
|
|
157
|
-
return this.generatePreviewImageUrl();
|
|
158
|
-
},
|
|
159
150
|
},
|
|
160
151
|
watch: {
|
|
161
|
-
template() {
|
|
162
|
-
if (this.isPrePurchase) {
|
|
163
|
-
this.updateViewModel();
|
|
164
|
-
}
|
|
165
|
-
},
|
|
166
152
|
logoTheme: {
|
|
167
153
|
handler() {
|
|
168
|
-
|
|
169
|
-
this.updateViewModel();
|
|
170
|
-
}
|
|
154
|
+
this.updateViewModel();
|
|
171
155
|
},
|
|
172
156
|
deep: true,
|
|
173
157
|
},
|
|
158
|
+
template() {
|
|
159
|
+
this.updateViewModel();
|
|
160
|
+
},
|
|
174
161
|
},
|
|
175
162
|
created() {
|
|
176
163
|
this.updateViewModel(false);
|
|
@@ -210,37 +197,7 @@ export default defineComponent({
|
|
|
210
197
|
onSetPreviewStyles(styles) {
|
|
211
198
|
this.rootStyles = styles;
|
|
212
199
|
},
|
|
213
|
-
onImageError() {
|
|
214
|
-
console.warn(`Failed to load preview image for template ${this.template.id}`);
|
|
215
|
-
this.imageLoadError = true;
|
|
216
|
-
this.imageLoading = false;
|
|
217
|
-
},
|
|
218
|
-
onImageLoad() {
|
|
219
|
-
this.imageLoadError = false;
|
|
220
|
-
this.imageLoading = false;
|
|
221
|
-
},
|
|
222
|
-
generatePreviewImageUrl() {
|
|
223
|
-
const baseUrl = this.getPreviewBaseUrl();
|
|
224
|
-
const logoDraftToken = this.logoImage?.logoDraftToken ||
|
|
225
|
-
'0B660926-D94A-4E29-99D1-F07E67AA6E49';
|
|
226
|
-
const deviceType = this.brandPageMakerStore.brandPageType === 'brandSite'
|
|
227
|
-
? 'desktop'
|
|
228
|
-
: 'mobile';
|
|
229
|
-
return `${baseUrl}/preview/template/${this.template.id}/${logoDraftToken}?deviceType=${deviceType}`;
|
|
230
|
-
},
|
|
231
|
-
getPreviewBaseUrl() {
|
|
232
|
-
const domainSuffix = '.brand.page';
|
|
233
|
-
return `https://preview-${this.runtimeEnvironment}${domainSuffix}`;
|
|
234
|
-
},
|
|
235
|
-
regeneratePreview() {
|
|
236
|
-
this.imageLoadError = false;
|
|
237
|
-
this.imageLoading = true;
|
|
238
|
-
this.$forceUpdate();
|
|
239
|
-
},
|
|
240
200
|
async updateViewModel(forceUpdate = true) {
|
|
241
|
-
if (!this.isPrePurchase) {
|
|
242
|
-
return;
|
|
243
|
-
}
|
|
244
201
|
const videoStore = useVideoStore();
|
|
245
202
|
let model = this.template.brandPageModel;
|
|
246
203
|
if (this.logoImageBase64Url) {
|
|
@@ -178,23 +178,13 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
178
178
|
if (!this.selectedTemplateId) {
|
|
179
179
|
return;
|
|
180
180
|
}
|
|
181
|
-
|
|
181
|
+
const 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
|
-
if (!template || !template.brandPageModel) {
|
|
192
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
193
|
-
throw new Error('Failed to fetch template brandPageModel');
|
|
194
|
-
}
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
188
|
this.isApplyingTemplate = true;
|
|
199
189
|
let brandPageModel = cloneDeep(template.brandPageModel);
|
|
200
190
|
// Apply selected logo image to logo contents
|
|
@@ -6,6 +6,7 @@ export interface UserState extends UIUserState {
|
|
|
6
6
|
emailAddress: string;
|
|
7
7
|
hasBrandPagePremiumSubscription: boolean;
|
|
8
8
|
brandPageCommissionPercentage: number | undefined;
|
|
9
|
+
userId?: string;
|
|
9
10
|
}
|
|
10
11
|
export declare const DEFAULT_MAX_NUM_OF_PAGES = 2;
|
|
11
12
|
export declare const UNLIMITED_MAX_NUM_OF_PAGES = -1;
|
|
@@ -17,4 +18,7 @@ export declare const useBrandPageMakerUserStore: import("pinia").StoreDefinition
|
|
|
17
18
|
isAdmin: boolean;
|
|
18
19
|
}): void;
|
|
19
20
|
setBrandPageCommissionPercentage(payload: number): void;
|
|
21
|
+
setUserId(payload: {
|
|
22
|
+
userId: string;
|
|
23
|
+
}): void;
|
|
20
24
|
}>;
|
|
@@ -24,6 +24,7 @@ export const useBrandPageMakerUserStore = defineStore('brandPageMakerUser', {
|
|
|
24
24
|
hasBrandPagePremiumSubscription: false,
|
|
25
25
|
brandPageCommissionPercentage: undefined,
|
|
26
26
|
isAdmin: false, // this is currently used as way to identify admin maker mode
|
|
27
|
+
userId: undefined,
|
|
27
28
|
}),
|
|
28
29
|
actions: {
|
|
29
30
|
setEmailAddress(payload) {
|
|
@@ -41,5 +42,8 @@ export const useBrandPageMakerUserStore = defineStore('brandPageMakerUser', {
|
|
|
41
42
|
setBrandPageCommissionPercentage(payload) {
|
|
42
43
|
this.brandPageCommissionPercentage = payload;
|
|
43
44
|
},
|
|
45
|
+
setUserId(payload) {
|
|
46
|
+
this.userId = payload.userId;
|
|
47
|
+
},
|
|
44
48
|
},
|
|
45
49
|
});
|