@designcrowd/library.brand-page 6.2.2-live-preview-1 → 6.2.2

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.
Files changed (43) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-Cn0M-eZ1.js → CreatedOnBrandCrowd-de-de-7P2gNr-R.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-DRLMSDZr.js → CreatedOnBrandCrowd-en-us-Dl7BymW6.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-BglTu73U.js → CreatedOnBrandCrowd-es-es-CO4FvWVw.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-Bj6YZ_el.js → CreatedOnBrandCrowd-fr-ca-DHNqakQu.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-Bj6YZ_el.js → CreatedOnBrandCrowd-fr-fr-DHNqakQu.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-DEoOmQ1F.js → CreatedOnBrandCrowd-pt-br-CGUC-ZbP.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-DEoOmQ1F.js → CreatedOnBrandCrowd-pt-pt-CGUC-ZbP.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-BZ7gTt4Z.js → CreatedOnDcom-de-de-Dvds-Vmy.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-CD6Km5sH.js → CreatedOnDcom-en-us-fd3C-8Tp.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-CNpZHvEl.js → CreatedOnDcom-es-es-DTXZW35-.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-URS-ydJ1.js → CreatedOnDcom-fr-ca-DRCYOKPs.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-D2AVeA3H.js → CreatedOnDcom-fr-fr-DpIB8x2x.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-C32frnFs.js → CreatedOnDcom-pt-br-Esnxy8wX.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-TDYGjRXS.js → CreatedOnDcom-pt-pt-CaiVHFXR.js} +1 -1
  15. package/lib/src/brand-page/models/brand-page-context.model.d.ts +2 -0
  16. package/lib/src/brand-page/models/brand-page-context.model.js +12 -0
  17. package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +1 -0
  18. package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.js +9 -0
  19. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +42 -0
  20. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +42 -0
  21. package/lib/src/brand-page-maker/components/preview/Preview.mixin.d.ts +14 -0
  22. package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.d.ts +42 -0
  23. package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +42 -0
  24. package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +42 -0
  25. package/lib/src/brand-page-maker/components/seo-settings/UseExistingDomainModal.mixin.d.ts +42 -0
  26. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +42 -0
  27. package/lib/src/brand-page-maker/components/upgrade-to-premium-button/UpgradeToPremiumButton.mixin.d.ts +42 -0
  28. package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +42 -0
  29. package/lib/src/index.mjs +1 -1
  30. package/lib/src/{lib-Dm9AuOJL.js → lib-V7aqfuiB.js} +10906 -10891
  31. package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +42 -0
  32. package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +42 -0
  33. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +42 -0
  34. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +42 -0
  35. package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +56 -0
  36. package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +42 -0
  37. package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +42 -0
  38. package/package.json +1 -1
  39. package/src/brand-page/models/brand-page-context.model.ts +23 -0
  40. package/src/brand-page-maker/components/action-bar/ActionBar.mixin.ts +10 -0
  41. package/src/brand-page-maker/components/action-bar/ActionBarNavigation.test.ts +49 -8
  42. package/src/brand-page-maker/components/action-bar/ActionBarNavigation.vue +1 -1
  43. package/src/shared/page-settings/store/page-settings-store.test.ts +71 -0
@@ -91,6 +91,20 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
91
91
  isVariation: boolean;
92
92
  isExcluded: boolean;
93
93
  } | undefined;
94
+ bp_5873_live_preview_prepurchase?: {
95
+ key: string;
96
+ value: string;
97
+ isControl: boolean;
98
+ isVariation: boolean;
99
+ isExcluded: boolean;
100
+ } | undefined;
101
+ bp_5873_live_preview_postpurchase?: {
102
+ key: string;
103
+ value: string;
104
+ isControl: boolean;
105
+ isVariation: boolean;
106
+ isExcluded: boolean;
107
+ } | undefined;
94
108
  };
95
109
  isSubsequentPublish: boolean;
96
110
  isContextualUpgradeModalVisible: boolean;
@@ -166,6 +180,20 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
166
180
  isVariation: boolean;
167
181
  isExcluded: boolean;
168
182
  } | undefined;
