@designcrowd/library.brand-page 5.18.5 → 5.18.6-ast-padding-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (221) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-ciKpCAd9.js → CreatedOnBrandCrowd-de-de-CAtPZtwo.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-CZbTS1AZ.js → CreatedOnBrandCrowd-en-us-Dcx4yFkK.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-C8MExng5.js → CreatedOnBrandCrowd-es-es-DpodH0gD.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-CO0L9NK2.js → CreatedOnBrandCrowd-fr-ca-DZbMRJn-.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-CO0L9NK2.js → CreatedOnBrandCrowd-fr-fr-DZbMRJn-.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-zVDvBF2H.js → CreatedOnBrandCrowd-pt-br-C3gBveLk.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-zVDvBF2H.js → CreatedOnBrandCrowd-pt-pt-C3gBveLk.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-WrUSQdjf.js → CreatedOnDcom-de-de-DHNyyTV9.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-BqC9YtkL.js → CreatedOnDcom-en-us-BjqZ0Jmw.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-BzH32Oya.js → CreatedOnDcom-es-es-tiNjDJmH.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-D7TYfCW0.js → CreatedOnDcom-fr-ca-COUSI6w1.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-DVlyfBtb.js → CreatedOnDcom-fr-fr-c3UCfh9A.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-CSRB91ey.js → CreatedOnDcom-pt-br-U1jbo_g5.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-9KMj5gpc.js → CreatedOnDcom-pt-pt-BOW_n3bo.js} +1 -1
  15. package/lib/src/brand-page/components/contact-form/ContactForm.mixin.d.ts +4 -0
  16. package/lib/src/brand-page/components/contact-form/ContactForm.mixin.js +8 -4
  17. package/lib/src/brand-page/components/image-gallery/ImageGallery.mixin.d.ts +4 -0
  18. package/lib/src/brand-page/components/image-gallery/ImageGallery.mixin.js +4 -0
  19. package/lib/src/brand-page/components/mailing-list/MailingList.mixin.d.ts +4 -0
  20. package/lib/src/brand-page/components/mailing-list/MailingList.mixin.js +4 -1
  21. package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.d.ts +4 -0
  22. package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.js +4 -0
  23. package/lib/src/brand-page/components/payment/support-me/SupportMe.mixin.d.ts +4 -0
  24. package/lib/src/brand-page/components/payment/support-me/SupportMe.mixin.js +4 -1
  25. package/lib/src/brand-page/components/video/Video.mixin.d.ts +4 -0
  26. package/lib/src/brand-page/components/video/Video.mixin.js +4 -0
  27. package/lib/src/brand-page/constants/misc.constants.d.ts +30 -0
  28. package/lib/src/brand-page/constants/misc.constants.js +51 -0
  29. package/lib/src/brand-page/models/content.model.d.ts +2 -0
  30. package/lib/src/brand-page/utils/content-padding.util.d.ts +13 -0
  31. package/lib/src/brand-page/utils/content-padding.util.js +10 -0
  32. package/lib/src/brand-page/utils/index.d.ts +1 -0
  33. package/lib/src/brand-page/utils/index.js +1 -0
  34. package/lib/src/brand-page/utils/migration/migration-17.d.ts +2 -0
  35. package/lib/src/brand-page/utils/migration/migration-17.js +50 -0
  36. package/lib/src/brand-page/utils/migration.util.js +10 -0
  37. package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +2 -7
  38. package/lib/src/brand-page-maker/components/admin-logo-settings/AdminLogoSettings.mixin.d.ts +2 -0
  39. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +14 -7
  40. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +0 -8
  41. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.d.ts +2 -7
  42. package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.js +0 -1
  43. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +16 -87
  44. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.js +0 -5
  45. package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.d.ts +2 -7
  46. package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.d.ts +0 -3
  47. package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.js +0 -11
  48. package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +2 -7
  49. package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +2 -7
  50. package/lib/src/brand-page-maker/components/social-share/SocialShare.mixin.d.ts +2 -7
  51. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +2 -7
  52. package/lib/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.js +0 -9
  53. package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.js +1 -20
  54. package/lib/src/brand-page-maker/composables/useEventTracker.d.ts +0 -20
  55. package/lib/src/brand-page-maker/composables/useEventTracker.js +0 -17
  56. package/lib/src/brand-page-maker/constants/config-settings-constant.js +37 -0
  57. package/lib/src/brand-page-maker/convertors/about-display-style.convertor.js +9 -1
  58. package/lib/src/brand-page-maker/convertors/banner-align-display-style.convertor.js +7 -1
  59. package/lib/src/brand-page-maker/convertors/contact-layout-style.convertor.js +6 -1
  60. package/lib/src/brand-page-maker/models/content-settings.js +36 -2
  61. package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +12 -0
  62. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.d.ts +2 -41
  63. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +5 -307
  64. package/lib/src/brand-page-maker/stores/logo-store/logo-store.d.ts +0 -1
  65. package/lib/src/brand-page-maker/stores/user/user-store.js +0 -1
  66. package/lib/src/bundled-translations-Chw0nsFv.js +175 -0
  67. package/lib/src/bundled-translations.de-DE-cqBv7atZ.js +175 -0
  68. package/lib/src/bundled-translations.es-ES-D9VXftl_.js +175 -0
  69. package/lib/src/bundled-translations.fr-CA-BYstWXcO.js +175 -0
  70. package/lib/src/bundled-translations.fr-FR-D1H1hJD4.js +175 -0
  71. package/lib/src/bundled-translations.pt-BR-DqNFuNHX.js +175 -0
  72. package/lib/src/bundled-translations.pt-PT-tOic0FfQ.js +175 -0
  73. package/lib/src/bundles/bundled-translations.de-DE.json +3 -3
  74. package/lib/src/bundles/bundled-translations.es-ES.json +3 -3
  75. package/lib/src/bundles/bundled-translations.fr-CA.json +3 -3
  76. package/lib/src/bundles/bundled-translations.fr-FR.json +3 -3
  77. package/lib/src/bundles/bundled-translations.json +3 -3
  78. package/lib/src/bundles/bundled-translations.pt-BR.json +3 -3
  79. package/lib/src/bundles/bundled-translations.pt-PT.json +3 -3
  80. package/lib/src/constants/ui.d.ts +0 -1
  81. package/lib/src/css/library.brand-page-brandCrowd.min.css +123 -136
  82. package/lib/src/css/library.brand-page-brandPage.min.css +124 -136
  83. package/lib/src/css/library.brand-page-designCom.min.css +123 -136
  84. package/lib/src/css/library.brand-page-preview.min.css +123 -136
  85. package/lib/src/index.mjs +1 -1
  86. package/lib/src/{lib-BXbo_N88.js → lib-Bl7w5LQl.js} +28005 -28416
  87. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +16 -87
  88. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.js +0 -5
  89. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.stories.js +0 -1
  90. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +16 -23
  91. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +12 -16
  92. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +14 -7
  93. package/lib/src/shared/content-settings/components/draggable-item-list/DraggableItemList.mixin.d.ts +0 -3
  94. package/lib/src/shared/content-settings/components/draggable-item-list/DraggableItemList.mixin.js +2 -19
  95. package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +12 -0
  96. package/lib/src/shared/content-settings/components/form-fields-field/FormFieldsField.mixin.js +8 -18
  97. package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +0 -64
  98. package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.js +0 -6
  99. package/lib/src/shared/content-settings/components/slider-field/SliderField.mixin.js +9 -0
  100. package/lib/src/shared/content-settings/store/content-settings-store.d.ts +12 -0
  101. package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.d.ts +0 -19
  102. package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.js +0 -11
  103. package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +2 -10
  104. package/lib/src/shared/logo-settings/store/editable-logo-store.d.ts +1 -5
  105. package/lib/src/shared/logo-settings/store/editable-logo-store.js +0 -31
  106. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +18 -24
  107. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +16 -10
  108. package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +2 -23
  109. package/lib/src/shared/side-bar/components/SideBarTabButton.mixin.d.ts +0 -16
  110. package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +2 -23
  111. package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.d.ts +0 -16
  112. package/lib/src/utils/minify-brand-page-metadata.js +11 -1
  113. package/package.json +1 -1
  114. package/src/brand-page/components/about-section/AboutSection.vue +10 -4
  115. package/src/brand-page/components/banner-section/BannerSection.vue +11 -4
  116. package/src/brand-page/components/booking-section/BookingSection.vue +11 -3
  117. package/src/brand-page/components/contact-form/ContactForm.mixin.ts +12 -6
  118. package/src/brand-page/components/contact-form/ContactForm.vue +115 -118
  119. package/src/brand-page/components/image-gallery/ImageGallery.mixin.ts +5 -0
  120. package/src/brand-page/components/image-gallery/ImageGallery.vue +1 -1
  121. package/src/brand-page/components/mailing-list/MailingList.mixin.ts +8 -1
  122. package/src/brand-page/components/mailing-list/MailingList.vue +1 -1
  123. package/src/brand-page/components/map/Map.vue +5 -1
  124. package/src/brand-page/components/payment/request-payment/RequestPayment.mixin.ts +5 -0
  125. package/src/brand-page/components/payment/request-payment/RequestPayment.vue +1 -0
  126. package/src/brand-page/components/payment/support-me/SupportMe.mixin.ts +8 -1
  127. package/src/brand-page/components/payment/support-me/SupportMe.vue +1 -0
  128. package/src/brand-page/components/shop/Shop.vue +7 -2
  129. package/src/brand-page/components/social-links/SocialLinks.vue +7 -3
  130. package/src/brand-page/components/text/Text.vue +12 -5
  131. package/src/brand-page/components/text-media-section/TextMediaSection.vue +11 -3
  132. package/src/brand-page/components/video/Video.mixin.ts +5 -0
  133. package/src/brand-page/components/video/Video.vue +1 -1
  134. package/src/brand-page/constants/misc.constants.ts +60 -0
  135. package/src/brand-page/models/content.model.ts +2 -0
  136. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +9 -3
  137. package/src/brand-page/utils/content-padding.util.test.ts +29 -0
  138. package/src/brand-page/utils/content-padding.util.ts +13 -0
  139. package/src/brand-page/utils/index.ts +1 -0
  140. package/src/brand-page/utils/migration/migration-17.ts +73 -0
  141. package/src/brand-page/utils/migration.util.test.ts +145 -0
  142. package/src/brand-page/utils/migration.util.ts +11 -0
  143. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +0 -9
  144. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.vue +3 -2
  145. package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.ts +0 -1
  146. package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.ts +0 -5
  147. package/src/brand-page-maker/components/cookie-collection/CookieSettings.vue +17 -18
  148. package/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.ts +0 -13
  149. package/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.vue +3 -26
  150. package/src/brand-page-maker/components/quick-link-bar/i18n/quick-link-bar.de-DE.json +4 -6
  151. package/src/brand-page-maker/components/quick-link-bar/i18n/quick-link-bar.es-ES.json +4 -6
  152. package/src/brand-page-maker/components/quick-link-bar/i18n/quick-link-bar.fr-CA.json +4 -6
  153. package/src/brand-page-maker/components/quick-link-bar/i18n/quick-link-bar.fr-FR.json +4 -6
  154. package/src/brand-page-maker/components/quick-link-bar/i18n/quick-link-bar.json +1 -3
  155. package/src/brand-page-maker/components/quick-link-bar/i18n/quick-link-bar.pt-BR.json +4 -6
  156. package/src/brand-page-maker/components/quick-link-bar/i18n/quick-link-bar.pt-PT.json +4 -6
  157. package/src/brand-page-maker/components/save-contact/SaveContact.vue +19 -12
  158. package/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.ts +0 -10
  159. package/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.ts +1 -24
  160. package/src/brand-page-maker/composables/useEventTracker.ts +0 -29
  161. package/src/brand-page-maker/constants/config-settings-constant.ts +43 -0
  162. package/src/brand-page-maker/convertors/about-display-style.convertor.ts +10 -0
  163. package/src/brand-page-maker/convertors/banner-align-display-style.convertor.ts +8 -0
  164. package/src/brand-page-maker/convertors/contact-layout-style.convertor.test.ts +50 -0
  165. package/src/brand-page-maker/convertors/contact-layout-style.convertor.ts +8 -0
  166. package/src/brand-page-maker/models/content-settings.ts +38 -2
  167. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.test.ts +0 -334
  168. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +4 -371
  169. package/src/brand-page-maker/stores/logo-store/logo-store.ts +0 -5
  170. package/src/brand-page-maker/stores/user/user-store.ts +0 -1
  171. package/src/bundles/bundled-translations.de-DE.json +3 -3
  172. package/src/bundles/bundled-translations.es-ES.json +3 -3
  173. package/src/bundles/bundled-translations.fr-CA.json +3 -3
  174. package/src/bundles/bundled-translations.fr-FR.json +3 -3
  175. package/src/bundles/bundled-translations.json +3 -3
  176. package/src/bundles/bundled-translations.pt-BR.json +3 -3
  177. package/src/bundles/bundled-translations.pt-PT.json +3 -3
  178. package/src/constants/ui.ts +0 -1
  179. package/src/shared/content-settings/components/content-settings/ContentSettings.mixin.ts +0 -5
  180. package/src/shared/content-settings/components/content-settings/ContentSettings.stories.ts +0 -1
  181. package/src/shared/content-settings/components/content-settings/i18n/content-settings.de-DE.json +2 -0
  182. package/src/shared/content-settings/components/content-settings/i18n/content-settings.es-ES.json +2 -0
  183. package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-CA.json +2 -0
  184. package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-FR.json +2 -0
  185. package/src/shared/content-settings/components/content-settings/i18n/content-settings.json +2 -0
  186. package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-BR.json +2 -0
  187. package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-PT.json +2 -0
  188. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.vue +1 -1
  189. package/src/shared/content-settings/components/draggable-item-list/DraggableItemList.mixin.ts +2 -19
  190. package/src/shared/content-settings/components/draggable-item-list/DraggableItemList.vue +1 -1
  191. package/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.vue +2 -2
  192. package/src/shared/content-settings/components/form-fields-field/FormFieldsField.mixin.ts +10 -26
  193. package/src/shared/content-settings/components/logo-selection-field/LogoSelection.vue +48 -63
  194. package/src/shared/content-settings/components/page-dropdown-field/PageDropdownField.vue +0 -4
  195. package/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.ts +0 -7
  196. package/src/shared/content-settings/components/slider-field/SliderField.mixin.ts +9 -0
  197. package/src/shared/content-settings/components/text-field/TextField.vue +0 -1
  198. package/src/shared/content-settings/components/text-image-field/TextImageField.vue +4 -33
  199. package/src/shared/logo-settings/components/EditLogoSettings.mixin.ts +0 -11
  200. package/src/shared/logo-settings/store/editable-logo-store.ts +1 -42
  201. package/src/utils/minify-brand-page-metadata.ts +11 -1
  202. package/lib/src/brand-page-maker/composables/useUndoRedoFlag.d.ts +0 -17
  203. package/lib/src/brand-page-maker/composables/useUndoRedoFlag.js +0 -25
  204. package/lib/src/brand-page-maker/stores/history/history-store.d.ts +0 -83
  205. package/lib/src/brand-page-maker/stores/history/history-store.js +0 -495
  206. package/lib/src/bundled-translations-D1q3rSEz.js +0 -175
  207. package/lib/src/bundled-translations.de-DE-BxqLLwbh.js +0 -175
  208. package/lib/src/bundled-translations.es-ES-uh249NlJ.js +0 -175
  209. package/lib/src/bundled-translations.fr-CA-BEQmv2fX.js +0 -175
  210. package/lib/src/bundled-translations.fr-FR-BnNuCojH.js +0 -175
  211. package/lib/src/bundled-translations.pt-BR-CJUOxVlq.js +0 -175
  212. package/lib/src/bundled-translations.pt-PT-Ds9cMEqK.js +0 -175
  213. package/lib/src/metadata-builder/builders/reorder-pages-builder.d.ts +0 -13
  214. package/lib/src/metadata-builder/builders/reorder-pages-builder.js +0 -49
  215. package/src/brand-page-maker/components/quick-link-bar/RedoButton.vue +0 -66
  216. package/src/brand-page-maker/components/quick-link-bar/UndoButton.vue +0 -66
  217. package/src/brand-page-maker/components/quick-link-bar/undo-redo-buttons.test.ts +0 -116
  218. package/src/brand-page-maker/composables/useUndoRedoFlag.ts +0 -30
  219. package/src/brand-page-maker/stores/history/history-store.test.ts +0 -1120
  220. package/src/brand-page-maker/stores/history/history-store.ts +0 -660
  221. package/src/metadata-builder/builders/reorder-pages-builder.ts +0 -80
