@designcrowd/library.brand-page 6.1.6-use-isadminmaker-3 → 6.1.6
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-t5akeGDG.js → CreatedOnBrandCrowd-de-de-COw1kYDh.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-D6iRa7UV.js → CreatedOnBrandCrowd-en-us-JRm1p0it.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-BHwAxInw.js → CreatedOnBrandCrowd-es-es-D-G9uI6b.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-DETrOR_X.js → CreatedOnBrandCrowd-fr-ca-DQCScohj.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-DETrOR_X.js → CreatedOnBrandCrowd-fr-fr-DQCScohj.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-CtWsOLWg.js → CreatedOnBrandCrowd-pt-br-4RazAfO7.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-CtWsOLWg.js → CreatedOnBrandCrowd-pt-pt-4RazAfO7.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-DsEbB4hv.js → CreatedOnDcom-de-de-DqvLTbhq.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-CA3kvbs5.js → CreatedOnDcom-en-us-DG1X0ero.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-B7o8joWb.js → CreatedOnDcom-es-es-BxHAIikP.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-Yz1cvzRY.js → CreatedOnDcom-fr-ca-BGXoViAC.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-BETGUOnB.js → CreatedOnDcom-fr-fr-CsvmeK2T.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-B37QJXKn.js → CreatedOnDcom-pt-br-DvWm7MjO.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-DMkIALyd.js → CreatedOnDcom-pt-pt-Bhz2YEVP.js} +1 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +3 -0
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +3 -0
- package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.d.ts +3 -0
- package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +3 -0
- package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +3 -0
- package/lib/src/brand-page-maker/components/seo-settings/UseExistingDomainModal.mixin.d.ts +3 -0
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +3 -0
- package/lib/src/brand-page-maker/components/upgrade-to-premium-button/UpgradeToPremiumButton.mixin.d.ts +3 -0
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +6 -1
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.js +6 -0
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +6 -0
- package/lib/src/clients/fabric-render-client.d.ts +1 -0
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-BgxxXPxt.js → lib-Bg2K2ze6.js} +36 -24
- package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +3 -0
- package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.d.ts +1 -0
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +4 -0
- package/lib/src/shared/logo-settings/store/editable-logo-store.d.ts +2 -0
- package/lib/src/shared/logo-settings/store/editable-logo-store.js +20 -1
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +3 -0
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +4 -0
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.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/package.json +1 -1
- package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.initialise.test.ts +53 -0
- package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.ts +20 -1
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +7 -0
- package/src/clients/fabric-render-client.ts +5 -0
- package/src/shared/logo-settings/store/editable-logo-store.test.ts +90 -0
- package/src/shared/logo-settings/store/editable-logo-store.ts +28 -1
|
@@ -279,6 +279,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
279
279
|
triggerSaveSuccessMessage: boolean;
|
|
280
280
|
isDesignCom: boolean;
|
|
281
281
|
isPrePurchase: boolean;
|
|
282
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
282
283
|
makerFonts: any[];
|
|
283
284
|
eventButtonLocation?: string | undefined;
|
|
284
285
|
websiteUpsellModalViewModel?: any;
|
|
@@ -374,6 +375,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
374
375
|
triggerSaveSuccessMessage: boolean;
|
|
375
376
|
isDesignCom: boolean;
|
|
376
377
|
isPrePurchase: boolean;
|
|
378
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
377
379
|
makerFonts: any[];
|
|
378
380
|
eventButtonLocation?: string | undefined;
|
|
379
381
|
websiteUpsellModalViewModel?: any;
|
|
@@ -469,6 +471,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
469
471
|
triggerSaveSuccessMessage: boolean;
|
|
470
472
|
isDesignCom: boolean;
|
|
471
473
|
isPrePurchase: boolean;
|
|
474
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
472
475
|
makerFonts: any[];
|
|
473
476
|
eventButtonLocation?: string | undefined;
|
|
474
477
|
websiteUpsellModalViewModel?: any;
|
package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts
CHANGED
|
@@ -722,6 +722,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
722
722
|
triggerSaveSuccessMessage: boolean;
|
|
723
723
|
isDesignCom: boolean;
|
|
724
724
|
isPrePurchase: boolean;
|
|
725
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
725
726
|
makerFonts: any[];
|
|
726
727
|
eventButtonLocation?: string | undefined;
|
|
727
728
|
websiteUpsellModalViewModel?: any;
|
|
@@ -817,6 +818,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
817
818
|
triggerSaveSuccessMessage: boolean;
|
|
818
819
|
isDesignCom: boolean;
|
|
819
820
|
isPrePurchase: boolean;
|
|
821
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
820
822
|
makerFonts: any[];
|
|
821
823
|
eventButtonLocation?: string | undefined;
|
|
822
824
|
websiteUpsellModalViewModel?: any;
|
|
@@ -912,6 +914,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
912
914
|
triggerSaveSuccessMessage: boolean;
|
|
913
915
|
isDesignCom: boolean;
|
|
914
916
|
isPrePurchase: boolean;
|
|
917
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
915
918
|
makerFonts: any[];
|
|
916
919
|
eventButtonLocation?: string | undefined;
|
|
917
920
|
websiteUpsellModalViewModel?: any;
|
|
@@ -65,6 +65,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
65
65
|
triggerSaveSuccessMessage: boolean;
|
|
66
66
|
isDesignCom: boolean;
|
|
67
67
|
isPrePurchase: boolean;
|
|
68
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
68
69
|
makerFonts: any[];
|
|
69
70
|
eventButtonLocation?: string | undefined;
|
|
70
71
|
websiteUpsellModalViewModel?: any;
|
|
@@ -160,6 +161,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
160
161
|
triggerSaveSuccessMessage: boolean;
|
|
161
162
|
isDesignCom: boolean;
|
|
162
163
|
isPrePurchase: boolean;
|
|
164
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
163
165
|
makerFonts: any[];
|
|
164
166
|
eventButtonLocation?: string | undefined;
|
|
165
167
|
websiteUpsellModalViewModel?: any;
|
|
@@ -255,6 +257,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
255
257
|
triggerSaveSuccessMessage: boolean;
|
|
256
258
|
isDesignCom: boolean;
|
|
257
259
|
isPrePurchase: boolean;
|
|
260
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
258
261
|
makerFonts: any[];
|
|
259
262
|
eventButtonLocation?: string | undefined;
|
|
260
263
|
websiteUpsellModalViewModel?: any;
|
|
@@ -81,6 +81,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
81
81
|
triggerSaveSuccessMessage: boolean;
|
|
82
82
|
isDesignCom: boolean;
|
|
83
83
|
isPrePurchase: boolean;
|
|
84
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
84
85
|
makerFonts: any[];
|
|
85
86
|
eventButtonLocation?: string | undefined;
|
|
86
87
|
websiteUpsellModalViewModel?: any;
|
|
@@ -176,6 +177,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
176
177
|
triggerSaveSuccessMessage: boolean;
|
|
177
178
|
isDesignCom: boolean;
|
|
178
179
|
isPrePurchase: boolean;
|
|
180
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
179
181
|
makerFonts: any[];
|
|
180
182
|
eventButtonLocation?: string | undefined;
|
|
181
183
|
websiteUpsellModalViewModel?: any;
|
|
@@ -271,6 +273,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
271
273
|
triggerSaveSuccessMessage: boolean;
|
|
272
274
|
isDesignCom: boolean;
|
|
273
275
|
isPrePurchase: boolean;
|
|
276
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
274
277
|
makerFonts: any[];
|
|
275
278
|
eventButtonLocation?: string | undefined;
|
|
276
279
|
websiteUpsellModalViewModel?: any;
|
|
@@ -86,6 +86,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
86
86
|
triggerSaveSuccessMessage: boolean;
|
|
87
87
|
isDesignCom: boolean;
|
|
88
88
|
isPrePurchase: boolean;
|
|
89
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
89
90
|
makerFonts: any[];
|
|
90
91
|
eventButtonLocation?: string | undefined;
|
|
91
92
|
websiteUpsellModalViewModel?: any;
|
|
@@ -181,6 +182,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
181
182
|
triggerSaveSuccessMessage: boolean;
|
|
182
183
|
isDesignCom: boolean;
|
|
183
184
|
isPrePurchase: boolean;
|
|
185
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
184
186
|
makerFonts: any[];
|
|
185
187
|
eventButtonLocation?: string | undefined;
|
|
186
188
|
websiteUpsellModalViewModel?: any;
|
|
@@ -276,6 +278,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
276
278
|
triggerSaveSuccessMessage: boolean;
|
|
277
279
|
isDesignCom: boolean;
|
|
278
280
|
isPrePurchase: boolean;
|
|
281
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
279
282
|
makerFonts: any[];
|
|
280
283
|
eventButtonLocation?: string | undefined;
|
|
281
284
|
websiteUpsellModalViewModel?: any;
|
|
@@ -67,6 +67,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
67
67
|
triggerSaveSuccessMessage: boolean;
|
|
68
68
|
isDesignCom: boolean;
|
|
69
69
|
isPrePurchase: boolean;
|
|
70
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
70
71
|
makerFonts: any[];
|
|
71
72
|
eventButtonLocation?: string | undefined;
|
|
72
73
|
websiteUpsellModalViewModel?: any;
|
|
@@ -162,6 +163,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
162
163
|
triggerSaveSuccessMessage: boolean;
|
|
163
164
|
isDesignCom: boolean;
|
|
164
165
|
isPrePurchase: boolean;
|
|
166
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
165
167
|
makerFonts: any[];
|
|
166
168
|
eventButtonLocation?: string | undefined;
|
|
167
169
|
websiteUpsellModalViewModel?: any;
|
|
@@ -257,6 +259,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
257
259
|
triggerSaveSuccessMessage: boolean;
|
|
258
260
|
isDesignCom: boolean;
|
|
259
261
|
isPrePurchase: boolean;
|
|
262
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
260
263
|
makerFonts: any[];
|
|
261
264
|
eventButtonLocation?: string | undefined;
|
|
262
265
|
websiteUpsellModalViewModel?: any;
|
|
@@ -135,6 +135,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
135
135
|
triggerSaveSuccessMessage: boolean;
|
|
136
136
|
isDesignCom: boolean;
|
|
137
137
|
isPrePurchase: boolean;
|
|
138
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
138
139
|
makerFonts: any[];
|
|
139
140
|
eventButtonLocation?: string | undefined;
|
|
140
141
|
websiteUpsellModalViewModel?: any;
|
|
@@ -230,6 +231,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
230
231
|
triggerSaveSuccessMessage: boolean;
|
|
231
232
|
isDesignCom: boolean;
|
|
232
233
|
isPrePurchase: boolean;
|
|
234
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
233
235
|
makerFonts: any[];
|
|
234
236
|
eventButtonLocation?: string | undefined;
|
|
235
237
|
websiteUpsellModalViewModel?: any;
|
|
@@ -325,6 +327,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
325
327
|
triggerSaveSuccessMessage: boolean;
|
|
326
328
|
isDesignCom: boolean;
|
|
327
329
|
isPrePurchase: boolean;
|
|
330
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
328
331
|
makerFonts: any[];
|
|
329
332
|
eventButtonLocation?: string | undefined;
|
|
330
333
|
websiteUpsellModalViewModel?: any;
|
|
@@ -62,6 +62,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
62
62
|
triggerSaveSuccessMessage: boolean;
|
|
63
63
|
isDesignCom: boolean;
|
|
64
64
|
isPrePurchase: boolean;
|
|
65
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
65
66
|
makerFonts: any[];
|
|
66
67
|
eventButtonLocation?: string | undefined;
|
|
67
68
|
websiteUpsellModalViewModel?: any;
|
|
@@ -157,6 +158,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
157
158
|
triggerSaveSuccessMessage: boolean;
|
|
158
159
|
isDesignCom: boolean;
|
|
159
160
|
isPrePurchase: boolean;
|
|
161
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
160
162
|
makerFonts: any[];
|
|
161
163
|
eventButtonLocation?: string | undefined;
|
|
162
164
|
websiteUpsellModalViewModel?: any;
|
|
@@ -252,6 +254,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
252
254
|
triggerSaveSuccessMessage: boolean;
|
|
253
255
|
isDesignCom: boolean;
|
|
254
256
|
isPrePurchase: boolean;
|
|
257
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
255
258
|
makerFonts: any[];
|
|
256
259
|
eventButtonLocation?: string | undefined;
|
|
257
260
|
websiteUpsellModalViewModel?: any;
|
|
@@ -47,6 +47,7 @@ export interface BrandPageContainerState {
|
|
|
47
47
|
triggerSaveSuccessMessage: boolean;
|
|
48
48
|
isDesignCom: boolean;
|
|
49
49
|
isPrePurchase: boolean;
|
|
50
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
50
51
|
makerFonts: any[];
|
|
51
52
|
eventButtonLocation?: string;
|
|
52
53
|
websiteUpsellModalViewModel?: any;
|
|
@@ -70,8 +71,9 @@ export type GettyVideoEditorViewModelResponse = {
|
|
|
70
71
|
uri: string;
|
|
71
72
|
};
|
|
72
73
|
};
|
|
73
|
-
export type InitialisePayload = Omit<BrandPageContainerState, 'customDomain' | 'customDomainConfig' | 'isAdminMaker'> & {
|
|
74
|
+
export type InitialisePayload = Omit<BrandPageContainerState, 'customDomain' | 'customDomainConfig' | 'isAdminMaker' | 'prePurchaseBrandKitLogoDraftToken'> & {
|
|
74
75
|
logoDraftToken?: string;
|
|
76
|
+
prePurchaseBrandKitLogoDraftToken?: string;
|
|
75
77
|
isAdminMaker?: boolean;
|
|
76
78
|
brandPageCustomDomain?: CustomDomainModel;
|
|
77
79
|
isBrandPageCustomDomainEnabled: boolean;
|
|
@@ -143,6 +145,7 @@ export declare const useBrandPageContainerStore: import("pinia").StoreDefinition
|
|
|
143
145
|
triggerSaveSuccessMessage: boolean;
|
|
144
146
|
isDesignCom: boolean;
|
|
145
147
|
isPrePurchase: boolean;
|
|
148
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
146
149
|
makerFonts: any[];
|
|
147
150
|
eventButtonLocation?: string | undefined;
|
|
148
151
|
websiteUpsellModalViewModel?: any;
|
|
@@ -238,6 +241,7 @@ export declare const useBrandPageContainerStore: import("pinia").StoreDefinition
|
|
|
238
241
|
triggerSaveSuccessMessage: boolean;
|
|
239
242
|
isDesignCom: boolean;
|
|
240
243
|
isPrePurchase: boolean;
|
|
244
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
241
245
|
makerFonts: any[];
|
|
242
246
|
eventButtonLocation?: string | undefined;
|
|
243
247
|
websiteUpsellModalViewModel?: any;
|
|
@@ -333,6 +337,7 @@ export declare const useBrandPageContainerStore: import("pinia").StoreDefinition
|
|
|
333
337
|
triggerSaveSuccessMessage: boolean;
|
|
334
338
|
isDesignCom: boolean;
|
|
335
339
|
isPrePurchase: boolean;
|
|
340
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
336
341
|
makerFonts: any[];
|
|
337
342
|
eventButtonLocation?: string | undefined;
|
|
338
343
|
websiteUpsellModalViewModel?: any;
|
|
@@ -61,6 +61,7 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
61
61
|
isSellDomainNameEnabled: false,
|
|
62
62
|
isDesignCom: false,
|
|
63
63
|
isPrePurchase: false,
|
|
64
|
+
prePurchaseBrandKitLogoDraftToken: '',
|
|
64
65
|
makerFonts: [],
|
|
65
66
|
eventButtonLocation: undefined,
|
|
66
67
|
websiteUpsellModalViewModel: undefined,
|
|
@@ -151,6 +152,11 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
151
152
|
if (payload.logoDraftToken) {
|
|
152
153
|
uiStore.setLogoDraftToken({ logoDraftToken: payload.logoDraftToken });
|
|
153
154
|
}
|
|
155
|
+
// BP-5962: consume the host's explicit token verbatim (set unconditionally so a stale token from a
|
|
156
|
+
// previous editor mount never leaks in). The old derivation from isPrePurchase + logoDraftToken is
|
|
157
|
+
// gone — it fired on every reload of a normal saved draft and wrongly rendered it from the draft.
|
|
158
|
+
this.prePurchaseBrandKitLogoDraftToken =
|
|
159
|
+
payload.prePurchaseBrandKitLogoDraftToken || '';
|
|
154
160
|
payload?.gettyVideos?.forEach((video) => videoStore.setVideoUrlsWithToken(video.token, video.videoPreviewAsset.uri, video.imagePreviewAsset.uri, video.assetId));
|
|
155
161
|
},
|
|
156
162
|
setDesignTemplateToken(payload) {
|
|
@@ -971,6 +971,12 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
971
971
|
logoTemplateMetadata: '',
|
|
972
972
|
isLogoDraftSaved: false,
|
|
973
973
|
logoDraftToken: uiStore.logoDraftToken || uuid.v4(),
|
|
974
|
+
// Only the container's per-mount Brand Kit seed is a REAL server
|
|
975
|
+
// draft (the editor was opened from one - Brand Kit Edit). The
|
|
976
|
+
// uuid fallback above is a session-local identity, and
|
|
977
|
+
// uiStore.logoDraftToken is never cleared between mounts -
|
|
978
|
+
// neither must ever reach fabric-render as a render base.
|
|
979
|
+
prePurchaseBrandKitLogoDraftToken: brandPageContainerStore.prePurchaseBrandKitLogoDraftToken,
|
|
974
980
|
logoEdits: {
|
|
975
981
|
backgroundObject: {
|
|
976
982
|
id: '',
|
package/lib/src/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as s, a as I, b as S, c as N, d as e, e as A, f as O, B as t, g as C, h as G, i as D, j as P, k as R, l as o, m as L, n as M, o as r, p as n, q as i, r as b, s as l, t as c, u as F, v as g, w as B, x as Y, y as U, z as d, C as u, D as H, E as p, F as y, G as m, H as K, I as k, J as V, K as v, L as X, M as h, N as f, O as x, P as W, Q as z, R as w, S as J, T as Z, U as j, V as q, W as Q, X as $, Y as aa, Z as Ea, $ as Ta, a0 as _a, a1 as sa, a2 as Ia, a3 as Sa, a4 as Na, a5 as ea, a6 as Aa, a7 as Oa, a8 as ta, a9 as Ca, aa as Ga, ab as Da, ac as Pa, ad as Ra, ae as oa, af as La, ag as Ma, ah as ra, ai as na, aj as ia, ak as ba, al as la, am as ca, an as Fa, ao as ga, ap as Ba, aq as Ya, ar as Ua, as as da, at as ua, au as Ha, av as pa, aw as ya, ax as ma, ay as Ka, az as ka, aA as Va, aB as va, aC as Xa, aD as ha, aE as fa, aF as xa, aG as Wa, aH as za, aI as wa, aJ as Ja, aK as Za, aL as ja, aM as qa, aN as Qa, aO as $a, aP as aE, aQ as EE, aR as TE, aS as _E, aT as sE, aU as IE, aV as SE, aW as NE, aX as eE, aY as AE, aZ as OE, a_ as tE, a$ as CE, b0 as GE, b1 as DE, b2 as PE, b3 as RE, b4 as oE, b5 as LE, b6 as ME, b7 as rE, b8 as nE, b9 as iE, ba as bE, bb as lE, bc as cE, bd as FE, be as gE, bf as BE, bg as YE, bh as UE, bi as dE, bj as uE, bk as HE, bl as pE, bm as yE, bn as mE, bo as KE, bp as kE, bq as VE, br as vE, bs as XE, bt as hE, bu as fE, bv as xE, bw as WE, bx as zE, by as wE, bz as JE, bA as ZE, bB as jE, bC as qE, bD as QE, bE as $E, bF as aT, bG as ET, bH as TT, bI as _T, bJ as sT, bK as IT, bL as ST, bM as NT, bN as eT, bO as AT, bP as OT, bQ as tT, bR as CT, bS as GT, bT as DT, bU as PT, bV as RT, bW as oT, bX as LT, bY as MT, bZ as rT, b_ as nT, b$ as iT, c0 as bT, c1 as lT, c2 as cT, c3 as FT, c4 as gT, c5 as BT, c6 as YT, c7 as UT, c8 as dT, c9 as uT, ca as HT, cb as pT, cc as yT, cd as mT, ce as KT, cf as kT, cg as VT, ch as vT, ci as XT, cj as hT, ck as fT, cl as xT, cm as WT, cn as zT, co as wT, cp as JT, cq as ZT, cr as jT, cs as qT, ct as QT, cu as $T, cv as a_, cw as E_, cx as T_, cy as __, cz as s_, cA as I_ } from "./lib-
|
|
1
|
+
import { A as s, a as I, b as S, c as N, d as e, e as A, f as O, B as t, g as C, h as G, i as D, j as P, k as R, l as o, m as L, n as M, o as r, p as n, q as i, r as b, s as l, t as c, u as F, v as g, w as B, x as Y, y as U, z as d, C as u, D as H, E as p, F as y, G as m, H as K, I as k, J as V, K as v, L as X, M as h, N as f, O as x, P as W, Q as z, R as w, S as J, T as Z, U as j, V as q, W as Q, X as $, Y as aa, Z as Ea, $ as Ta, a0 as _a, a1 as sa, a2 as Ia, a3 as Sa, a4 as Na, a5 as ea, a6 as Aa, a7 as Oa, a8 as ta, a9 as Ca, aa as Ga, ab as Da, ac as Pa, ad as Ra, ae as oa, af as La, ag as Ma, ah as ra, ai as na, aj as ia, ak as ba, al as la, am as ca, an as Fa, ao as ga, ap as Ba, aq as Ya, ar as Ua, as as da, at as ua, au as Ha, av as pa, aw as ya, ax as ma, ay as Ka, az as ka, aA as Va, aB as va, aC as Xa, aD as ha, aE as fa, aF as xa, aG as Wa, aH as za, aI as wa, aJ as Ja, aK as Za, aL as ja, aM as qa, aN as Qa, aO as $a, aP as aE, aQ as EE, aR as TE, aS as _E, aT as sE, aU as IE, aV as SE, aW as NE, aX as eE, aY as AE, aZ as OE, a_ as tE, a$ as CE, b0 as GE, b1 as DE, b2 as PE, b3 as RE, b4 as oE, b5 as LE, b6 as ME, b7 as rE, b8 as nE, b9 as iE, ba as bE, bb as lE, bc as cE, bd as FE, be as gE, bf as BE, bg as YE, bh as UE, bi as dE, bj as uE, bk as HE, bl as pE, bm as yE, bn as mE, bo as KE, bp as kE, bq as VE, br as vE, bs as XE, bt as hE, bu as fE, bv as xE, bw as WE, bx as zE, by as wE, bz as JE, bA as ZE, bB as jE, bC as qE, bD as QE, bE as $E, bF as aT, bG as ET, bH as TT, bI as _T, bJ as sT, bK as IT, bL as ST, bM as NT, bN as eT, bO as AT, bP as OT, bQ as tT, bR as CT, bS as GT, bT as DT, bU as PT, bV as RT, bW as oT, bX as LT, bY as MT, bZ as rT, b_ as nT, b$ as iT, c0 as bT, c1 as lT, c2 as cT, c3 as FT, c4 as gT, c5 as BT, c6 as YT, c7 as UT, c8 as dT, c9 as uT, ca as HT, cb as pT, cc as yT, cd as mT, ce as KT, cf as kT, cg as VT, ch as vT, ci as XT, cj as hT, ck as fT, cl as xT, cm as WT, cn as zT, co as wT, cp as JT, cq as ZT, cr as jT, cs as qT, ct as QT, cu as $T, cv as a_, cw as E_, cx as T_, cy as __, cz as s_, cA as I_ } from "./lib-Bg2K2ze6.js";
|
|
2
2
|
import { U as N_, u as e_ } from "./useEventTracker-Dmc2jFdN.js";
|
|
3
3
|
import "vue";
|
|
4
4
|
import "vue-cropperjs";
|
|
@@ -68184,10 +68184,10 @@ const Wi = /* @__PURE__ */ f9(WG1), KG1 = (e, t, n) => {
|
|
|
68184
68184
|
He(() => n.context.isDesignCom, async () => {
|
|
68185
68185
|
const _ = i9().toLowerCase(), S = n.context.isDesignCom ? "Dcom" : "BrandCrowd";
|
|
68186
68186
|
try {
|
|
68187
|
-
const { default: M } = await tV(/* @__PURE__ */ Object.assign({ "./watermark/CreatedOnBrandCrowd-de-de.vue": () => import("./CreatedOnBrandCrowd-de-de-
|
|
68187
|
+
const { default: M } = await tV(/* @__PURE__ */ Object.assign({ "./watermark/CreatedOnBrandCrowd-de-de.vue": () => import("./CreatedOnBrandCrowd-de-de-COw1kYDh.js"), "./watermark/CreatedOnBrandCrowd-en-us.vue": () => import("./CreatedOnBrandCrowd-en-us-JRm1p0it.js"), "./watermark/CreatedOnBrandCrowd-es-es.vue": () => import("./CreatedOnBrandCrowd-es-es-D-G9uI6b.js"), "./watermark/CreatedOnBrandCrowd-fr-ca.vue": () => import("./CreatedOnBrandCrowd-fr-ca-DQCScohj.js"), "./watermark/CreatedOnBrandCrowd-fr-fr.vue": () => import("./CreatedOnBrandCrowd-fr-fr-DQCScohj.js"), "./watermark/CreatedOnBrandCrowd-pt-br.vue": () => import("./CreatedOnBrandCrowd-pt-br-4RazAfO7.js"), "./watermark/CreatedOnBrandCrowd-pt-pt.vue": () => import("./CreatedOnBrandCrowd-pt-pt-4RazAfO7.js"), "./watermark/CreatedOnDcom-de-de.vue": () => import("./CreatedOnDcom-de-de-DqvLTbhq.js"), "./watermark/CreatedOnDcom-en-us.vue": () => import("./CreatedOnDcom-en-us-DG1X0ero.js"), "./watermark/CreatedOnDcom-es-es.vue": () => import("./CreatedOnDcom-es-es-BxHAIikP.js"), "./watermark/CreatedOnDcom-fr-ca.vue": () => import("./CreatedOnDcom-fr-ca-BGXoViAC.js"), "./watermark/CreatedOnDcom-fr-fr.vue": () => import("./CreatedOnDcom-fr-fr-CsvmeK2T.js"), "./watermark/CreatedOnDcom-pt-br.vue": () => import("./CreatedOnDcom-pt-br-DvWm7MjO.js"), "./watermark/CreatedOnDcom-pt-pt.vue": () => import("./CreatedOnDcom-pt-pt-Bhz2YEVP.js") }), `./watermark/CreatedOn${S}-${_}.vue`, 3);
|
|
68188
68188
|
i.value = M;
|
|
68189
68189
|
} catch {
|
|
68190
|
-
const { default: x } = await tV(/* @__PURE__ */ Object.assign({ "./watermark/CreatedOnBrandCrowd-en-us.vue": () => import("./CreatedOnBrandCrowd-en-us-
|
|
68190
|
+
const { default: x } = await tV(/* @__PURE__ */ Object.assign({ "./watermark/CreatedOnBrandCrowd-en-us.vue": () => import("./CreatedOnBrandCrowd-en-us-JRm1p0it.js"), "./watermark/CreatedOnDcom-en-us.vue": () => import("./CreatedOnDcom-en-us-DG1X0ero.js") }), `./watermark/CreatedOn${S}-en-us.vue`, 3);
|
|
68191
68191
|
i.value = x;
|
|
68192
68192
|
}
|
|
68193
68193
|
}, {
|
|
@@ -79439,6 +79439,7 @@ const d0 = (e) => {
|
|
|
79439
79439
|
isSellDomainNameEnabled: !1,
|
|
79440
79440
|
isDesignCom: !1,
|
|
79441
79441
|
isPrePurchase: !1,
|
|
79442
|
+
prePurchaseBrandKitLogoDraftToken: "",
|
|
79442
79443
|
makerFonts: [],
|
|
79443
79444
|
eventButtonLocation: void 0,
|
|
79444
79445
|
websiteUpsellModalViewModel: void 0,
|
|
@@ -79469,7 +79470,7 @@ const d0 = (e) => {
|
|
|
79469
79470
|
templateId: this.designTemplateToken
|
|
79470
79471
|
});
|
|
79471
79472
|
const r = De();
|
|
79472
|
-
e.logoDraftToken && r.setLogoDraftToken({ logoDraftToken: e.logoDraftToken }), e?.gettyVideos?.forEach(
|
|
79473
|
+
e.logoDraftToken && r.setLogoDraftToken({ logoDraftToken: e.logoDraftToken }), this.prePurchaseBrandKitLogoDraftToken = e.prePurchaseBrandKitLogoDraftToken || "", e?.gettyVideos?.forEach(
|
|
79473
79474
|
(a) => n.setVideoUrlsWithToken(
|
|
79474
79475
|
a.token,
|
|
79475
79476
|
a.videoPreviewAsset.uri,
|
|
@@ -80150,6 +80151,7 @@ const d0 = (e) => {
|
|
|
80150
80151
|
isTextOnlyLogo: !1,
|
|
80151
80152
|
enableEditMode: !1,
|
|
80152
80153
|
logoDraftToken: "",
|
|
80154
|
+
prePurchaseBrandKitLogoDraftToken: "",
|
|
80153
80155
|
editableLogoVariations: [
|
|
80154
80156
|
{
|
|
80155
80157
|
variationId: J6.LOGO_WITH_TRANSPARENT_BACKGROUND,
|
|
@@ -80217,7 +80219,7 @@ const d0 = (e) => {
|
|
|
80217
80219
|
}),
|
|
80218
80220
|
actions: {
|
|
80219
80221
|
async setStateAsync(e) {
|
|
80220
|
-
this.resetLogoEdits(), this.setLogoDraftToken(e.newState.logoDraftToken), this.makerFonts = e.newState.makerFonts;
|
|
80222
|
+
this.resetLogoEdits(), this.setLogoDraftToken(e.newState.logoDraftToken), this.prePurchaseBrandKitLogoDraftToken = e.newState.prePurchaseBrandKitLogoDraftToken || "", this.makerFonts = e.newState.makerFonts;
|
|
80221
80223
|
const t = await this.postEditableLogoRequestAsync({
|
|
80222
80224
|
returnJson: !0,
|
|
80223
80225
|
defaultPrimaryText: e?.defaultPrimaryText,
|
|
@@ -80408,17 +80410,21 @@ const d0 = (e) => {
|
|
|
80408
80410
|
), !1) : !1;
|
|
80409
80411
|
},
|
|
80410
80412
|
async postEditableLogoRequestAsync(e) {
|
|
80411
|
-
const t = P4(), n = !!e?.layout, i = {
|
|
80413
|
+
const t = P4(), n = !!e?.layout, i = !!this.prePurchaseBrandKitLogoDraftToken && this.logoDraftToken === this.prePurchaseBrandKitLogoDraftToken, o = {
|
|
80412
80414
|
returnJson: e?.returnJson || !1,
|
|
80413
80415
|
generateS3Url: !0,
|
|
80414
80416
|
dimensionsType: e?.dimensionType,
|
|
80415
80417
|
variation: e?.variationType,
|
|
80418
|
+
// BP-6010: a draft-based render must keep the draft's authored
|
|
80419
|
+
// arrangement - opt out of fabric-render's default re-stack. Rides the
|
|
80420
|
+
// same condition as the draft so the two can never drift apart.
|
|
80421
|
+
disableAutoLayout: i ? !0 : void 0,
|
|
80416
80422
|
logo: {
|
|
80417
80423
|
template: {
|
|
80418
80424
|
token: t.logoTemplateAsset.token,
|
|
80419
80425
|
version: t.logoTemplateAsset.version
|
|
80420
80426
|
},
|
|
80421
|
-
draft: null
|
|
80427
|
+
draft: i ? { token: this.prePurchaseBrandKitLogoDraftToken } : null
|
|
80422
80428
|
},
|
|
80423
80429
|
changeRequest: {
|
|
80424
80430
|
objects: {
|
|
@@ -80440,29 +80446,29 @@ const d0 = (e) => {
|
|
|
80440
80446
|
}
|
|
80441
80447
|
}
|
|
80442
80448
|
};
|
|
80443
|
-
return n ? (
|
|
80449
|
+
return n ? (o.logo.template.placeholder = {
|
|
80444
80450
|
primaryText: e.defaultPrimaryText
|
|
80445
|
-
},
|
|
80446
|
-
const
|
|
80447
|
-
fontFamily:
|
|
80448
|
-
fill:
|
|
80449
|
-
stroke:
|
|
80450
|
-
strokeWidth:
|
|
80451
|
-
isUppercase:
|
|
80451
|
+
}, o.logo.template.layout = e.layout, o.changeRequest.layout = e.layout) : o.primaryText = e?.defaultPrimaryText, this.logoEdits.textObjects.forEach((a) => {
|
|
80452
|
+
const l = {
|
|
80453
|
+
fontFamily: a.fontFamily,
|
|
80454
|
+
fill: a.fill,
|
|
80455
|
+
stroke: a.outlineColor,
|
|
80456
|
+
strokeWidth: a.outlineEnabled ? a.outlineWidth : 0,
|
|
80457
|
+
isUppercase: a.isUppercase,
|
|
80452
80458
|
shadow: {
|
|
80453
|
-
...
|
|
80454
|
-
blur:
|
|
80455
|
-
offsetX:
|
|
80456
|
-
offsetY:
|
|
80459
|
+
...a.shadow,
|
|
80460
|
+
blur: a.shadowEnabled ? a.shadow.blur : 0,
|
|
80461
|
+
offsetX: a.shadowEnabled ? a.shadow.offsetX : 0,
|
|
80462
|
+
offsetY: a.shadowEnabled ? a.shadow.offsetY : 0
|
|
80457
80463
|
}
|
|
80458
80464
|
};
|
|
80459
|
-
|
|
80460
|
-
type:
|
|
80461
|
-
role:
|
|
80462
|
-
removed: !
|
|
80463
|
-
updates:
|
|
80465
|
+
l.textOriginal = a.text, o.changeRequest.objects[a.id] = {
|
|
80466
|
+
type: a.type,
|
|
80467
|
+
role: a.role,
|
|
80468
|
+
removed: !a.textEnabled || !a.text,
|
|
80469
|
+
updates: l
|
|
80464
80470
|
};
|
|
80465
|
-
}), await C3.getInstance().getModifiedLogoAsync(
|
|
80471
|
+
}), await C3.getInstance().getModifiedLogoAsync(o);
|
|
80466
80472
|
}
|
|
80467
80473
|
},
|
|
80468
80474
|
getters: {
|
|
@@ -82863,6 +82869,12 @@ const L2 = o3("uiContentSettings", {
|
|
|
82863
82869
|
logoTemplateMetadata: "",
|
|
82864
82870
|
isLogoDraftSaved: !1,
|
|
82865
82871
|
logoDraftToken: b.logoDraftToken || o2.v4(),
|
|
82872
|
+
// Only the container's per-mount Brand Kit seed is a REAL server
|
|
82873
|
+
// draft (the editor was opened from one - Brand Kit Edit). The
|
|
82874
|
+
// uuid fallback above is a session-local identity, and
|
|
82875
|
+
// uiStore.logoDraftToken is never cleared between mounts -
|
|
82876
|
+
// neither must ever reach fabric-render as a render base.
|
|
82877
|
+
prePurchaseBrandKitLogoDraftToken: y.prePurchaseBrandKitLogoDraftToken,
|
|
82866
82878
|
logoEdits: {
|
|
82867
82879
|
backgroundObject: {
|
|
82868
82880
|
id: "",
|
|
@@ -78,6 +78,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
78
78
|
triggerSaveSuccessMessage: boolean;
|
|
79
79
|
isDesignCom: boolean;
|
|
80
80
|
isPrePurchase: boolean;
|
|
81
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
81
82
|
makerFonts: any[];
|
|
82
83
|
eventButtonLocation?: string | undefined;
|
|
83
84
|
websiteUpsellModalViewModel?: any;
|
|
@@ -173,6 +174,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
173
174
|
triggerSaveSuccessMessage: boolean;
|
|
174
175
|
isDesignCom: boolean;
|
|
175
176
|
isPrePurchase: boolean;
|
|
177
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
176
178
|
makerFonts: any[];
|
|
177
179
|
eventButtonLocation?: string | undefined;
|
|
178
180
|
websiteUpsellModalViewModel?: any;
|
|
@@ -268,6 +270,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
268
270
|
triggerSaveSuccessMessage: boolean;
|
|
269
271
|
isDesignCom: boolean;
|
|
270
272
|
isPrePurchase: boolean;
|
|
273
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
271
274
|
makerFonts: any[];
|
|
272
275
|
eventButtonLocation?: string | undefined;
|
|
273
276
|
websiteUpsellModalViewModel?: any;
|
|
@@ -194,6 +194,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
194
194
|
getLogoPrimaryText: (state: {
|
|
195
195
|
enableEditMode: boolean;
|
|
196
196
|
logoDraftToken: string;
|
|
197
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
197
198
|
logoEdits: {
|
|
198
199
|
backgroundObject: {
|
|
199
200
|
id: string;
|
|
@@ -372,6 +373,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
372
373
|
triggerSaveSuccessMessage: boolean;
|
|
373
374
|
isDesignCom: boolean;
|
|
374
375
|
isPrePurchase: boolean;
|
|
376
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
375
377
|
makerFonts: any[];
|
|
376
378
|
eventButtonLocation?: string | undefined;
|
|
377
379
|
websiteUpsellModalViewModel?: any;
|
|
@@ -467,6 +469,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
467
469
|
triggerSaveSuccessMessage: boolean;
|
|
468
470
|
isDesignCom: boolean;
|
|
469
471
|
isPrePurchase: boolean;
|
|
472
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
470
473
|
makerFonts: any[];
|
|
471
474
|
eventButtonLocation?: string | undefined;
|
|
472
475
|
websiteUpsellModalViewModel?: any;
|
|
@@ -562,6 +565,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
562
565
|
triggerSaveSuccessMessage: boolean;
|
|
563
566
|
isDesignCom: boolean;
|
|
564
567
|
isPrePurchase: boolean;
|
|
568
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
565
569
|
makerFonts: any[];
|
|
566
570
|
eventButtonLocation?: string | undefined;
|
|
567
571
|
websiteUpsellModalViewModel?: any;
|
|
@@ -68,6 +68,7 @@ export interface EditableLogoVariation {
|
|
|
68
68
|
export interface EditableLogoState {
|
|
69
69
|
enableEditMode: boolean;
|
|
70
70
|
logoDraftToken: string;
|
|
71
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
71
72
|
logoEdits: LogoEdits;
|
|
72
73
|
makerFonts: MakerFontObject[];
|
|
73
74
|
editableLogoVariations: EditableLogoVariation[];
|
|
@@ -81,6 +82,7 @@ export declare const useUiEditableLogoStore: import("pinia").StoreDefinition<"ui
|
|
|
81
82
|
getLogoPrimaryText: (state: {
|
|
82
83
|
enableEditMode: boolean;
|
|
83
84
|
logoDraftToken: string;
|
|
85
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
84
86
|
logoEdits: {
|
|
85
87
|
backgroundObject: {
|
|
86
88
|
id: string;
|
|
@@ -11,6 +11,7 @@ export const useUiEditableLogoStore = defineStore('uiEditableLogo', {
|
|
|
11
11
|
isTextOnlyLogo: false,
|
|
12
12
|
enableEditMode: false,
|
|
13
13
|
logoDraftToken: '',
|
|
14
|
+
prePurchaseBrandKitLogoDraftToken: '',
|
|
14
15
|
editableLogoVariations: [
|
|
15
16
|
{
|
|
16
17
|
variationId: LOGO_VARIATION.LOGO_WITH_TRANSPARENT_BACKGROUND,
|
|
@@ -80,6 +81,8 @@ export const useUiEditableLogoStore = defineStore('uiEditableLogo', {
|
|
|
80
81
|
async setStateAsync(payload) {
|
|
81
82
|
this.resetLogoEdits();
|
|
82
83
|
this.setLogoDraftToken(payload.newState.logoDraftToken);
|
|
84
|
+
this.prePurchaseBrandKitLogoDraftToken =
|
|
85
|
+
payload.newState.prePurchaseBrandKitLogoDraftToken || '';
|
|
83
86
|
this.makerFonts = payload.newState.makerFonts;
|
|
84
87
|
const templateMetaResult = await this.postEditableLogoRequestAsync({
|
|
85
88
|
returnJson: true,
|
|
@@ -368,17 +371,33 @@ export const useUiEditableLogoStore = defineStore('uiEditableLogo', {
|
|
|
368
371
|
async postEditableLogoRequestAsync(payload) {
|
|
369
372
|
const logoStore = useLogoStore();
|
|
370
373
|
const hasLayout = !!payload?.layout;
|
|
374
|
+
// BP-5962: render from the Brand Kit seeded draft (a frozen copy of the
|
|
375
|
+
// user's logo) so canvas-level edits - curved text, moved objects and
|
|
376
|
+
// anything else updateLogoEdit's whitelist can't express - survive into
|
|
377
|
+
// the editor; the changeRequest still layers the editor's own edits on
|
|
378
|
+
// top. Only while the current logo IS that draft: a logo swap or a BYO
|
|
379
|
+
// upload replaces logoDraftToken with a client-minted uuid that does not
|
|
380
|
+
// exist on the server, and template-seeded flows never seed one - both
|
|
381
|
+
// keep the template-only request exactly as before.
|
|
382
|
+
const isBrandKitSeededRender = !!this.prePurchaseBrandKitLogoDraftToken &&
|
|
383
|
+
this.logoDraftToken === this.prePurchaseBrandKitLogoDraftToken;
|
|
371
384
|
const body = {
|
|
372
385
|
returnJson: payload?.returnJson || false,
|
|
373
386
|
generateS3Url: true,
|
|
374
387
|
dimensionsType: payload?.dimensionType,
|
|
375
388
|
variation: payload?.variationType,
|
|
389
|
+
// BP-6010: a draft-based render must keep the draft's authored
|
|
390
|
+
// arrangement - opt out of fabric-render's default re-stack. Rides the
|
|
391
|
+
// same condition as the draft so the two can never drift apart.
|
|
392
|
+
disableAutoLayout: isBrandKitSeededRender ? true : undefined,
|
|
376
393
|
logo: {
|
|
377
394
|
template: {
|
|
378
395
|
token: logoStore.logoTemplateAsset.token,
|
|
379
396
|
version: logoStore.logoTemplateAsset.version,
|
|
380
397
|
},
|
|
381
|
-
draft:
|
|
398
|
+
draft: isBrandKitSeededRender
|
|
399
|
+
? { token: this.prePurchaseBrandKitLogoDraftToken }
|
|
400
|
+
: null,
|
|
382
401
|
},
|
|
383
402
|
changeRequest: {
|
|
384
403
|
objects: {
|
|
@@ -4614,6 +4614,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
4614
4614
|
triggerSaveSuccessMessage: boolean;
|
|
4615
4615
|
isDesignCom: boolean;
|
|
4616
4616
|
isPrePurchase: boolean;
|
|
4617
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
4617
4618
|
makerFonts: any[];
|
|
4618
4619
|
eventButtonLocation?: string | undefined;
|
|
4619
4620
|
websiteUpsellModalViewModel?: any;
|
|
@@ -4709,6 +4710,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
4709
4710
|
triggerSaveSuccessMessage: boolean;
|
|
4710
4711
|
isDesignCom: boolean;
|
|
4711
4712
|
isPrePurchase: boolean;
|
|
4713
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
4712
4714
|
makerFonts: any[];
|
|
4713
4715
|
eventButtonLocation?: string | undefined;
|
|
4714
4716
|
websiteUpsellModalViewModel?: any;
|
|
@@ -4804,6 +4806,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
4804
4806
|
triggerSaveSuccessMessage: boolean;
|
|
4805
4807
|
isDesignCom: boolean;
|
|
4806
4808
|
isPrePurchase: boolean;
|
|
4809
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
4807
4810
|
makerFonts: any[];
|
|
4808
4811
|
eventButtonLocation?: string | undefined;
|
|
4809
4812
|
websiteUpsellModalViewModel?: any;
|
|
@@ -3979,6 +3979,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
3979
3979
|
triggerSaveSuccessMessage: boolean;
|
|
3980
3980
|
isDesignCom: boolean;
|
|
3981
3981
|
isPrePurchase: boolean;
|
|
3982
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
3982
3983
|
makerFonts: any[];
|
|
3983
3984
|
eventButtonLocation?: string | undefined;
|
|
3984
3985
|
websiteUpsellModalViewModel?: any;
|
|
@@ -4074,6 +4075,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
4074
4075
|
triggerSaveSuccessMessage: boolean;
|
|
4075
4076
|
isDesignCom: boolean;
|
|
4076
4077
|
isPrePurchase: boolean;
|
|
4078
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
4077
4079
|
makerFonts: any[];
|
|
4078
4080
|
eventButtonLocation?: string | undefined;
|
|
4079
4081
|
websiteUpsellModalViewModel?: any;
|
|
@@ -4169,6 +4171,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
4169
4171
|
triggerSaveSuccessMessage: boolean;
|
|
4170
4172
|
isDesignCom: boolean;
|
|
4171
4173
|
isPrePurchase: boolean;
|
|
4174
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
4172
4175
|
makerFonts: any[];
|
|
4173
4176
|
eventButtonLocation?: string | undefined;
|
|
4174
4177
|
websiteUpsellModalViewModel?: any;
|
|
@@ -4335,6 +4338,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
4335
4338
|
getLogoPrimaryText: (state: {
|
|
4336
4339
|
enableEditMode: boolean;
|
|
4337
4340
|
logoDraftToken: string;
|
|
4341
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
4338
4342
|
logoEdits: {
|
|
4339
4343
|
backgroundObject: {
|
|
4340
4344
|
id: string;
|
package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts
CHANGED
|
@@ -294,6 +294,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
294
294
|
triggerSaveSuccessMessage: boolean;
|
|
295
295
|
isDesignCom: boolean;
|
|
296
296
|
isPrePurchase: boolean;
|
|
297
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
297
298
|
makerFonts: any[];
|
|
298
299
|
eventButtonLocation?: string | undefined;
|
|
299
300
|
websiteUpsellModalViewModel?: any;
|
|
@@ -389,6 +390,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
389
390
|
triggerSaveSuccessMessage: boolean;
|
|
390
391
|
isDesignCom: boolean;
|
|
391
392
|
isPrePurchase: boolean;
|
|
393
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
392
394
|
makerFonts: any[];
|
|
393
395
|
eventButtonLocation?: string | undefined;
|
|
394
396
|
websiteUpsellModalViewModel?: any;
|
|
@@ -484,6 +486,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
484
486
|
triggerSaveSuccessMessage: boolean;
|
|
485
487
|
isDesignCom: boolean;
|
|
486
488
|
isPrePurchase: boolean;
|
|
489
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
487
490
|
makerFonts: any[];
|
|
488
491
|
eventButtonLocation?: string | undefined;
|
|
489
492
|
websiteUpsellModalViewModel?: any;
|
|
@@ -71,6 +71,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
71
71
|
triggerSaveSuccessMessage: boolean;
|
|
72
72
|
isDesignCom: boolean;
|
|
73
73
|
isPrePurchase: boolean;
|
|
74
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
74
75
|
makerFonts: any[];
|
|
75
76
|
eventButtonLocation?: string | undefined;
|
|
76
77
|
websiteUpsellModalViewModel?: any;
|
|
@@ -166,6 +167,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
166
167
|
triggerSaveSuccessMessage: boolean;
|
|
167
168
|
isDesignCom: boolean;
|
|
168
169
|
isPrePurchase: boolean;
|
|
170
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
169
171
|
makerFonts: any[];
|
|
170
172
|
eventButtonLocation?: string | undefined;
|
|
171
173
|
websiteUpsellModalViewModel?: any;
|
|
@@ -261,6 +263,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
261
263
|
triggerSaveSuccessMessage: boolean;
|
|
262
264
|
isDesignCom: boolean;
|
|
263
265
|
isPrePurchase: boolean;
|
|
266
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
264
267
|
makerFonts: any[];
|
|
265
268
|
eventButtonLocation?: string | undefined;
|
|
266
269
|
websiteUpsellModalViewModel?: any;
|
|
@@ -678,6 +678,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
678
678
|
triggerSaveSuccessMessage: boolean;
|
|
679
679
|
isDesignCom: boolean;
|
|
680
680
|
isPrePurchase: boolean;
|
|
681
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
681
682
|
makerFonts: any[];
|
|
682
683
|
eventButtonLocation?: string | undefined;
|
|
683
684
|
websiteUpsellModalViewModel?: any;
|
|
@@ -773,6 +774,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
773
774
|
triggerSaveSuccessMessage: boolean;
|
|
774
775
|
isDesignCom: boolean;
|
|
775
776
|
isPrePurchase: boolean;
|
|
777
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
776
778
|
makerFonts: any[];
|
|
777
779
|
eventButtonLocation?: string | undefined;
|
|
778
780
|
websiteUpsellModalViewModel?: any;
|
|
@@ -868,6 +870,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
868
870
|
triggerSaveSuccessMessage: boolean;
|
|
869
871
|
isDesignCom: boolean;
|
|
870
872
|
isPrePurchase: boolean;
|
|
873
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
871
874
|
makerFonts: any[];
|
|
872
875
|
eventButtonLocation?: string | undefined;
|
|
873
876
|
websiteUpsellModalViewModel?: any;
|
package/package.json
CHANGED
|
@@ -87,3 +87,56 @@ describe('brand-page-container-store initialise — admin maker mapping', () =>
|
|
|
87
87
|
expect(store.isAdminMaker).toBe(false);
|
|
88
88
|
});
|
|
89
89
|
});
|
|
90
|
+
|
|
91
|
+
describe('brand-page-container-store initialise — Brand Kit token (BP-5962)', () => {
|
|
92
|
+
beforeEach(() => {
|
|
93
|
+
setActivePinia(createPinia());
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
test('consumes the explicit prePurchaseBrandKitLogoDraftToken from the host', () => {
|
|
97
|
+
const store = useBrandPageContainerStore();
|
|
98
|
+
|
|
99
|
+
store.initialise(
|
|
100
|
+
createInitialisePayload({
|
|
101
|
+
prePurchaseBrandKitLogoDraftToken: 'brand-kit-copy-token',
|
|
102
|
+
}),
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
expect(store.prePurchaseBrandKitLogoDraftToken).toBe(
|
|
106
|
+
'brand-kit-copy-token',
|
|
107
|
+
);
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
test('leaves the token empty when the host omits it — even for a prepurchase logo draft (the old inference is gone)', () => {
|
|
111
|
+
const store = useBrandPageContainerStore();
|
|
112
|
+
|
|
113
|
+
// Pre-BP-5962 this derived the token from isPrePurchase && logoDraftToken, which
|
|
114
|
+
// wrongly fired on every reload of a normal saved prepurchase draft. It must now
|
|
115
|
+
// stay empty unless the host supplies the explicit field.
|
|
116
|
+
store.initialise(
|
|
117
|
+
createInitialisePayload({
|
|
118
|
+
isPrePurchase: true,
|
|
119
|
+
logoDraftToken: 'a-normal-prepurchase-logo-token',
|
|
120
|
+
}),
|
|
121
|
+
);
|
|
122
|
+
|
|
123
|
+
expect(store.prePurchaseBrandKitLogoDraftToken).toBe('');
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
test('clears a stale token from a previous mount when the next payload omits it', () => {
|
|
127
|
+
const store = useBrandPageContainerStore();
|
|
128
|
+
|
|
129
|
+
store.initialise(
|
|
130
|
+
createInitialisePayload({
|
|
131
|
+
prePurchaseBrandKitLogoDraftToken: 'brand-kit-copy-token',
|
|
132
|
+
}),
|
|
133
|
+
);
|
|
134
|
+
expect(store.prePurchaseBrandKitLogoDraftToken).toBe(
|
|
135
|
+
'brand-kit-copy-token',
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
store.initialise(createInitialisePayload());
|
|
139
|
+
|
|
140
|
+
expect(store.prePurchaseBrandKitLogoDraftToken).toBe('');
|
|
141
|
+
});
|
|
142
|
+
});
|
|
@@ -89,6 +89,12 @@ export interface BrandPageContainerState {
|
|
|
89
89
|
triggerSaveSuccessMessage: boolean;
|
|
90
90
|
isDesignCom: boolean;
|
|
91
91
|
isPrePurchase: boolean;
|
|
92
|
+
// BP-5962: the REAL server logo draft this PREPURCHASE editor mount was
|
|
93
|
+
// seeded with (the Brand Kit Edit flow - a frozen copy of the user's logo),
|
|
94
|
+
// or '' when the entry carries none. Rewritten on EVERY initialise -
|
|
95
|
+
// unlike uiStore.logoDraftToken, which is never cleared and can go stale
|
|
96
|
+
// across client-side editor-to-editor navigation.
|
|
97
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
92
98
|
makerFonts: any[];
|
|
93
99
|
eventButtonLocation?: string;
|
|
94
100
|
websiteUpsellModalViewModel?: any;
|
|
@@ -119,9 +125,15 @@ export type GettyVideoEditorViewModelResponse = {
|
|
|
119
125
|
|
|
120
126
|
export type InitialisePayload = Omit<
|
|
121
127
|
BrandPageContainerState,
|
|
122
|
-
|
|
128
|
+
| 'customDomain'
|
|
129
|
+
| 'customDomainConfig'
|
|
130
|
+
| 'isAdminMaker'
|
|
131
|
+
| 'prePurchaseBrandKitLogoDraftToken'
|
|
123
132
|
> & {
|
|
124
133
|
logoDraftToken?: string;
|
|
134
|
+
// BP-5962: the Brand Kit logo copy's token, supplied EXPLICITLY by the host (set only for Brand Kit
|
|
135
|
+
// logos). Never derived. Absent for normal prepurchase/template logos.
|
|
136
|
+
prePurchaseBrandKitLogoDraftToken?: string;
|
|
125
137
|
isAdminMaker?: boolean;
|
|
126
138
|
brandPageCustomDomain?: CustomDomainModel;
|
|
127
139
|
isBrandPageCustomDomainEnabled: boolean;
|
|
@@ -181,6 +193,7 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
181
193
|
isSellDomainNameEnabled: false,
|
|
182
194
|
isDesignCom: false,
|
|
183
195
|
isPrePurchase: false,
|
|
196
|
+
prePurchaseBrandKitLogoDraftToken: '',
|
|
184
197
|
makerFonts: [],
|
|
185
198
|
eventButtonLocation: undefined,
|
|
186
199
|
websiteUpsellModalViewModel: undefined,
|
|
@@ -291,6 +304,12 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
291
304
|
uiStore.setLogoDraftToken({ logoDraftToken: payload.logoDraftToken });
|
|
292
305
|
}
|
|
293
306
|
|
|
307
|
+
// BP-5962: consume the host's explicit token verbatim (set unconditionally so a stale token from a
|
|
308
|
+
// previous editor mount never leaks in). The old derivation from isPrePurchase + logoDraftToken is
|
|
309
|
+
// gone — it fired on every reload of a normal saved draft and wrongly rendered it from the draft.
|
|
310
|
+
this.prePurchaseBrandKitLogoDraftToken =
|
|
311
|
+
payload.prePurchaseBrandKitLogoDraftToken || '';
|
|
312
|
+
|
|
294
313
|
payload?.gettyVideos?.forEach((video) =>
|
|
295
314
|
videoStore.setVideoUrlsWithToken(
|
|
296
315
|
video.token,
|
|
@@ -1435,6 +1435,13 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
1435
1435
|
logoTemplateMetadata: '',
|
|
1436
1436
|
isLogoDraftSaved: false,
|
|
1437
1437
|
logoDraftToken: uiStore.logoDraftToken || uuid.v4(),
|
|
1438
|
+
// Only the container's per-mount Brand Kit seed is a REAL server
|
|
1439
|
+
// draft (the editor was opened from one - Brand Kit Edit). The
|
|
1440
|
+
// uuid fallback above is a session-local identity, and
|
|
1441
|
+
// uiStore.logoDraftToken is never cleared between mounts -
|
|
1442
|
+
// neither must ever reach fabric-render as a render base.
|
|
1443
|
+
prePurchaseBrandKitLogoDraftToken:
|
|
1444
|
+
brandPageContainerStore.prePurchaseBrandKitLogoDraftToken,
|
|
1438
1445
|
logoEdits: {
|
|
1439
1446
|
backgroundObject: {
|
|
1440
1447
|
id: '',
|
|
@@ -32,6 +32,11 @@ export interface ModifyLogoDataRequest {
|
|
|
32
32
|
variation: string;
|
|
33
33
|
primaryText?: string;
|
|
34
34
|
generateS3Url?: boolean;
|
|
35
|
+
// BP-6010: opt out of fabric-render's default re-stack after a changeRequest.
|
|
36
|
+
// Sent only on Brand Kit prepurchase renders, where the render base is the
|
|
37
|
+
// user's seeded logo draft and its authored arrangement must be preserved.
|
|
38
|
+
// Absent/false keeps fabric-render's behaviour unchanged for everyone else.
|
|
39
|
+
disableAutoLayout?: boolean;
|
|
35
40
|
logo: {
|
|
36
41
|
template: {
|
|
37
42
|
token: string;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { createPinia, setActivePinia } from 'pinia';
|
|
2
|
+
import { useLogoStore } from '@brand-page-maker/stores';
|
|
3
|
+
import { useUiEditableLogoStore } from './editable-logo-store';
|
|
4
|
+
import { FabricRenderClient } from '../../../clients/fabric-render-client';
|
|
5
|
+
|
|
6
|
+
const LOGO_TEMPLATE_TOKEN = '46059687-5bed-4fc0-b933-7563d236d66f';
|
|
7
|
+
const BRAND_KIT_DRAFT_TOKEN = '6bfd97ca-1359-4ad7-aa99-4ee70f334d7c';
|
|
8
|
+
const CLIENT_MINTED_TOKEN = '11111111-2222-3333-4444-555555555555';
|
|
9
|
+
|
|
10
|
+
describe('editable logo store — postEditableLogoRequestAsync body', () => {
|
|
11
|
+
let getModifiedLogoAsyncMock: ReturnType<typeof vi.fn>;
|
|
12
|
+
|
|
13
|
+
beforeEach(() => {
|
|
14
|
+
setActivePinia(createPinia());
|
|
15
|
+
|
|
16
|
+
const logoStore = useLogoStore();
|
|
17
|
+
|
|
18
|
+
logoStore.setLogoTemplateAsset({
|
|
19
|
+
token: LOGO_TEMPLATE_TOKEN,
|
|
20
|
+
version: 1,
|
|
21
|
+
} as any);
|
|
22
|
+
|
|
23
|
+
getModifiedLogoAsyncMock = vi.fn().mockResolvedValue({
|
|
24
|
+
base64: null,
|
|
25
|
+
metadata: '{"objects":[]}',
|
|
26
|
+
width: 0,
|
|
27
|
+
height: 0,
|
|
28
|
+
});
|
|
29
|
+
vi.spyOn(FabricRenderClient, 'getInstance').mockReturnValue({
|
|
30
|
+
getModifiedLogoAsync: getModifiedLogoAsyncMock,
|
|
31
|
+
} as unknown as FabricRenderClient);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
afterEach(() => {
|
|
35
|
+
vi.restoreAllMocks();
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
async function requestBodyForState(state: {
|
|
39
|
+
logoDraftToken: string;
|
|
40
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
41
|
+
}) {
|
|
42
|
+
const store = useUiEditableLogoStore();
|
|
43
|
+
|
|
44
|
+
store.logoDraftToken = state.logoDraftToken;
|
|
45
|
+
store.prePurchaseBrandKitLogoDraftToken =
|
|
46
|
+
state.prePurchaseBrandKitLogoDraftToken;
|
|
47
|
+
|
|
48
|
+
await store.postEditableLogoRequestAsync({
|
|
49
|
+
returnJson: true,
|
|
50
|
+
dimensionType: 'preview_image_transparent_no_buffer',
|
|
51
|
+
variationType: '',
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
expect(getModifiedLogoAsyncMock).toHaveBeenCalledTimes(1);
|
|
55
|
+
|
|
56
|
+
return getModifiedLogoAsyncMock.mock.calls[0][0];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
it('sends the seeded draft AND disableAutoLayout on a Brand Kit render', async () => {
|
|
60
|
+
const body = await requestBodyForState({
|
|
61
|
+
logoDraftToken: BRAND_KIT_DRAFT_TOKEN,
|
|
62
|
+
prePurchaseBrandKitLogoDraftToken: BRAND_KIT_DRAFT_TOKEN,
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
// BP-6010: the draft's authored arrangement must survive the render, so
|
|
66
|
+
// the opt-out from fabric-render's default re-stack rides with the draft.
|
|
67
|
+
expect(body.logo.draft).toEqual({ token: BRAND_KIT_DRAFT_TOKEN });
|
|
68
|
+
expect(body.disableAutoLayout).toBe(true);
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
it('sends neither on a template-seeded render (no Brand Kit seed)', async () => {
|
|
72
|
+
const body = await requestBodyForState({
|
|
73
|
+
logoDraftToken: CLIENT_MINTED_TOKEN,
|
|
74
|
+
prePurchaseBrandKitLogoDraftToken: '',
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
expect(body.logo.draft).toBeNull();
|
|
78
|
+
expect(body.disableAutoLayout).toBeUndefined();
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
it('sends neither after a logo swap replaces the seeded draft', async () => {
|
|
82
|
+
const body = await requestBodyForState({
|
|
83
|
+
logoDraftToken: CLIENT_MINTED_TOKEN,
|
|
84
|
+
prePurchaseBrandKitLogoDraftToken: BRAND_KIT_DRAFT_TOKEN,
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
expect(body.logo.draft).toBeNull();
|
|
88
|
+
expect(body.disableAutoLayout).toBeUndefined();
|
|
89
|
+
});
|
|
90
|
+
});
|
|
@@ -110,6 +110,12 @@ export interface EditableLogoVariation {
|
|
|
110
110
|
export interface EditableLogoState {
|
|
111
111
|
enableEditMode: boolean;
|
|
112
112
|
logoDraftToken: string;
|
|
113
|
+
// BP-5962: the REAL server draft this editor was seeded with (the Brand Kit
|
|
114
|
+
// Edit flow - a frozen copy of the user's logo), or '' for template-seeded
|
|
115
|
+
// flows. Distinct from logoDraftToken, which is often a client-minted uuid
|
|
116
|
+
// that does not exist on the server (the initialise fallback, in-editor
|
|
117
|
+
// logo swaps, BYO uploads) and must never be sent to fabric-render.
|
|
118
|
+
prePurchaseBrandKitLogoDraftToken: string;
|
|
113
119
|
logoEdits: LogoEdits;
|
|
114
120
|
makerFonts: MakerFontObject[];
|
|
115
121
|
editableLogoVariations: EditableLogoVariation[];
|
|
@@ -133,6 +139,7 @@ export const useUiEditableLogoStore = defineStore('uiEditableLogo', {
|
|
|
133
139
|
isTextOnlyLogo: false,
|
|
134
140
|
enableEditMode: false,
|
|
135
141
|
logoDraftToken: '',
|
|
142
|
+
prePurchaseBrandKitLogoDraftToken: '',
|
|
136
143
|
editableLogoVariations: [
|
|
137
144
|
{
|
|
138
145
|
variationId: LOGO_VARIATION.LOGO_WITH_TRANSPARENT_BACKGROUND,
|
|
@@ -206,6 +213,8 @@ export const useUiEditableLogoStore = defineStore('uiEditableLogo', {
|
|
|
206
213
|
}) {
|
|
207
214
|
this.resetLogoEdits();
|
|
208
215
|
this.setLogoDraftToken(payload.newState.logoDraftToken);
|
|
216
|
+
this.prePurchaseBrandKitLogoDraftToken =
|
|
217
|
+
payload.newState.prePurchaseBrandKitLogoDraftToken || '';
|
|
209
218
|
this.makerFonts = payload.newState.makerFonts;
|
|
210
219
|
|
|
211
220
|
const templateMetaResult = await this.postEditableLogoRequestAsync({
|
|
@@ -625,17 +634,35 @@ export const useUiEditableLogoStore = defineStore('uiEditableLogo', {
|
|
|
625
634
|
|
|
626
635
|
const hasLayout = !!payload?.layout;
|
|
627
636
|
|
|
637
|
+
// BP-5962: render from the Brand Kit seeded draft (a frozen copy of the
|
|
638
|
+
// user's logo) so canvas-level edits - curved text, moved objects and
|
|
639
|
+
// anything else updateLogoEdit's whitelist can't express - survive into
|
|
640
|
+
// the editor; the changeRequest still layers the editor's own edits on
|
|
641
|
+
// top. Only while the current logo IS that draft: a logo swap or a BYO
|
|
642
|
+
// upload replaces logoDraftToken with a client-minted uuid that does not
|
|
643
|
+
// exist on the server, and template-seeded flows never seed one - both
|
|
644
|
+
// keep the template-only request exactly as before.
|
|
645
|
+
const isBrandKitSeededRender =
|
|
646
|
+
!!this.prePurchaseBrandKitLogoDraftToken &&
|
|
647
|
+
this.logoDraftToken === this.prePurchaseBrandKitLogoDraftToken;
|
|
648
|
+
|
|
628
649
|
const body: ModifyLogoDataRequest = {
|
|
629
650
|
returnJson: payload?.returnJson || false,
|
|
630
651
|
generateS3Url: true,
|
|
631
652
|
dimensionsType: payload?.dimensionType,
|
|
632
653
|
variation: payload?.variationType,
|
|
654
|
+
// BP-6010: a draft-based render must keep the draft's authored
|
|
655
|
+
// arrangement - opt out of fabric-render's default re-stack. Rides the
|
|
656
|
+
// same condition as the draft so the two can never drift apart.
|
|
657
|
+
disableAutoLayout: isBrandKitSeededRender ? true : undefined,
|
|
633
658
|
logo: {
|
|
634
659
|
template: {
|
|
635
660
|
token: logoStore.logoTemplateAsset!.token,
|
|
636
661
|
version: logoStore.logoTemplateAsset!.version,
|
|
637
662
|
},
|
|
638
|
-
draft:
|
|
663
|
+
draft: isBrandKitSeededRender
|
|
664
|
+
? { token: this.prePurchaseBrandKitLogoDraftToken }
|
|
665
|
+
: null,
|
|
639
666
|
},
|
|
640
667
|
changeRequest: {
|
|
641
668
|
objects: {
|