183
+ bp_5873_live_preview_prepurchase?: {
184
+ key: string;
185
+ value: string;
186
+ isControl: boolean;
187
+ isVariation: boolean;
188
+ isExcluded: boolean;
189
+ } | undefined;
190
+ bp_5873_live_preview_postpurchase?: {
191
+ key: string;
192
+ value: string;
193
+ isControl: boolean;
194
+ isVariation: boolean;
195
+ isExcluded: boolean;
196
+ } | undefined;
169
197
  };
170
198
  isSubsequentPublish: boolean;
171
199
  isContextualUpgradeModalVisible: boolean;
@@ -241,6 +269,20 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
241
269
  isVariation: boolean;
242
270
  isExcluded: boolean;
243
271
  } | undefined;
272
+ bp_5873_live_preview_prepurchase?: {
273
+ key: string;
274
+ value: string;
275
+ isControl: boolean;
276
+ isVariation: boolean;
277
+ isExcluded: boolean;
278
+ } | undefined;
279
+ bp_5873_live_preview_postpurchase?: {
280
+ key: string;
281
+ value: string;
282
+ isControl: boolean;
283
+ isVariation: boolean;
284
+ isExcluded: boolean;
285
+ } | undefined;
244
286
  };
245
287
  isSubsequentPublish: boolean;
246
288
  isContextualUpgradeModalVisible: boolean;
@@ -387,6 +387,20 @@ declare const _default: import("vue").DefineComponent<{}, {
387
387
  isVariation: boolean;
388
388
  isExcluded: boolean;
389
389
  } | undefined;
390
+ bp_5873_live_preview_prepurchase?: {
391
+ key: string;
392
+ value: string;
393
+ isControl: boolean;
394
+ isVariation: boolean;
395
+ isExcluded: boolean;
396
+ } | undefined;
397
+ bp_5873_live_preview_postpurchase?: {
398
+ key: string;
399
+ value: string;
400
+ isControl: boolean;
401
+ isVariation: boolean;
402
+ isExcluded: boolean;
403
+ } | undefined;
390
404
  };
391
405
  isSubsequentPublish: boolean;
392
406
  isContextualUpgradeModalVisible: boolean;
@@ -462,6 +476,20 @@ declare const _default: import("vue").DefineComponent<{}, {
462
476
  isVariation: boolean;
463
477
  isExcluded: boolean;
464
478
  } | undefined;
479
+ bp_5873_live_preview_prepurchase?: {
480
+ key: string;
481
+ value: string;
482
+ isControl: boolean;
483
+ isVariation: boolean;
484
+ isExcluded: boolean;
485
+ } | undefined;
486
+ bp_5873_live_preview_postpurchase?: {
487
+ key: string;
488
+ value: string;
489
+ isControl: boolean;
490
+ isVariation: boolean;
491
+ isExcluded: boolean;
492
+ } | undefined;
465
493
  };
466
494
  isSubsequentPublish: boolean;
467
495
  isContextualUpgradeModalVisible: boolean;
@@ -537,6 +565,20 @@ declare const _default: import("vue").DefineComponent<{}, {
537
565
  isVariation: boolean;
538
566
  isExcluded: boolean;
539
567
  } | undefined;
568
+ bp_5873_live_preview_prepurchase?: {
569
+ key: string;
570
+ value: string;
571
+ isControl: boolean;
572
+ isVariation: boolean;
573
+ isExcluded: boolean;
574
+ } | undefined;
575
+ bp_5873_live_preview_postpurchase?: {
576
+ key: string;
577
+ value: string;
578
+ isControl: boolean;
579
+ isVariation: boolean;
580
+ isExcluded: boolean;
581
+ } | undefined;
540
582
  };
541
583
  isSubsequentPublish: boolean;
542
584
  isContextualUpgradeModalVisible: boolean;
@@ -4823,6 +4823,20 @@ declare const _default: import("vue").DefineComponent<{}, {
4823
4823
  isVariation: boolean;
4824
4824
  isExcluded: boolean;
4825
4825
  } | undefined;
4826
+ bp_5873_live_preview_prepurchase?: {
4827
+ key: string;
4828
+ value: string;
4829
+ isControl: boolean;
4830
+ isVariation: boolean;
4831
+ isExcluded: boolean;
4832
+ } | undefined;
4833
+ bp_5873_live_preview_postpurchase?: {
4834
+ key: string;
4835
+ value: string;
4836
+ isControl: boolean;
4837
+ isVariation: boolean;
4838
+ isExcluded: boolean;
4839
+ } | undefined;
4826
4840
  };