@@ -38,6 +38,66 @@ export const ALIGN_LEFT_FULL_IMAGE = 'left-aligned-full-image';
38
38
  export const ALIGN_RIGHT_FULL_IMAGE = 'right-aligned-full-image';
39
39
  export const ALTERNATE_IMAGE = 'alternate-image';
40
40
 
41
+ /**
42
+ * Padding Control (BP-5699): the top/bottom padding each Contact Form layout
43
+ * had hard-coded before the sliders existed. Single source for new-block
44
+ * defaults (content-settings) and the migration backfill for existing pages.
45
+ * The image layouts (full-image divided and card-over-image) are 0: their
46
+ * padding sits on the section root and reveals the background colour around
47
+ * the image block (same as the banner), while the spacing inside/over the
48
+ * image stays fixed — existing pages rendered the image flush to the section
49
+ * edges.
50
+ */
51
+ export const CONTACT_FORM_LAYOUT_DEFAULT_PADDING: Record<string, number> = {
52
+ '': 0, // collapsible (default on Brand Page / Brand Contact)
53
+ [ALIGN_CENTERED]: 24,
54
+ [ALIGN_CARD_CENTER]: 32,
55
+ [ALIGN_CARD_CENTER_IMAGE]: 0,
56
+ [TEXT_ONLY]: 32,
57
+ [ALIGN_LEFT_FULL_IMAGE]: 0,
58
+ [ALIGN_RIGHT_FULL_IMAGE]: 0,
59
+ };
60
+
61
+ /**
62
+ * Banner: full-bleed display styles (divided + full-width stacked) render the
63
+ * image flush to the section edges, so their top/bottom padding defaults to 0 to
64
+ * match prod — the standard 32 would push the image off the edges. Every other
65
+ * banner style keeps 32. Used by the banner display-style convertor and the
66
+ * migration backfill, mirroring contact-form's per-layout map above.
67
+ */
68
+ export const BANNER_DEFAULT_PADDING = 32;
69
+ export const BANNER_FULL_BLEED_DISPLAY_STYLES = [
70
+ ALIGN_LEFT_FULL_IMAGE,
71
+ ALIGN_RIGHT_FULL_IMAGE,
72
+ ALIGN_TOP_FULL_IMAGE,
73
+ ALIGN_BOTTOM_FULL_IMAGE,
74
+ ALIGN_MIDDLE_FULL_IMAGE,
75
+ ];
76
+ export const bannerDisplayStyleDefaultPadding = (
77
+ displayStyle?: string,
78
+ ): number =>
79
+ displayStyle && BANNER_FULL_BLEED_DISPLAY_STYLES.includes(displayStyle)
80
+ ? 0
81
+ : BANNER_DEFAULT_PADDING;
82
+
83
+ /**
84
+ * About: same rule as the banner. The two full-image display styles render the
85
+ * image flush to the section edges, so their top/bottom padding defaults to 0;
86
+ * every other About style keeps 32. Used by the About display-style convertor
87
+ * and the migration backfill.
88
+ */
89
+ export const ABOUT_DEFAULT_PADDING = 32;
90
+ export const ABOUT_FULL_BLEED_DISPLAY_STYLES = [
91
+ ALIGN_LEFT_FULL_IMAGE,
92
+ ALIGN_RIGHT_FULL_IMAGE,
93
+ ];
94
+ export const aboutDisplayStyleDefaultPadding = (
95
+ displayStyle?: string,
96
+ ): number =>
97
+ displayStyle && ABOUT_FULL_BLEED_DISPLAY_STYLES.includes(displayStyle)
98
+ ? 0
99
+ : ABOUT_DEFAULT_PADDING;
100
+
41
101
  export const BIG_IMAGE = 'big-image';