4827
4841
  isSubsequentPublish: boolean;
4828
4842
  isContextualUpgradeModalVisible: boolean;
@@ -4898,6 +4912,20 @@ declare const _default: import("vue").DefineComponent<{}, {
4898
4912
  isVariation: boolean;
4899
4913
  isExcluded: boolean;
4900
4914
  } | undefined;
4915
+ bp_5873_live_preview_prepurchase?: {
4916
+ key: string;
4917
+ value: string;
4918
+ isControl: boolean;
4919
+ isVariation: boolean;
4920
+ isExcluded: boolean;
4921
+ } | undefined;
4922
+ bp_5873_live_preview_postpurchase?: {
4923
+ key: string;
4924
+ value: string;
4925
+ isControl: boolean;
4926
+ isVariation: boolean;
4927
+ isExcluded: boolean;
4928
+ } | undefined;
4901
4929
  };
4902
4930
  isSubsequentPublish: boolean;
4903
4931
  isContextualUpgradeModalVisible: boolean;
@@ -4973,6 +5001,20 @@ declare const _default: import("vue").DefineComponent<{}, {
4973
5001
  isVariation: boolean;
4974
5002
  isExcluded: boolean;
4975
5003
  } | undefined;
5004
+ bp_5873_live_preview_prepurchase?: {
5005
+ key: string;
5006
+ value: string;
5007
+ isControl: boolean;
5008
+ isVariation: boolean;
5009
+ isExcluded: boolean;
5010
+ } | undefined;
5011
+ bp_5873_live_preview_postpurchase?: {
5012
+ key: string;
5013
+ value: string;
5014
+ isControl: boolean;
5015
+ isVariation: boolean;
5016
+ isExcluded: boolean;
5017
+ } | undefined;
4976
5018
  };
4977
5019
  isSubsequentPublish: boolean;
4978
5020
  isContextualUpgradeModalVisible: boolean;
@@ -4174,6 +4174,20 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
4174
4174
  isVariation: boolean;
4175
4175
  isExcluded: boolean;
4176
4176
  } | undefined;
4177
+ bp_5873_live_preview_prepurchase?: {
4178
+ key: string;
4179
+ value: string;
4180
+ isControl: boolean;
4181
+ isVariation: boolean;
4182
+ isExcluded: boolean;
4183
+ } | undefined;
4184
+ bp_5873_live_preview_postpurchase?: {
4185
+ key: string;
4186
+ value: string;
4187
+ isControl: boolean;
4188
+ isVariation: boolean;
4189
+ isExcluded: boolean;
4190
+ } | undefined;
4177
4191
  };
4178
4192
  isSubsequentPublish: boolean;
4179
4193
  isContextualUpgradeModalVisible: boolean;
@@ -4249,6 +4263,20 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
4249
4263
  isVariation: boolean;
4250
4264
  isExcluded: boolean;
4251
4265
  } | undefined;
4266
+ bp_5873_live_preview_prepurchase?: {
4267
+ key: string;
4268
+ value: string;
4269
+ isControl: boolean;
4270
+ isVariation: boolean;
4271
+ isExcluded: boolean;
4272
+ } | undefined;
4273
+ bp_5873_live_preview_postpurchase?: {
4274
+ key: string;
4275
+ value: string;
4276
+ isControl: boolean;
4277
+ isVariation: boolean;
4278
+ isExcluded: boolean;
4279
+ } | undefined;
4252
4280
  };
4253
4281
  isSubsequentPublish: boolean;
4254
4282
  isContextualUpgradeModalVisible: boolean;
@@ -4324,6 +4352,20 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
4324
4352
  isVariation: boolean;
4325
4353
  isExcluded: boolean;
4326
4354
  } | undefined;
4355
+ bp_5873_live_preview_prepurchase?: {
4356
+ key: string;
4357
+ value: string;
4358
+ isControl: boolean;
4359
+ isVariation: boolean;
4360
+ isExcluded: boolean;
4361
+ } | undefined;
4362
+ bp_5873_live_preview_postpurchase?: {
4363
+ key: string;
4364
+ value: string;
4365
+ isControl: boolean;
4366
+ isVariation: boolean;
4367
+ isExcluded: boolean;
4368
+ } | undefined;
4327
4369
  };
4328
4370
  isSubsequentPublish: boolean;
4329
4371
  isContextualUpgradeModalVisible: boolean;
@@ -70,6 +70,20 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
70
70
  isVariation: boolean;
71
71
  isExcluded: boolean;
72
72
  } | undefined;
73
+ bp_5873_live_preview_prepurchase?: {
74
+ key: string;
75
+ value: string;
76
+ isControl: boolean;
77
+ isVariation: boolean;
78
+ isExcluded: boolean;
79
+ } | undefined;
80
+ bp_5873_live_preview_postpurchase?: {
81
+ key: string;
82
+ value: string;
83
+ isControl: boolean;
84
+ isVariation: boolean;
85
+ isExcluded: boolean;
86
+ } | undefined;
73
87
  }>;
74
88
  brandPageType: import("vue").ComputedRef<"default" | "brandSite" | "brandContact">;
75
89
  isSubsequentPublish: import("vue").ComputedRef<boolean>;
@@ -287,6 +301,20 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
287
301
  isVariation: boolean;
288
302
  isExcluded: boolean;
289
303
  } | undefined;
304
+ bp_5873_live_preview_prepurchase?: {
305
+ key: string;
306
+ value: string;
307
+ isControl: boolean;
308
+ isVariation: boolean;
309
+ isExcluded: boolean;
310
+ } | undefined;
311
+ bp_5873_live_preview_postpurchase?: {
312
+ key: string;
313
+ value: string;
314
+ isControl: boolean;
315
+ isVariation: boolean;
316
+ isExcluded: boolean;
317
+ } | undefined;
290
318
  };
291
319
  isSubsequentPublish: boolean;
292
320
  isContextualUpgradeModalVisible: boolean;
@@ -362,6 +390,20 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
362
390
  isVariation: boolean;
363
391
  isExcluded: boolean;
364
392
  } | undefined;
393
+ bp_5873_live_preview_prepurchase?: {
394
+ key: string;
395
+ value: string;
396
+ isControl: boolean;
397
+ isVariation: boolean;
398
+ isExcluded: boolean;
399
+ } | undefined;
400
+ bp_5873_live_preview_postpurchase?: {
401
+ key: string;
402
+ value: string;
403
+ isControl: boolean;
404
+ isVariation: boolean;
405
+ isExcluded: boolean;
406
+ } | undefined;
365
407
  };
366
408
  isSubsequentPublish: boolean;
367
409
  isContextualUpgradeModalVisible: boolean;
@@ -437,6 +479,20 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
437
479
  isVariation: boolean;
438
480
  isExcluded: boolean;
439
481
  } | undefined;
482
+ bp_5873_live_preview_prepurchase?: {
483
+ key: string;
484
+ value: string;
485
+ isControl: boolean;
486
+ isVariation: boolean;
487
+ isExcluded: boolean;
488
+ } | undefined;
489
+ bp_5873_live_preview_postpurchase?: {
490
+ key: string;
491
+ value: string;
492
+ isControl: boolean;
493
+ isVariation: boolean;
494
+ isExcluded: boolean;
495
+ } | undefined;
440
496
  };
441
497
  isSubsequentPublish: boolean;
442
498
  isContextualUpgradeModalVisible: boolean;
@@ -84,6 +84,20 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
84
84
  isVariation: boolean;
85
85
  isExcluded: boolean;
86
86
  } | undefined;
87
+ bp_5873_live_preview_prepurchase?: {
88
+ key: string;
89
+ value: string;
90
+ isControl: boolean;
91
+ isVariation: boolean;
92
+ isExcluded: boolean;
93
+ } | undefined;
94
+ bp_5873_live_preview_postpurchase?: {
95
+ key: string;
96
+ value: string;
97
+ isControl: boolean;
98
+ isVariation: boolean;
99
+ isExcluded: boolean;
100
+ } | undefined;
87
101
  };
88
102
  isSubsequentPublish: boolean;
89
103
  isContextualUpgradeModalVisible: boolean;
@@ -159,6 +173,20 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
159
173
  isVariation: boolean;
160
174
  isExcluded: boolean;
161
175
  } | undefined;