42
102
  export const MEDIA_ONLY = 'media-only';
43
103
  export const COLUMNS = 'columns';
@@ -51,6 +51,8 @@ export interface Content {
51
51
  id: string;
52
52
  type: ContentType;
53
53
  personalisationRole?: PersonalisationRole;
54
+ topPadding?: number;
55
+ bottomPadding?: number;
54
56
 
55
57
  // Overrides for personalisation
56
58
  imageUrlOverride?: string;
@@ -292,6 +292,7 @@ exports[`migration.util > Banner Contents - text Align and Font Family should no
292
292
  "contents": [
293
293
  {
294
294
  "backgroundStyle": {},
295
+ "bottomPadding": 32,
295
296
  "buttonLinkType": "url",
296
297
  "buttonPageId": "",
297
298
  "buttonText": "Get Started",
@@ -330,6 +331,7 @@ exports[`migration.util > Banner Contents - text Align and Font Family should no
330
331
  "textAlign": "center",
331
332
  "wordBreak": "normal",
332
333
  },
334
+ "topPadding": 32,
333
335
  "type": "banner-section",
334
336
  "url": "",
335
337
  },
@@ -454,7 +456,7 @@ exports[`migration.util > Banner Contents - text Align and Font Family should no
454
456
  },
455
457
  },
456
458
  },
457
- "v": 16,
459
+ "v": 17,
458
460
  },
459
461
  "useOldLogoRenderSize": true,
460
462
  }
@@ -751,6 +753,7 @@ exports[`migration.util > migrateBrandPageModel should return brand page model w
751
753
  {
752
754
  "contents": [
753
755
  {
756
+ "bottomPadding": 12,
754
757
  "id": "bec5aca6-e3c5-4d4c-93fa-2894816a8040",
755
758
  "text": "",
756
759
  "textColor": {},
@@ -774,6 +777,7 @@ exports[`migration.util > migrateBrandPageModel should return brand page model w
774
777
  "textAlign": "center",
775
778
  "textStyleType": "paragraphs",
776
779
  },
780
+ "topPadding": 12,
777
781
  "type": "text",
778
782
  },
779
783
  ],
@@ -897,7 +901,7 @@ exports[`migration.util > migrateBrandPageModel should return brand page model w
897
901
  },
898
902
  },
899
903
  },
900
- "v": 16,
904
+ "v": 17,
901
905
  },
902
906
  "useOldLogoRenderSize": true,
903
907
  }