176
+ bp_5873_live_preview_prepurchase?: {
177
+ key: string;
178
+ value: string;
179
+ isControl: boolean;
180
+ isVariation: boolean;
181
+ isExcluded: boolean;
182
+ } | undefined;
183
+ bp_5873_live_preview_postpurchase?: {
184
+ key: string;
185
+ value: string;
186
+ isControl: boolean;
187
+ isVariation: boolean;
188
+ isExcluded: boolean;
189
+ } | undefined;
162
190
  };
163
191
  isSubsequentPublish: boolean;
164
192
  isContextualUpgradeModalVisible: boolean;
@@ -234,6 +262,20 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
234
262
  isVariation: boolean;
235
263
  isExcluded: boolean;
236
264
  } | undefined;
265
+ bp_5873_live_preview_prepurchase?: {
266
+ key: string;
267
+ value: string;
268
+ isControl: boolean;
269
+ isVariation: boolean;
270
+ isExcluded: boolean;
271
+ } | undefined;
272
+ bp_5873_live_preview_postpurchase?: {
273
+ key: string;
274
+ value: string;
275
+ isControl: boolean;
276
+ isVariation: boolean;
277
+ isExcluded: boolean;
278
+ } | undefined;
237
279
  };
238
280
  isSubsequentPublish: boolean;
239
281
  isContextualUpgradeModalVisible: boolean;
@@ -592,6 +592,20 @@ declare const _default: import("vue").DefineComponent<{}, {
592
592
  isVariation: boolean;
593
593
  isExcluded: boolean;
594
594
  } | undefined;
595
+ bp_5873_live_preview_prepurchase?: {
596
+ key: string;
597
+ value: string;
598
+ isControl: boolean;
599
+ isVariation: boolean;
600
+ isExcluded: boolean;
601
+ } | undefined;
602
+ bp_5873_live_preview_postpurchase?: {
603
+ key: string;
604
+ value: string;
605
+ isControl: boolean;
606
+ isVariation: boolean;
607
+ isExcluded: boolean;
608
+ } | undefined;
595
609
  };
596
610
  isSubsequentPublish: boolean;
597
611
  isContextualUpgradeModalVisible: boolean;
@@ -667,6 +681,20 @@ declare const _default: import("vue").DefineComponent<{}, {
667
681
  isVariation: boolean;
668
682
  isExcluded: boolean;
669
683
  } | undefined;
684
+ bp_5873_live_preview_prepurchase?: {
685
+ key: string;
686
+ value: string;
687
+ isControl: boolean;
688
+ isVariation: boolean;
689
+ isExcluded: boolean;
690
+ } | undefined;
691
+ bp_5873_live_preview_postpurchase?: {
692
+ key: string;
693
+ value: string;
694
+ isControl: boolean;
695
+ isVariation: boolean;
696
+ isExcluded: boolean;
697
+ } | undefined;
670
698
  };
671
699
  isSubsequentPublish: boolean;
672
700
  isContextualUpgradeModalVisible: boolean;
@@ -742,6 +770,20 @@ declare const _default: import("vue").DefineComponent<{}, {
742
770
  isVariation: boolean;
743
771
  isExcluded: boolean;
744
772
  } | undefined;
773
+ bp_5873_live_preview_prepurchase?: {
774
+ key: string;
775
+ value: string;
776
+ isControl: boolean;
777
+ isVariation: boolean;
778
+ isExcluded: boolean;
779
+ } | undefined;
780
+ bp_5873_live_preview_postpurchase?: {
781
+ key: string;
782
+ value: string;
783
+ isControl: boolean;
784
+ isVariation: boolean;
785
+ isExcluded: boolean;
786
+ } | undefined;
745
787
  };
746
788
  isSubsequentPublish: boolean;
747
789
  isContextualUpgradeModalVisible: boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@designcrowd/library.brand-page",
3
3
  "description": "A collection of Maker/Designer applications",
4
- "version": "6.2.2-live-preview-1",
4
+ "version": "6.2.2",
5
5
  "author": "Design.com Eng",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",
@@ -48,10 +48,17 @@ export interface AbTestResult {
48
48
 
49
49
  const AB_TEST_KEYS = {
50
50
  BP_3926_FREEMIUM_WATERMARK: 'bc-bp-3926-freemium-cta-in-website-editor',
51
+ // Two separate live-preview experiments — bc-net sends only the one for the
52
+ // current purchase state, and a user's value on each side is independent
53
+ // (BP-5873). Keys must match `CampaignNames.LivePreview*Test` in bc-net.
54
+ BP_5873_LIVE_PREVIEW_PREPURCHASE: 'bc-bp-5873-live-preview-prepurchase',
55
+ BP_5873_LIVE_PREVIEW_POSTPURCHASE: 'bc-bp-5873-live-preview-postpurchase',
51
56
  };
52
57
 
53
58
  export interface AbTest {
54
59
  bp_3926_freemium_watermark?: AbTestResult;
60
+ bp_5873_live_preview_prepurchase?: AbTestResult;
61
+ bp_5873_live_preview_postpurchase?: AbTestResult;
55
62
  }
56
63
 
57
64
  export const MEDIA_SIZES = {
@@ -132,5 +139,21 @@ export const getAbTestResults = (abtestKeyValues: AbTest): AbTest => {
132
139
  );
133
140
  }
134
141
 
142
+ // AB Test for BP-5873 - Live preview (pre- and post-purchase run separately)
143
+
144
+ if (abtestKeyValues[AB_TEST_KEYS.BP_5873_LIVE_PREVIEW_PREPURCHASE]) {
145
+ abTests.bp_5873_live_preview_prepurchase = getValueType(
146
+ AB_TEST_KEYS.BP_5873_LIVE_PREVIEW_PREPURCHASE,
147
+ abtestKeyValues[AB_TEST_KEYS.BP_5873_LIVE_PREVIEW_PREPURCHASE],
148
+ );
149
+ }
150
+
151
+ if (abtestKeyValues[AB_TEST_KEYS.BP_5873_LIVE_PREVIEW_POSTPURCHASE]) {
152
+ abTests.bp_5873_live_preview_postpurchase = getValueType(
153
+ AB_TEST_KEYS.BP_5873_LIVE_PREVIEW_POSTPURCHASE,
154
+ abtestKeyValues[AB_TEST_KEYS.BP_5873_LIVE_PREVIEW_POSTPURCHASE],
155
+ );
156
+ }
157
+
135
158
  return abTests;
136
159
  };