@@ -1194,6 +1198,7 @@ exports[`migration.util > migrateBrandPageModel should return brand page model w
1194
1198
  {
1195
1199
  "contents": [
1196
1200
  {
1201
+ "bottomPadding": 12,
1197
1202
  "id": "bec5aca6-e3c5-4d4c-93fa-2894816a8040",
1198
1203
  "text": "",
1199
1204
  "textColor": {},
@@ -1224,6 +1229,7 @@ exports[`migration.util > migrateBrandPageModel should return brand page model w
1224
1229
  "textAlign": "center",
1225
1230
  "textStyleType": "paragraphs",
1226
1231
  },
1232
+ "topPadding": 12,
1227
1233
  "type": "text",
1228
1234
  },
1229
1235
  ],
@@ -1347,7 +1353,7 @@ exports[`migration.util > migrateBrandPageModel should return brand page model w
1347
1353
  },
1348
1354
  },
1349
1355
  },
1350
- "v": 16,
1356
+ "v": 17,
1351
1357
  },
1352
1358
  "useOldLogoRenderSize": true,
1353
1359
  }
@@ -0,0 +1,29 @@
1
+ import { describe, test, expect } from 'vitest';
2
+ import { contentPaddingStyle } from './content-padding.util';
3
+
4
+ describe('content-padding.util', () => {
5
+ test('contentPaddingStyle should map stored padding to px values', () => {
6
+ expect(contentPaddingStyle({ topPadding: 53, bottomPadding: 24 })).toEqual({
7
+ paddingTop: '53px',
8
+ paddingBottom: '24px',
9
+ });
10
+ });
11
+
12
+ test('contentPaddingStyle should default missing values to 0 for content created before the field existed', () => {
13
+ expect(contentPaddingStyle({})).toEqual({
14
+ paddingTop: '0px',
15
+ paddingBottom: '0px',
16
+ });
17
+ expect(contentPaddingStyle({ topPadding: 16 })).toEqual({
18
+ paddingTop: '16px',
19
+ paddingBottom: '0px',
20
+ });
21
+ });
22
+
23
+ test('contentPaddingStyle should keep an explicit 0 rather than treating it as unset', () => {
24
+ expect(contentPaddingStyle({ topPadding: 0, bottomPadding: 0 })).toEqual({
25
+ paddingTop: '0px',
26
+ paddingBottom: '0px',
27
+ });
28
+ });
29
+ });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Block top/bottom padding (BP-5687) as a bindable CSS style object. Defaults
3
+ * live in the data — `content-settings` for new content, a migration for
4
+ * existing — so this just reads the stored value (`?? 0` covers content from
5
+ * before the field existed).
6
+ */
7
+ export const contentPaddingStyle = (content: {
8
+ topPadding?: number;
9
+ bottomPadding?: number;
10
+ }): { paddingTop: string; paddingBottom: string } => ({
11
+ paddingTop: `${content.topPadding ?? 0}px`,
12
+ paddingBottom: `${content.bottomPadding ?? 0}px`,
13
+ });
@@ -1,4 +1,5 @@
1
1
  export * from './style.util';
2
+ export * from './content-padding.util';
2
3
  export * from './view-model.util';
3
4
  export * from './text.util';
4
5
  export * from './model.util';
@@ -0,0 +1,73 @@
1
+ import type { MigrationData } from '../migration.util';
2
+ import type {
3
+ AboutSectionContent,
4
+ BannerSectionContent,
5
+ ContactFormContent,
6
+ } from '../../models';
7
+ import {
8
+ CONTACT_FORM_LAYOUT_DEFAULT_PADDING,
9
+ aboutDisplayStyleDefaultPadding,
10
+ bannerDisplayStyleDefaultPadding,
11
+ } from '../../constants';
12
+
13
+ /**
14
+ * Padding Control backfill (BP-5699 Tier 2, BP-5700 Store): blocks that already
15
+ * had hard-coded top/bottom spacing. Backfill that spacing as the block's explicit
16
+ * topPadding/bottomPadding so existing pages render unchanged once the spacing
17
+ * moves to the Padding Control sliders. Type-scoped and idempotent — only the
18
+ * listed types, and only when the value isn't already set.
19
+ */
20
+ const BLOCK_DEFAULT_PADDING: Partial<Record<string, number>> = {
21
+ text: 12,
22
+ 'images-section': 32,
23
+ 'social-links': 32,
24
+ 'shapes-section': 32,
25
+ 'booking-section': 32,
26
+ 'shop-section': 16,
27
+ };
28
+
29
+ export const migration17 = async (
30
+ migrationResult: MigrationData,
31
+ ): Promise<MigrationData> => {
32
+ const { brandPageModel } = migrationResult;
33
+
34
+ brandPageModel.pages.forEach((page) => {
35
+ page.contents.forEach((content) => {
36
+ // Contact Form, Banner and About previously varied their hard-coded spacing by
37
+ // layout/display style (full-bleed image layouts had no outer padding), so they're
38
+ // keyed by that rather than a single per-type value.
39
+ let value: number | undefined;
40
+
41
+ if (content.type === 'contact-form') {
42
+ value =
43
+ CONTACT_FORM_LAYOUT_DEFAULT_PADDING[
44
+ (content as ContactFormContent).layoutStyle ?? ''
45
+ ];
46
+ } else if (content.type === 'banner-section') {
47
+ value = bannerDisplayStyleDefaultPadding(
48
+ (content as BannerSectionContent).displayStyle,
49
+ );
50
+ } else if (content.type === 'about-section') {
51
+ value = aboutDisplayStyleDefaultPadding(
52
+ (content as AboutSectionContent).displayStyle,
53
+ );
54
+ } else {
55
+ value = BLOCK_DEFAULT_PADDING[content.type];
56
+ }
57
+
58
+ if (value === undefined) {
59
+ return;
60
+ }
61
+
62
+ if (content.topPadding === undefined) {
63
+ content.topPadding = value;
64
+ }
65
+
66
+ if (content.bottomPadding === undefined) {
67
+ content.bottomPadding = value;
68
+ }
69
+ });
70
+ });
71
+
72
+ return migrationResult;
73
+ };
@@ -24,6 +24,12 @@ import {
24
24
  createInitialTestimonialSectionContent,
25
25
  } from '@brand-page-maker/models';
26
26
  import {
27
+ ALIGN_CARD_CENTER_IMAGE,
28
+ ALIGN_LEFT_FULL_IMAGE,
29
+ ALIGN_RIGHT_FULL_IMAGE,
30
+ ALIGN_TOP_FULL_IMAGE,
31
+ ALIGN_BOTTOM_FULL_IMAGE,
32
+ ALIGN_MIDDLE_FULL_IMAGE,
27
33
  DEFAULT_LETTER_SPACING,
28
34
  LINE_HEIGHT_BODY,
29
35
  LINE_HEIGHT_HEADINGS,
@@ -1464,6 +1470,145 @@ describe('migration.util', () => {
1464
1470
  expect(content.layoutStyle).toBe(TEXT_ONLY);
1465
1471
  });
1466
1472
 
1473
+ test('migration17 should backfill contact form padding from its layout style', async () => {
1474
+ const model = await migrateBrandPageModel(getBsModel(), {
1475
+ isUserDraft: false,
1476
+ isServerRender: false,
1477
+ });
1478
+
1479
+ const collapsible = model.brandPageModel.pages[3]
1480
+ .contents[0] as ContactFormContent;
1481
+ const textOnly = model.brandPageModel.pages[3]
1482
+ .contents[1] as ContactFormContent;
1483
+
1484
+ expect(collapsible.topPadding).toBe(0);
1485
+ expect(collapsible.bottomPadding).toBe(0);
1486
+ expect(textOnly.topPadding).toBe(32);
1487
+ expect(textOnly.bottomPadding).toBe(32);
1488
+ });
1489
+
1490
+ test.each([
1491
+ [ALIGN_LEFT_FULL_IMAGE],
1492
+ [ALIGN_RIGHT_FULL_IMAGE],
1493
+ [ALIGN_CARD_CENTER_IMAGE],
1494
+ ])(
1495
+ 'migration17 should backfill zero padding for the %s contact form layout',
1496
+ async (layoutStyle) => {
1497
+ const brandPageModel = getBsModel();
1498
+
1499
+ (
1500
+ brandPageModel.pages[3].contents[1] as ContactFormContent
1501
+ ).layoutStyle = layoutStyle;
1502
+
1503
+ const model = await migrateBrandPageModel(brandPageModel, {
1504
+ isUserDraft: false,
1505
+ isServerRender: false,
1506
+ });
1507
+
1508
+ const content = model.brandPageModel.pages[3]
1509
+ .contents[1] as ContactFormContent;
1510
+
1511
+ expect(content.topPadding).toBe(0);
1512
+ expect(content.bottomPadding).toBe(0);
1513
+ },
1514
+ );
1515
+
1516
+ test('migration17 should not overwrite contact form padding that is already set', async () => {
1517
+ const brandPageModel = getBsModel();
1518
+
1519
+ (brandPageModel.pages[3].contents[1] as ContactFormContent).topPadding =
1520
+ 10;
1521
+
1522
+ const model = await migrateBrandPageModel(brandPageModel, {
1523
+ isUserDraft: false,
1524
+ isServerRender: false,
1525
+ });
1526
+
1527
+ const content = model.brandPageModel.pages[3]
1528
+ .contents[1] as ContactFormContent;
1529
+
1530
+ expect(content.topPadding).toBe(10);
1531
+ expect(content.bottomPadding).toBe(32);
1532
+ });
1533
+
1534
+ test('migration17 should backfill 32 padding for standard banner display styles', async () => {
1535
+ const model = await migrateBrandPageModel(getBsModel(), {
1536
+ isUserDraft: false,
1537
+ isServerRender: false,
1538
+ });
1539
+
1540
+ // pages[0].contents[0] is a 'centered' banner (standard, not full-bleed).
1541
+ const banner = model.brandPageModel.pages[0]
1542
+ .contents[0] as BannerSectionContent;
1543
+
1544
+ expect(banner.topPadding).toBe(32);
1545
+ expect(banner.bottomPadding).toBe(32);
1546
+ });
1547
+
1548
+ test.each([
1549
+ [ALIGN_LEFT_FULL_IMAGE],
1550
+ [ALIGN_RIGHT_FULL_IMAGE],
1551
+ [ALIGN_TOP_FULL_IMAGE],
1552
+ [ALIGN_BOTTOM_FULL_IMAGE],
1553
+ [ALIGN_MIDDLE_FULL_IMAGE],
1554
+ ])(
1555
+ 'migration17 should backfill zero padding for the %s full-bleed banner style',
1556
+ async (displayStyle) => {
1557
+ const brandPageModel = getBsModel();
1558
+
1559
+ (
1560
+ brandPageModel.pages[0].contents[0] as BannerSectionContent
1561
+ ).displayStyle = displayStyle;
1562
+
1563
+ const model = await migrateBrandPageModel(brandPageModel, {
1564
+ isUserDraft: false,
1565
+ isServerRender: false,
1566
+ });
1567
+
1568
+ const banner = model.brandPageModel.pages[0]
1569
+ .contents[0] as BannerSectionContent;
1570
+
1571
+ expect(banner.topPadding).toBe(0);
1572
+ expect(banner.bottomPadding).toBe(0);
1573
+ },
1574
+ );
1575
+
1576
+ test('migration17 should backfill 32 padding for standard about display styles', async () => {
1577
+ const model = await migrateBrandPageModel(getBsModel(), {
1578
+ isUserDraft: false,
1579
+ isServerRender: false,
1580
+ });
1581
+
1582
+ // pages[0].contents[2] is a 'centered' about section (standard, not full-image).
1583
+ const about = model.brandPageModel.pages[0]
1584
+ .contents[2] as AboutSectionContent;
1585
+
1586
+ expect(about.topPadding).toBe(32);
1587
+ expect(about.bottomPadding).toBe(32);
1588
+ });
1589
+
1590
+ test.each([[ALIGN_LEFT_FULL_IMAGE], [ALIGN_RIGHT_FULL_IMAGE]])(
1591
+ 'migration17 should backfill zero padding for the %s full-image about style',
1592
+ async (displayStyle) => {
1593
+ const brandPageModel = getBsModel();
1594
+
1595
+ (
1596
+ brandPageModel.pages[0].contents[2] as AboutSectionContent
1597
+ ).displayStyle = displayStyle;
1598
+
1599
+ const model = await migrateBrandPageModel(brandPageModel, {
1600
+ isUserDraft: false,
1601
+ isServerRender: false,
1602
+ });
1603
+
1604
+ const about = model.brandPageModel.pages[0]
1605
+ .contents[2] as AboutSectionContent;
1606
+
1607
+ expect(about.topPadding).toBe(0);
1608
+ expect(about.bottomPadding).toBe(0);
1609
+ },
1610
+ );
1611
+
1467
1612
  test('migrateNewLogoLogic should migrate logoDraftToken and logoVariation', () => {
1468
1613
  const oldTemplate: BrandPageData = {
1469
1614
  pages: [
@@ -19,6 +19,7 @@ import { migration13 } from './migration/migration-13';
19
19
  import { migration14 } from './migration/migration-14';
20
20
  import { migration15 } from './migration/migration-15';
21
21
  import { migration16 } from './migration/migration-16';
22
+ import { migration17 } from './migration/migration-17';
22
23
 
23
24
  export interface MigrationData {
24
25
  brandPageModel: BrandPageModel;
@@ -149,6 +150,16 @@ const MIGRATION_TABLE = [
149
150
  description:
150
151
  'Default sub nav background color to color match on for TAB_2 and hamburger navs depending on font color only on first load flow',
151
152
  },
153
+ {
154
+ version: 17,
155
+ migrateFn: migration17,
156
+ // runAlways: re-apply on every load (ticket stack) so already-migrated pages
157
+ // pick up newly-added block defaults (e.g. Store) without a new migration.
158
+ // Idempotent — only backfills when topPadding/bottomPadding aren't already set.
159
+ runAlways: true,
160
+ description:
161
+ 'Padding Control backfill (BP-5699 Tier 2 + BP-5700 Store): backfill existing top/bottom spacing as explicit padding for text (12px), images/social links/shapes/booking (32px), store (16px), contact form (per layout), banner and about (per display style)',
162
+ },
152
163
  ] as MigrationTableItem[];
153
164
 
154
165
  export const GetLatestModelVersion = () =>
@@ -35,8 +35,6 @@ import {
35
35
  useSnapshotStore,
36
36
  useVideoStore,
37
37
  } from '@brand-page-maker/stores';
38
- import { useHistoryStore } from '@brand-page-maker/stores/history/history-store';
39
- import { useUndoRedoFlag } from '@brand-page-maker/composables/useUndoRedoFlag';
40
38
  import type { AdminPreviewLogoTemplateModel } from '@brand-page-maker/stores/admin-logo-settings';
41
39
  import { useUiContentSettingsStore } from '@shared/content-settings/store';
42
40
  import { useUiTemplateSettingsStore } from '@shared/template-settings/store';
@@ -285,13 +283,6 @@ export default defineComponent({
285
283
  // Mark brand page as fully loaded
286
284
  this.brandPageMakerStore.setIsBrandPageLoaded(true);
287
285
 
288
- // Capture baseline for undo/redo when the feature is active for this
289
- // session — see useUndoRedoFlag.ts for the gate (LaunchDarkly flag +
290
- // brand-site + non-admin maker).
291
- if (useUndoRedoFlag().value) {
292
- useHistoryStore().captureBaseline();
293
- }
294
-
295
286
  this.$emit(EVENTS.Initialised);
296
287
  },
297
288
  mounted() {
@@ -23,6 +23,7 @@
23
23
  >
24
24
  <div class="tw-flex tw-flex-col tw-w-full tw-h-full">
25
25
  <QuickLinkBar
26
+ v-if="isPublished && !isAdmin"
26
27
  class="c-quick-link-bar"
27
28
  :brand-page-base-url="brandPageBaseUrl"
28
29
  :slug="brandPageSlug"
@@ -86,8 +87,8 @@
86
87
  v-if="isBrandPageLoaded"
87
88
  :is-mobile-device="isMobileDevice"
88
89
  :is-design-com="isDesignCom"
89
- :container="previewContainer"
90
90
  :has-quick-links="isPublished"
91
+ :container="previewContainer"
91
92
  >
92
93
  <div ref="previewContent" class="tw-h-full">
93
94
  <PreviewWithState :device-mode="deviceMode" />
@@ -122,9 +123,9 @@
122
123
  </div>
123
124
 
124
125
  <SideBar
126
+ :has-quick-links="isPublished"
125
127
  :mobile-tab-name="SideBarTabNames.PREVIEW"
126
128
  :is-mobile-screen-size="isMobileScreenSize"
127
- :has-quick-links="isPublished"
128
129
  >
129
130
  <template #tab>
130
131
  <component
@@ -90,7 +90,6 @@ export const userFeatures: UserFeatures = {
90
90
  canUseGettyVideos: false,
91
91
  canUseGoogleAdsense: false,
92
92
  googleAdsenseEnabled: false,
93
- canUseUndoRedo: false,
94
93
  };
95
94
 
96
95
  export const BRAND_PAGE: BrandPageData = {
@@ -36,7 +36,6 @@ import {
36
36
  import { useExternalRichTextEditor } from '@brand-page-maker/composables/rich-text-editor/useRichTextEditor';
37
37
  import { useUiStyleSettingsStore } from '@shared/style-settings/store';
38
38
  import { STYLE_THEME_KEYS } from '@brand-page/constants';
39
- import { useHistoryStore } from '@brand-page-maker/stores/history/history-store';
40
39
 
41
40
  export default defineComponent({
42
41
  mixins: [PageMixin],
@@ -52,7 +51,6 @@ export default defineComponent({
52
51
  const eventTracker = useEventTracker();
53
52
  const { externalEditor } = useExternalRichTextEditor();
54
53
  const styleSettingsStore = useUiStyleSettingsStore();
55
- const historyStore = useHistoryStore();
56
54
 
57
55
  return {
58
56
  items: computed(() => contentSettingsStore.items),
@@ -86,7 +84,6 @@ export default defineComponent({
86
84
  eventTracker,
87
85
  externalEditor,
88
86
  styleSettingsStore,
89
- historyStore,
90
87
  };
91
88
  },
92
89
  data() {
@@ -304,8 +301,6 @@ export default defineComponent({
304
301
  }
305
302
  }
306
303
 
307
- // RTE rewrap on section selection — fold into current head.
308
- this.historyStore.mergeNextMutation();
309
304
  transformToRTE(
310
305
  this.pageSettingsStore,
311
306
  this.externalEditor,
@@ -20,14 +20,14 @@
20
20
  </div>
21
21
  <Toggle
22
22
  id="show-cookie-banner"
23
- :model-value="isToggled"
23
+ :model-value="data.isToggled"
24
24
  class="tw-pointer-events-none tw-touch-none"
25
25
  color="primary"
26
26
  @update:model-value="onShowCookieBanner()"
27
27
  />
28
28
  </div>
29
29
  </div>
30
- <div v-if="isToggled" class="tw-flex-none tw-mt-4">
30
+ <div v-if="data.isToggled" class="tw-flex-none tw-mt-4">
31
31
  <div
32
32
  class="tw-flex tw-items-center tw-justify-between tw-cursor-pointer"
33
33
  @click="onShowPreviewCookieBanner"
@@ -41,7 +41,7 @@
41
41
  </div>
42
42
  <Toggle
43
43
  id="show-preview-cookie-banner"
44
- :model-value="isPreviewToggled"
44
+ :model-value="data.isPreviewToggled"
45
45
  class="tw-pointer-events-none tw-touch-none"
46
46
  color="primary"
47
47
  @update:model-value="onShowPreviewCookieBanner()"
@@ -55,10 +55,10 @@
55
55
  import { Toggle } from '@designcrowd/fe-shared-lib';
56
56
  import { cookieSettingTr } from '@src/composables/useTranslate';
57
57
  import type { CookieOptions } from '@brand-page/models';
58
- import { computed, type PropType } from 'vue';
58
+ import { reactive, type PropType } from 'vue';
59
59
  import { useBrandPageMakerStore } from '@brand-page-maker/stores';
60
60
 
61
- defineProps({
61
+ const props = defineProps({
62
62
  viewModel: {
63
63
  type: Object as PropType<CookieOptions>,
64
64
  required: true,
@@ -67,26 +67,25 @@ defineProps({
67
67
 
68
68
  const brandPageMakerStore = useBrandPageMakerStore();
69
69
 
70
- // Read directly from the store so undo/redo (and any other external
71
- // mutation of cookieOptions) is reflected in the toggles.
72
- const isToggled = computed(
73
- () => brandPageMakerStore.cookieOptions.isCookieEnabled,
74
- );
75
- const isPreviewToggled = computed(
76
- () => brandPageMakerStore.cookieOptions.isCookiePreviewEnabled,
77
- );
70
+ const data = reactive({
71
+ isToggled: props.viewModel.isCookieEnabled,
72
+ isPreviewToggled: props.viewModel.isCookiePreviewEnabled,
73
+ });
78
74
 
79
75
  const onShowCookieBanner = () => {
80
- const next = !isToggled.value;
81
-
82
- brandPageMakerStore.setCookieEnabled({ isCookieEnabled: next });
76
+ data.isToggled = !data.isToggled;
77
+ brandPageMakerStore.setCookieEnabled({
78
+ isCookieEnabled: data.isToggled,
79
+ });
80
+ data.isPreviewToggled = data.isToggled;
83
81
  brandPageMakerStore.setCookiePreviewEnabled({
84
- isCookiePreviewEnabled: next,
82
+ isCookiePreviewEnabled: data.isPreviewToggled,
85
83
  });
86
84
  };
87
85
  const onShowPreviewCookieBanner = () => {
86
+ data.isPreviewToggled = !data.isPreviewToggled;
88
87
  brandPageMakerStore.setCookiePreviewEnabled({
89
- isCookiePreviewEnabled: !isPreviewToggled.value,
88
+ isCookiePreviewEnabled: data.isPreviewToggled,
90
89
  });
91
90
  };
92
91
  </script>
@@ -4,7 +4,6 @@ import {
4
4
  useBrandPageContainerStore,
5
5
  useEventManagerStore,
6
6
  } from '@brand-page-maker/stores';
7
- import { useUndoRedoFlag } from '@brand-page-maker/composables/useUndoRedoFlag';
8
7
  import { quickLinkBarTr } from '@src/composables/useTranslate';
9
8
 
10
9
  export default defineComponent({
@@ -22,7 +21,6 @@ export default defineComponent({
22
21
  return {
23
22
  brandPageContainerStore: useBrandPageContainerStore(),
24
23
  eventManagerStore: useEventManagerStore(),
25
- undoRedoEnabled: useUndoRedoFlag(),
26
24
  };
27
25
  },
28
26
  data() {
@@ -31,17 +29,6 @@ export default defineComponent({
31
29
  };
32
30
  },
33
31
  computed: {
34
- isPublished(): boolean {
35
- return this.brandPageContainerStore.isPublished;
36
- },
37
-
38
- // Only render the bar when at least one inner cluster has something to
39
- // show. Otherwise we'd render an empty white strip — e.g. on an
40
- // unpublished page with the undo flag off.
41
- shouldShowBar(): boolean {
42
- return Boolean(this.undoRedoEnabled) || this.isPublished;
43
- },
44
-
45
32
  brandPageUrl(): string {
46
33
  if (
47
34
  this.brandPageContainerStore.isCustomDomainEnabled &&