@@ -17,6 +17,16 @@ export default defineComponent({
17
17
 
18
18
  return {
19
19
  isAdminMaker: computed(() => containerStore.isAdminMaker),
20
+ // BP-5873: the Preview button is behind an AB test, and pre/post purchase are
21
+ // two separate experiments. Pick the one for the current purchase state — a
22
+ // user's value on the other side is independent and must not leak across.
23
+ isLivePreviewEnabled: computed(() => {
24
+ const experiment = containerStore.isPrePurchase
25
+ ? containerStore.abTests.bp_5873_live_preview_prepurchase
26
+ : containerStore.abTests.bp_5873_live_preview_postpurchase;
27
+
28
+ return !!experiment?.isVariation;
29
+ }),
20
30
  isSaving: computed(() => brandPageMakerStore.isSaving),
21
31
  isPublished: computed(() => brandPageMakerStore.isPublished),
22
32
  isPublishButtonEnabled: computed(
@@ -3,13 +3,31 @@ import { createPinia, setActivePinia } from 'pinia';
3
3
  import { shallowMount } from '@vue/test-utils';
4
4
  import ActionBarNavigation from './ActionBarNavigation.vue';
5
5
  import { useBrandPageContainerStore } from '@brand-page-maker/stores';
6
+ import { getAbTestResults } from '@brand-page/models/brand-page-context.model';
7
+
8
+ // Must match `CampaignNames.LivePreview*` in bc-net. The two experiments share
9
+ // one set of variation values — they're told apart by campaign key, not value.
10
+ const PREPURCHASE = 'bc-bp-5873-live-preview-prepurchase';
11
+ const POSTPURCHASE = 'bc-bp-5873-live-preview-postpurchase';
12
+ const VARIATION_1 = 'bp-5873-variation-1';
13
+ const CONTROL = 'bp-5873-control';
6
14
 
7
15
  const mountBar = () => shallowMount(ActionBarNavigation);
8
16
 
9
17
  const hasPreviewButton = (wrapper: ReturnType<typeof mountBar>) =>
10
18
  wrapper.find('[data-test-preview-button]').exists();
11
19
 
12
- describe('ActionBarNavigation — Preview button', () => {
20
+ // The AB value arrives as the raw bc-net campaign string, so go through the real
21
+ // parser rather than hand-building an AbTestResult — that's the contract under test.
22
+ const setAbTest = (
23
+ store: ReturnType<typeof useBrandPageContainerStore>,
24
+ key: string,
25
+ value: string,
26
+ ) => {
27
+ store.abTests = getAbTestResults({ [key]: value } as never);
28
+ };
29
+
30
+ describe('ActionBarNavigation — BP-5873 preview AB test', () => {
13
31
  let containerStore: ReturnType<typeof useBrandPageContainerStore>;
14
32
 
15
33
  beforeEach(() => {
@@ -17,18 +35,39 @@ describe('ActionBarNavigation — Preview button', () => {
17
35
  containerStore = useBrandPageContainerStore();
18
36
  });
19
37
 
20
- test.each([
21
- ['pre-purchase', true],
22
- ['post-purchase', false],
23
- ])('shows Preview to the customer %s', (_, isPrePurchase) => {
24
- containerStore.isPrePurchase = isPrePurchase;
38
+ test('hides Preview when no AB value has been sent', () => {
39
+ expect(hasPreviewButton(mountBar())).toBe(false);
40
+ });
41
+
42
+ test('post-purchase: shows Preview on variation-1, hides it on control', () => {
43
+ containerStore.isPrePurchase = false;
44
+
45
+ setAbTest(containerStore, POSTPURCHASE, VARIATION_1);
46
+ expect(hasPreviewButton(mountBar())).toBe(true);
47
+
48
+ setAbTest(containerStore, POSTPURCHASE, CONTROL);
49
+ expect(hasPreviewButton(mountBar())).toBe(false);
50
+ });
51
+
52
+ test('pre-purchase: shows Preview on variation-1, hides it on control', () => {
53
+ containerStore.isPrePurchase = true;
25
54
 
55
+ setAbTest(containerStore, PREPURCHASE, VARIATION_1);
26
56
  expect(hasPreviewButton(mountBar())).toBe(true);
57
+
58
+ setAbTest(containerStore, PREPURCHASE, CONTROL);
59
+ expect(hasPreviewButton(mountBar())).toBe(false);
27
60
  });
28
61
 
29
- test('hides Preview in the admin maker', () => {
30
- containerStore.isAdminMaker = true;
62
+ // Two separate experiments, so a value on one side must never satisfy the other —
63
+ // otherwise a post-purchase variation would leak the button into pre-purchase.
64
+ test('the two experiments never read each other', () => {
65
+ containerStore.isPrePurchase = true;
66
+ setAbTest(containerStore, POSTPURCHASE, VARIATION_1);
67
+ expect(hasPreviewButton(mountBar())).toBe(false);
31
68
 
69
+ containerStore.isPrePurchase = false;
70
+ setAbTest(containerStore, PREPURCHASE, VARIATION_1);
32
71
  expect(hasPreviewButton(mountBar())).toBe(false);
33
72
  });
34
73
 
@@ -36,6 +75,8 @@ describe('ActionBarNavigation — Preview button', () => {
36
75
  // Save drops out. Preview must be a real column like the rest — while it was content
37
76
  // width, Publish ate the whole remaining row on a published site.
38
77
  test('Preview shares the mobile row equally with the other buttons', () => {
78
+ containerStore.isPrePurchase = false;
79
+ setAbTest(containerStore, POSTPURCHASE, VARIATION_1);
39
80
  containerStore.brandPageStatus = 'Published';
40
81
 
41
82
  const wrapper = mountBar();
@@ -4,7 +4,7 @@
4
4
  class="tw-flex tw-items-center tw-border-t tw-border-solid tw-border-grayscale-600 tw-h-12 tw-px-2 lg:tw-px-0 lg:tw-h-auto lg:tw-border-none tw-gap-3 lg:tw-gap-5 tw-w-full lg:tw-justify-end tw-box-border"
5
5
  >
6
6
  <Button
7
- v-if="!isAdminMaker"
7
+ v-if="!isAdminMaker && isLivePreviewEnabled"
8
8
  :label="constantsTr('previewDisplayName')"
9
9
  variant="no-border"
10
10
  :white="true"