@designcrowd/library.brand-page 5.19.0 → 5.19.1-error-html2canvas-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.
- package/lib/src/{CreatedOnBrandCrowd-de-de-DsoA9hc-.js → CreatedOnBrandCrowd-de-de-DmKe7W8L.js} +3 -3
- package/lib/src/{CreatedOnBrandCrowd-en-us-BP6NEQ66.js → CreatedOnBrandCrowd-en-us-D2EeiNep.js} +3 -3
- package/lib/src/{CreatedOnBrandCrowd-es-es-D424uM1Z.js → CreatedOnBrandCrowd-es-es-BqVwNY1D.js} +3 -3
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-CJvuLTkB.js → CreatedOnBrandCrowd-fr-ca-C756a27-.js} +3 -3
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-CJvuLTkB.js → CreatedOnBrandCrowd-fr-fr-C756a27-.js} +3 -3
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-Cc9L314u.js → CreatedOnBrandCrowd-pt-br-FNHAnZUw.js} +3 -3
- package/lib/src/{CreatedOnBrandCrowd-pt-br-Cc9L314u.js → CreatedOnBrandCrowd-pt-pt-FNHAnZUw.js} +3 -3
- package/lib/src/{CreatedOnDcom-de-de-CX-295FH.js → CreatedOnDcom-de-de-8AZZFmDt.js} +3 -3
- package/lib/src/{CreatedOnDcom-en-us-UFlORUgZ.js → CreatedOnDcom-en-us-DizTP32i.js} +3 -3
- package/lib/src/{CreatedOnDcom-es-es-D1tRpcq9.js → CreatedOnDcom-es-es-qnp9_n_A.js} +3 -3
- package/lib/src/{CreatedOnDcom-fr-ca-Dz_ry9uY.js → CreatedOnDcom-fr-ca-jUs352uK.js} +3 -3
- package/lib/src/{CreatedOnDcom-fr-fr-8Ydu6b1T.js → CreatedOnDcom-fr-fr-CTxXtHyk.js} +3 -3
- package/lib/src/{CreatedOnDcom-pt-br-COwvw5k4.js → CreatedOnDcom-pt-br-nQHj8P7d.js} +3 -3
- package/lib/src/{CreatedOnDcom-pt-pt-CB72-eaa.js → CreatedOnDcom-pt-pt-DJmVYQuL.js} +3 -3
- package/lib/src/brand-page/clients/brand-page.client.d.ts +9 -9
- package/lib/src/brand-page/components/{testimonial-section/TestimonialSection.mixin.d.ts → banner-section/BannerSection.mixin.d.ts} +43 -37
- package/lib/src/brand-page/components/banner-section/BannerSection.mixin.js +178 -0
- package/lib/src/brand-page/components/contact-form/ContactForm.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/contact-form/ContactForm.mixin.js +8 -4
- package/lib/src/brand-page/components/image-gallery/ImageGallery.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/image-gallery/ImageGallery.mixin.js +4 -0
- package/lib/src/brand-page/components/image-gallery/masonry/MasonryGallery.mixin.d.ts +0 -1
- package/lib/src/brand-page/components/mailing-list/MailingList.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/mailing-list/MailingList.mixin.js +4 -1
- package/lib/src/brand-page/components/navigation/hamburger/HamburgerNavigation.mixin.d.ts +4 -2
- package/lib/src/brand-page/components/navigation/hamburger/HamburgerNavigation.mixin.js +1 -0
- package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.d.ts +4 -2
- package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.js +5 -4
- package/lib/src/brand-page/components/page/Page.mixin.d.ts +1 -1
- package/lib/src/brand-page/components/page/PageComponent.mixin.d.ts +1 -1
- package/lib/src/brand-page/components/payment/Payment.mixin.d.ts +3 -3
- package/lib/src/brand-page/components/payment/__fixtures__/request-payment.d.ts +13 -13
- package/lib/src/brand-page/components/payment/__fixtures__/support-me.d.ts +13 -13
- package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.js +4 -0
- package/lib/src/brand-page/components/payment/support-me/SupportMe.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/payment/support-me/SupportMe.mixin.js +4 -1
- package/lib/src/brand-page/components/video/Video.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/video/Video.mixin.js +4 -0
- package/lib/src/brand-page/constants/font.constants.d.ts +4 -4
- package/lib/src/brand-page/constants/font.constants.js +4 -4
- package/lib/src/brand-page/constants/misc.constants.d.ts +35 -0
- package/lib/src/brand-page/constants/misc.constants.js +51 -0
- package/lib/src/brand-page/constants/sections/footer-display.constants.js +1 -1
- package/lib/src/brand-page/models/content.model.d.ts +2 -0
- package/lib/src/brand-page/models/index.d.ts +2 -1
- package/lib/src/brand-page/models/index.js +3 -0
- package/lib/src/brand-page/models/payment.model.d.ts +1 -1
- package/lib/src/brand-page/utils/content-padding.util.d.ts +13 -0
- package/lib/src/brand-page/utils/content-padding.util.js +10 -0
- package/lib/src/brand-page/utils/index.d.ts +1 -0
- package/lib/src/brand-page/utils/index.js +1 -0
- package/lib/src/brand-page/utils/migration/migration-17.d.ts +2 -0
- package/lib/src/brand-page/utils/migration/migration-17.js +60 -0
- package/lib/src/brand-page/utils/migration.util.js +10 -0
- package/lib/src/brand-page/utils/personalisation.util.js +72 -14
- package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +21 -19
- package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.js +1 -0
- package/lib/src/brand-page-maker/components/admin-background-settings/AdminBackgroundSettings.mixin.d.ts +16 -10
- package/lib/src/brand-page-maker/components/admin-logo-settings/AdminLogoSettings.mixin.d.ts +5 -3
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +193 -170
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +3 -0
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.js +1 -0
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.d.ts +12 -12
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.stories.js +2 -2
- package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-payment.js +0 -7
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +162 -149
- package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.d.ts +21 -21
- package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.js +1 -1
- package/lib/src/brand-page-maker/components/color-picker/components/ColorModeSelect.mixin.d.ts +4 -2
- package/lib/src/brand-page-maker/components/color-picker/components/ColorModeSelect.mixin.js +1 -0
- package/lib/src/brand-page-maker/components/color-picker/components/GradientColorSlider.mixin.d.ts +4 -2
- package/lib/src/brand-page-maker/components/color-picker/components/GradientColorSlider.mixin.js +1 -0
- package/lib/src/brand-page-maker/components/color-picker/components/GradientColorSliderHandler.mixin.d.ts +5 -2
- package/lib/src/brand-page-maker/components/color-picker/components/GradientColorSliderHandler.mixin.js +1 -0
- package/lib/src/brand-page-maker/components/color-picker/components/GradientTypeSelector.mixin.d.ts +4 -2
- package/lib/src/brand-page-maker/components/color-picker/components/GradientTypeSelector.mixin.js +1 -0
- package/lib/src/brand-page-maker/components/device/Device.mixin.d.ts +4 -2
- package/lib/src/brand-page-maker/components/device/Device.mixin.js +1 -0
- package/lib/src/brand-page-maker/components/navigation/Navigation.mixin.d.ts +4 -2
- package/lib/src/brand-page-maker/components/navigation/Navigation.mixin.js +1 -0
- package/lib/src/brand-page-maker/components/preview/Preview.mixin.d.ts +3 -3
- package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.d.ts +11 -11
- package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +27 -25
- package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.js +1 -0
- package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +27 -27
- package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.js +1 -1
- package/lib/src/brand-page-maker/components/seo-settings/UseExistingDomainModal.mixin.d.ts +17 -12
- package/lib/src/brand-page-maker/components/social-share/SocialShare.mixin.d.ts +12 -12
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +30 -32
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.js +16 -5
- package/lib/src/brand-page-maker/components/upgrade-to-premium-button/UpgradeToPremiumButton.mixin.d.ts +11 -11
- package/lib/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.js +1 -1
- package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.d.ts +1 -1
- package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.js +6 -6
- package/lib/src/brand-page-maker/composables/useEventTracker.d.ts +2 -2
- package/lib/src/brand-page-maker/constants/config-settings-constant.d.ts +6 -6
- package/lib/src/brand-page-maker/constants/config-settings-constant.js +40 -1
- package/lib/src/brand-page-maker/convertors/about-display-style.convertor.js +9 -1
- package/lib/src/brand-page-maker/convertors/banner-align-display-style.convertor.js +7 -1
- package/lib/src/brand-page-maker/convertors/contact-layout-style.convertor.js +6 -1
- package/lib/src/brand-page-maker/convertors/text-image-display-style.convertor.d.ts +1 -1
- package/lib/src/brand-page-maker/convertors/text-image-display-style.convertor.js +1 -1
- package/lib/src/brand-page-maker/models/content-settings.d.ts +1 -1
- package/lib/src/brand-page-maker/models/content-settings.js +39 -2
- package/lib/src/brand-page-maker/models/navigation-style-configs.js +1 -1
- package/lib/src/brand-page-maker/routing/brand-page-maker-router.d.ts +1 -2
- package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +378 -360
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +5 -4
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.js +8 -5
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.d.ts +3 -1
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +7 -3
- package/lib/src/brand-page-maker/stores/history/history-store.d.ts +15 -15
- package/lib/src/brand-page-maker/stores/ui/ui-store.d.ts +6 -0
- package/lib/src/brand-page-maker/stores/ui/ui-store.js +8 -0
- package/lib/src/brand-page-maker/utils/content-settings.util.js +1 -1
- package/lib/src/brand-page-maker/utils/rich-text-editor.util.d.ts +1 -1
- package/lib/src/brand-page-maker/utils/rich-text-editor.util.js +4 -4
- package/lib/src/{bundled-translations-D1q3rSEz.js → bundled-translations-BUyt4scr.js} +9 -9
- package/lib/src/{bundled-translations.de-DE-BxqLLwbh.js → bundled-translations.de-DE-DEw_OVai.js} +1 -1
- package/lib/src/{bundled-translations.es-ES-uh249NlJ.js → bundled-translations.es-ES-CFKWmkgY.js} +17 -17
- package/lib/src/{bundled-translations.fr-CA-BEQmv2fX.js → bundled-translations.fr-CA-DCl5LJS4.js} +1 -1
- package/lib/src/{bundled-translations.fr-FR-BnNuCojH.js → bundled-translations.fr-FR-B5BjgllA.js} +1 -1
- package/lib/src/{bundled-translations.pt-BR-CJUOxVlq.js → bundled-translations.pt-BR-5PWpMPuM.js} +1 -1
- package/lib/src/{bundled-translations.pt-PT-Ds9cMEqK.js → bundled-translations.pt-PT-B9_wN0HR.js} +9 -9
- package/lib/src/bundles/bundled-translations.de-DE.json +2 -0
- package/lib/src/bundles/bundled-translations.es-ES.json +2 -0
- package/lib/src/bundles/bundled-translations.fr-CA.json +2 -0
- package/lib/src/bundles/bundled-translations.fr-FR.json +2 -0
- package/lib/src/bundles/bundled-translations.json +2 -0
- package/lib/src/bundles/bundled-translations.pt-BR.json +2 -0
- package/lib/src/bundles/bundled-translations.pt-PT.json +2 -0
- package/lib/src/clients/brand-page-client.d.ts +16 -15
- package/lib/src/clients/design-template-client.d.ts +3 -0
- package/lib/src/clients/media-client.d.ts +2 -2
- package/lib/src/clients/models.d.ts +2 -0
- package/lib/src/composables/useSnapshot.js +18 -18
- package/lib/src/css/library.brand-page-brandCrowd.min.css +441 -437
- package/lib/src/css/library.brand-page-brandPage.min.css +719 -437
- package/lib/src/css/library.brand-page-designCom.min.css +441 -437
- package/lib/src/css/library.brand-page-preview.min.css +697 -437
- package/lib/src/index.d.ts +1 -1
- package/lib/src/index.mjs +16 -15
- package/lib/src/{lib-tHPi9EKk.js → lib-DityivZa.js} +37011 -33834
- package/lib/src/lib.js +1 -1
- package/lib/src/metadata-builder/builders/footer-builder.js +90 -65
- package/lib/src/metadata-builder/builders/section-builders/image-gallery-builder.js +1 -1
- package/lib/src/metadata-builder/builders/section-builders/images-section-builder.js +1 -1
- package/lib/src/metadata-builder/builders/section-builders/testimonial-section-builder.js +1 -1
- package/lib/src/metadata-builder/builders/section-builders/text-section-builder.js +1 -1
- package/lib/src/metadata-builder/builders/shape-color-utils.js +1 -1
- package/lib/src/plugins/google-maps-plugin/google-maps-plugin.d.ts +1 -1
- package/lib/src/plugins/google-maps-plugin/google-maps-plugin.js +8 -8
- package/lib/src/shared/background-settings/components/background-shapes/BackgroundShapeSettings.mixin.d.ts +13 -13
- package/lib/src/shared/background-settings/store/background-settings-store.d.ts +3 -3
- package/lib/src/shared/color-picker/components/ColorPicker.mixin.d.ts +4 -2
- package/lib/src/shared/color-picker/components/ColorPicker.mixin.js +2 -2
- package/lib/src/shared/color-picker/components/ColorPickerSwatch.mixin.d.ts +4 -2
- package/lib/src/shared/color-picker/components/ColorPickerSwatch.mixin.js +1 -0
- package/lib/src/shared/confirm-modal/ConfirmModal.mixin.d.ts +5 -2
- package/lib/src/shared/confirm-modal/ConfirmModal.mixin.js +1 -0
- package/lib/src/shared/content-settings/components/GenericTextInput.mixin.d.ts +0 -1
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +145 -129
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.js +2 -1
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +125 -110
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +96 -81
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.js +5 -0
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +129 -109
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.js +1 -14
- package/lib/src/shared/content-settings/components/email-field/EmailField.mixin.d.ts +0 -1
- package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +84 -70
- package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.js +4 -3
- package/lib/src/shared/content-settings/components/form-fields-field/FormFieldsField.mixin.d.ts +4 -4
- package/lib/src/shared/content-settings/components/icon-library/IconLibrary.mixin.d.ts +3 -1
- package/lib/src/shared/content-settings/components/icon-library/IconLibrary.mixin.js +1 -0
- package/lib/src/shared/content-settings/components/images-field/ImagesField.mixin.d.ts +2 -2
- package/lib/src/shared/content-settings/components/items-field/ItemsField.mixin.d.ts +4 -3
- package/lib/src/shared/content-settings/components/items-field/ItemsField.mixin.js +1 -1
- package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +40 -40
- package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigOptionField.mixin.d.ts +5 -6
- package/lib/src/shared/content-settings/components/shape-field/ShapeField.mixin.d.ts +0 -1
- package/lib/src/shared/content-settings/components/slider-field/SliderField.mixin.d.ts +2 -2
- package/lib/src/shared/content-settings/components/slider-field/SliderField.mixin.js +9 -0
- package/lib/src/shared/content-settings/components/tel-field/TelField.mixin.d.ts +0 -1
- package/lib/src/shared/content-settings/components/testimonial-items-field/TestimonialItemsField.mixin.d.ts +1 -2
- package/lib/src/shared/content-settings/components/text-field/TextField.mixin.d.ts +0 -1
- package/lib/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.d.ts +1 -2
- package/lib/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.js +1 -1
- package/lib/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.d.ts +28 -28
- package/lib/src/shared/content-settings/components/textarea-field/TextareaField.mixin.d.ts +0 -1
- package/lib/src/shared/content-settings/components/toggle-field/ToggleField.mixin.d.ts +2 -2
- package/lib/src/shared/content-settings/components/url-field/UrlField.mixin.d.ts +0 -1
- package/lib/src/shared/content-settings/components/youtube-video-field/YoutubeVideoField.mixin.d.ts +0 -1
- package/lib/src/shared/content-settings/store/content-settings-store.d.ts +51 -39
- package/lib/src/shared/content-settings/utils.js +0 -1
- package/lib/src/shared/font-family-selector/FontFamilySelector.mixin.d.ts +6 -4
- package/lib/src/shared/font-family-selector/FontFamilySelector.mixin.js +1 -0
- package/lib/src/shared/image-gallery-style-settings/ImageGalleryStyleSettings.mixin.d.ts +4 -2
- package/lib/src/shared/image-gallery-style-settings/ImageGalleryStyleSettings.mixin.js +1 -0
- package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.d.ts +29 -21
- package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.js +1 -1
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +50 -51
- package/lib/src/shared/logo-settings/components/LogoSettingsHeader.mixin.d.ts +6 -4
- package/lib/src/shared/logo-settings/components/LogoSettingsHeader.mixin.js +1 -0
- package/lib/src/shared/logo-settings/store/editable-logo-store.js +1 -1
- package/lib/src/shared/logo-settings/store/logo-settings-store.d.ts +1 -1
- package/lib/src/shared/logo-versions/LogoVersions.mixin.d.ts +13 -5
- package/lib/src/shared/logo-versions/LogoVersions.mixin.js +1 -0
- package/lib/src/shared/models.d.ts +2 -0
- package/lib/src/shared/my-designs/MyDesigns.mixin.d.ts +14 -6
- package/lib/src/shared/my-designs/MyDesigns.mixin.js +1 -0
- package/lib/src/shared/my-uploads/MyMedia.mixin.d.ts +14 -5
- package/lib/src/shared/my-uploads/MyMedia.mixin.js +1 -0
- package/lib/src/shared/my-uploads/MyUploads.mixin.d.ts +14 -5
- package/lib/src/shared/my-uploads/MyUploads.mixin.js +1 -0
- package/lib/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.d.ts +5 -3
- package/lib/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.js +1 -0
- package/lib/src/shared/navigation-style-settings/store/index.d.ts +2 -2
- package/lib/src/shared/page-navigation/store/page-navigation-store.d.ts +2 -2
- package/lib/src/shared/page-settings/components/new-page-modal/NewPageModal.mixin.d.ts +27 -28
- package/lib/src/shared/page-settings/components/new-page-modal/NewPageModal.mixin.js +0 -2
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +204 -177
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +195 -175
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.js +1 -1
- package/lib/src/shared/page-settings/store/page-settings-store.d.ts +9 -9
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +39 -39
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.js +0 -1
- package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +18 -18
- package/lib/src/shared/side-bar/components/SideBarTabButton.mixin.d.ts +6 -6
- package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +66 -60
- package/lib/src/shared/style-settings/store/style-settings-store.d.ts +1 -1
- package/lib/src/shared/style-settings/store/style-settings-store.js +1 -1
- package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.d.ts +20 -450
- package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.js +2 -2
- package/lib/src/shared/template-settings/models.d.ts +1 -0
- package/lib/src/shared/template-settings/store/template-settings-store.d.ts +4 -0
- package/lib/src/shared/template-settings/store/template-settings-store.js +79 -11
- package/lib/src/shared/unsplash-library/UnsplashLibrary.mixin.d.ts +9 -4
- package/lib/src/utils/minify-brand-page-metadata.js +11 -1
- package/package.json +61 -57
- package/src/brand-page/components/about-section/AboutSection.vue +10 -4
- package/src/brand-page/components/about-section/AboutSection.vue.test.ts +7 -5
- package/src/brand-page/components/banner-section/BannerSection.mixin.ts +210 -0
- package/src/brand-page/components/banner-section/BannerSection.vue +11 -4
- package/src/brand-page/components/booking-section/BookingSection.vue +11 -3
- package/src/brand-page/components/brand-page-footer/BrandPageFooter.vue +1 -1
- package/src/brand-page/components/contact-form/ContactForm.mixin.ts +12 -6
- package/src/brand-page/components/contact-form/ContactForm.vue +105 -104
- package/src/brand-page/components/image/Image.mixin.ts +1 -1
- package/src/brand-page/components/image/Image.test.ts +1 -1
- package/src/brand-page/components/image-gallery/ImageGallery.mixin.ts +5 -0
- package/src/brand-page/components/image-gallery/ImageGallery.vue +1 -1
- package/src/brand-page/components/images-section/ImagesSection.vue +0 -1
- package/src/brand-page/components/logo/LogoRender.vue +188 -188
- package/src/brand-page/components/mailing-list/MailingList.mixin.ts +8 -1
- package/src/brand-page/components/mailing-list/MailingList.vue +1 -1
- package/src/brand-page/components/map/Map.vue +5 -1
- package/src/brand-page/components/navigation/hamburger/HamburgerNavigation.mixin.ts +1 -0
- package/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.ts +15 -6
- package/src/brand-page/components/page-footer/PageFooter.vue +1 -0
- package/src/brand-page/components/page-header/HeaderLayout.vue +12 -6
- package/src/brand-page/components/page-header/PageHeader.vue +1 -0
- package/src/brand-page/components/payment/request-payment/RequestPayment.mixin.ts +5 -0
- package/src/brand-page/components/payment/request-payment/RequestPayment.vue +1 -0
- package/src/brand-page/components/payment/support-me/SupportMe.mixin.ts +8 -1
- package/src/brand-page/components/payment/support-me/SupportMe.vue +1 -0
- package/src/brand-page/components/shapes-section/ShapesSection.vue +1 -1
- package/src/brand-page/components/shop/CartModal.vue +1 -3
- package/src/brand-page/components/shop/FeaturedDisplay.vue +2 -2
- package/src/brand-page/components/shop/PaymentModal.vue +1 -5
- package/src/brand-page/components/shop/ProductDetailModal.vue +1 -1
- package/src/brand-page/components/shop/Shop.vue +8 -3
- package/src/brand-page/components/shop/TextDisplay.vue +1 -1
- package/src/brand-page/components/shop/ThumbnailDisplay.vue +2 -2
- package/src/brand-page/components/social-links/SocialLinks.vue +7 -3
- package/src/brand-page/components/testimonial-section/TestimonialSection.vue +120 -11
- package/src/brand-page/components/text/Text.vue +12 -5
- package/src/brand-page/components/text-media-section/TextMediaSection.vue +11 -3
- package/src/brand-page/components/text-wrapper/TextWrapper.vue +3 -1
- package/src/brand-page/components/video/Video.mixin.ts +5 -0
- package/src/brand-page/components/video/Video.vue +1 -1
- package/src/brand-page/constants/font.constants.ts +4 -4
- package/src/brand-page/constants/misc.constants.ts +58 -0
- package/src/brand-page/constants/sections/footer-display.constants.ts +1 -1
- package/src/brand-page/models/content.model.ts +2 -0
- package/src/brand-page/models/index.ts +4 -0
- package/src/brand-page/models/payment.model.ts +2 -1
- package/src/brand-page/models/shop.model.ts +0 -2
- package/src/brand-page/models/user-personalisation.model.ts +1 -2
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +12 -3
- package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +7 -6
- package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +14 -12
- package/src/brand-page/utils/content-padding.util.test.ts +29 -0
- package/src/brand-page/utils/content-padding.util.ts +13 -0
- package/src/brand-page/utils/index.ts +1 -0
- package/src/brand-page/utils/migration/migration-01_1.ts +1 -1
- package/src/brand-page/utils/migration/migration-02.ts +0 -1
- package/src/brand-page/utils/migration/migration-03.ts +0 -1
- package/src/brand-page/utils/migration/migration-04.ts +0 -1
- package/src/brand-page/utils/migration/migration-05.ts +1 -5
- package/src/brand-page/utils/migration/migration-05_2.ts +1 -1
- package/src/brand-page/utils/migration/migration-08.test.ts +1 -1
- package/src/brand-page/utils/migration/migration-17.ts +77 -0
- package/src/brand-page/utils/migration.util.test.ts +290 -0
- package/src/brand-page/utils/migration.util.ts +11 -0
- package/src/brand-page/utils/personalisation.util.test.ts +35 -0
- package/src/brand-page/utils/personalisation.util.ts +119 -23
- package/src/brand-page/view-models.ts +38 -56
- package/src/brand-page-maker/assessors/banner-section-description-visibility.assessor.ts +6 -6
- package/src/brand-page-maker/assessors/color-replacement-icon-visibility.assessor.ts +2 -2
- package/src/brand-page-maker/assessors/color-replacement-profile-visibility.assessor.ts +2 -2
- package/src/brand-page-maker/assessors/color-replacement-visibility.assessor.ts +2 -2
- package/src/brand-page-maker/assessors/contact-form-visibility.assessor.ts +14 -14
- package/src/brand-page-maker/components/action-bar/ActionBar.mixin.ts +1 -0
- package/src/brand-page-maker/components/ai-text-edit/TextBubble.vue +1 -0
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +5 -1
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.ts +1 -0
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.stories.ts +2 -5
- package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.ts +0 -5
- package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-payment.ts +0 -8
- package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-site-template.examples.ts +0 -2
- package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.vue +1 -0
- package/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.ts +1 -1
- package/src/brand-page-maker/components/color-palette/BpColorPalette.vue +1 -2
- package/src/brand-page-maker/components/color-picker/components/ColorModeSelect.mixin.ts +1 -0
- package/src/brand-page-maker/components/color-picker/components/GradientColorSlider.mixin.ts +1 -0
- package/src/brand-page-maker/components/color-picker/components/GradientColorSliderHandler.mixin.ts +1 -0
- package/src/brand-page-maker/components/color-picker/components/GradientTypeSelector.mixin.ts +1 -0
- package/src/brand-page-maker/components/device/Device.mixin.ts +1 -0
- package/src/brand-page-maker/components/navigation/Navigation.mixin.ts +1 -0
- package/src/brand-page-maker/components/rich-text-editor/RichTextEditor.vue +3 -1
- package/src/brand-page-maker/components/sensitive-content/SensitiveContent.vue +1 -4
- package/src/brand-page-maker/components/seo-settings/DeleteDomainModal.vue +1 -1
- package/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.ts +1 -0
- package/src/brand-page-maker/components/seo-settings/SeoPageSettings.vue +1 -1
- package/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.ts +0 -1
- package/src/brand-page-maker/components/seo-settings/UrlSettings.vue +0 -1
- package/src/brand-page-maker/components/seo-settings/UseExistingDomainModal.vue +1 -5
- package/src/brand-page-maker/components/shop/AddOrEditProductContainer.vue +1 -1
- package/src/brand-page-maker/components/shop/ReplaceImageSettingsForShop.vue +1 -1
- package/src/brand-page-maker/components/social-share/SocialShare.vue +1 -1
- package/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.ts +22 -8
- package/src/brand-page-maker/components/template-preview/TemplatePreview.vue +5 -10
- package/src/brand-page-maker/components/template-preview/TemplatePreviewAiBadge.vue +12 -0
- package/src/brand-page-maker/components/video-play/VideoPlayButton.vue +1 -1
- package/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.ts +1 -1
- package/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.ts +6 -6
- package/src/brand-page-maker/constants/config-settings-constant.ts +48 -3
- package/src/brand-page-maker/convertors/about-display-style.convertor.ts +10 -0
- package/src/brand-page-maker/convertors/banner-align-display-style.convertor.ts +8 -0
- package/src/brand-page-maker/convertors/contact-layout-style.convertor.test.ts +50 -0
- package/src/brand-page-maker/convertors/contact-layout-style.convertor.ts +8 -0
- package/src/brand-page-maker/convertors/text-image-display-style.convertor.ts +1 -1
- package/src/brand-page-maker/models/button-styles-config.ts +4 -2
- package/src/brand-page-maker/models/content-settings-configs.ts +4 -2
- package/src/brand-page-maker/models/content-settings.ts +43 -2
- package/src/brand-page-maker/models/navigation-style-configs.ts +5 -6
- package/src/brand-page-maker/stores/admin-logo-settings/admin-logo-settings-store.ts +0 -1
- package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.ts +8 -5
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.test.ts +1 -3
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +12 -4
- package/src/brand-page-maker/stores/ui/ui-store.ts +16 -0
- package/src/brand-page-maker/utils/content-settings.util.ts +1 -1
- package/src/brand-page-maker/utils/rich-text-editor.util.ts +4 -4
- package/src/bundles/bundled-translations.de-DE.json +2 -0
- package/src/bundles/bundled-translations.es-ES.json +2 -0
- package/src/bundles/bundled-translations.fr-CA.json +2 -0
- package/src/bundles/bundled-translations.fr-FR.json +2 -0
- package/src/bundles/bundled-translations.json +2 -0
- package/src/bundles/bundled-translations.pt-BR.json +2 -0
- package/src/bundles/bundled-translations.pt-PT.json +2 -0
- package/src/clients/design-template-client.ts +3 -0
- package/src/clients/models.ts +2 -0
- package/src/composables/useSnapshot.ts +19 -22
- package/src/lib.ts +1 -0
- package/src/metadata-builder/builders/footer-builder.test.ts +137 -0
- package/src/metadata-builder/builders/footer-builder.ts +129 -89
- package/src/metadata-builder/builders/section-builders/image-gallery-builder.ts +1 -1
- package/src/metadata-builder/builders/section-builders/images-section-builder.ts +1 -1
- package/src/metadata-builder/builders/section-builders/testimonial-section-builder.ts +1 -1
- package/src/metadata-builder/builders/section-builders/text-section-builder.ts +1 -1
- package/src/metadata-builder/builders/shape-color-utils.ts +2 -2
- package/src/plugins/google-maps-plugin/google-maps-plugin.ts +8 -8
- package/src/shared/background-settings/components/BackgroundSettings.vue +1 -1
- package/src/shared/background-settings/components/background-color/BackgroundColorSettings.vue +1 -1
- package/src/shared/color-picker/components/ColorPicker.mixin.ts +2 -7
- package/src/shared/color-picker/components/ColorPickerSwatch.mixin.ts +1 -0
- package/src/shared/common/NumberInput.vue +1 -0
- package/src/shared/common/SideBarSettingsHeader.vue +2 -2
- package/src/shared/confirm-modal/ConfirmModal.mixin.ts +1 -0
- package/src/shared/content-settings/components/booking-url-field/BookingUrlField.vue +1 -0
- package/src/shared/content-settings/components/button-configuration-field/ButtonConfigurationField.vue +1 -0
- package/src/shared/content-settings/components/color-field/ColorField.vue +3 -10
- package/src/shared/content-settings/components/content-settings/ContentSettings.mixin.ts +1 -1
- package/src/shared/content-settings/components/content-settings/ContentSettingsLockedButton.vue +1 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.de-DE.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.es-ES.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-CA.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-FR.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-BR.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-PT.json +2 -0
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.ts +5 -0
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.vue +1 -1
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.ts +1 -14
- package/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.ts +4 -6
- package/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.vue +2 -2
- package/src/shared/content-settings/components/icon-library/IconLibrary.mixin.ts +1 -0
- package/src/shared/content-settings/components/items-field/ItemsField.mixin.ts +1 -1
- package/src/shared/content-settings/components/logo-selection-field/LogoSelectionField.vue +1 -1
- package/src/shared/content-settings/components/logo-size-field/LogoSizeSliderField.vue +1 -1
- package/src/shared/content-settings/components/page-dropdown-field/PageDropdownField.vue +1 -1
- package/src/shared/content-settings/components/personalisation-role-field/PersonalisationRoleField.vue +4 -4
- package/src/shared/content-settings/components/slider-field/SliderField.mixin.ts +9 -0
- package/src/shared/content-settings/components/text-image-field/TextImageField.vue +2 -8
- package/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.ts +1 -1
- package/src/shared/content-settings/models.ts +3 -2
- package/src/shared/content-settings/utils.ts +0 -1
- package/src/shared/dropzone-image-uploader/components/DropzoneImageUploader.vue +1 -0
- package/src/shared/ecommerce-settings/store/cart-store.test.ts +1 -1
- package/src/shared/font-family-selector/FontFamilySelector.mixin.ts +1 -0
- package/src/shared/image-gallery-style-settings/ImageGalleryStyleSettings.mixin.ts +1 -0
- package/src/shared/logo-settings/components/EditLogoSettings.mixin.ts +1 -1
- package/src/shared/logo-settings/components/LogoSettings.mixin.ts +0 -1
- package/src/shared/logo-settings/components/LogoSettingsHeader.mixin.ts +1 -0
- package/src/shared/logo-settings/components/LogoStyleSettingsWithState.vue +2 -2
- package/src/shared/logo-settings/components/LogoTemplateSearch.vue +1 -1
- package/src/shared/logo-settings/store/editable-logo-store.ts +1 -1
- package/src/shared/logo-settings/store/logo-settings-store.test.ts +4 -4
- package/src/shared/logo-versions/LogoVersions.mixin.ts +1 -0
- package/src/shared/models.ts +6 -0
- package/src/shared/my-designs/MyDesigns.mixin.ts +1 -0
- package/src/shared/my-uploads/MyMedia.mixin.ts +1 -0
- package/src/shared/my-uploads/MyMediaSelectionItem.vue +2 -1
- package/src/shared/my-uploads/MyUploads.mixin.ts +1 -0
- package/src/shared/my-uploads/models.ts +1 -2
- package/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.ts +1 -0
- package/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.vue +1 -1
- package/src/shared/page-settings/components/new-page-modal/NewPageModal.mixin.ts +0 -3
- package/src/shared/page-settings/components/page-settings/NestedDraggable.vue +1 -1
- package/src/shared/page-settings/components/page-settings/PageSettings.vue +1 -2
- package/src/shared/page-settings/components/page-settings-section-styles/HeaderDisplayStyle.vue +1 -1
- package/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.ts +1 -1
- package/src/shared/page-settings/store/page-settings-store.test.ts +4 -8
- package/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.ts +0 -1
- package/src/shared/shape-library/ShapeLibrary.vue +2 -2
- package/src/shared/style-settings/store/style-settings-store.ts +1 -1
- package/src/shared/template-settings/components/TemplatesSettings.mixin.ts +2 -2
- package/src/shared/template-settings/models.ts +1 -0
- package/src/shared/template-settings/store/template-settings-store.ts +105 -18
- package/src/shared/unsplash-library/UnsplashLibrary.vue +2 -6
- package/src/shared/video-library/VideoLibrary.vue +1 -1
- package/src/utils/minify-brand-page-metadata.ts +11 -1
- package/lib/src/brand-page/components/testimonial-section/TestimonialSection.mixin.js +0 -112
- package/src/brand-page/components/testimonial-section/TestimonialSection.mixin.ts +0 -132
|
@@ -552,6 +552,7 @@ const availableTextFontFamilyOptions = computed(
|
|
|
552
552
|
() => styleSettingsStore.availableTextFontFamilyOptions,
|
|
553
553
|
);
|
|
554
554
|
|
|
555
|
+
// eslint-disable-next-line vue/require-prop-types
|
|
555
556
|
const model = defineModel();
|
|
556
557
|
const emit = defineEmits([
|
|
557
558
|
'focus',
|
|
@@ -709,7 +710,8 @@ watch(
|
|
|
709
710
|
() =>
|
|
710
711
|
contentSettingStore.getItem(props.rawId)?.settings?.content?.textItemsStyle
|
|
711
712
|
?.color,
|
|
712
|
-
|
|
713
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
714
|
+
(_newColor) => {
|
|
713
715
|
if (isAdmin.value) {
|
|
714
716
|
if (props.textItemIndex !== undefined && selectedGlobalTextStyles) {
|
|
715
717
|
toggleTextColor.value =
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
</template>
|
|
93
93
|
<script setup lang="ts">
|
|
94
94
|
import { Button } from '@designcrowd/fe-shared-lib';
|
|
95
|
-
import { computed, reactive, nextTick
|
|
95
|
+
import { computed, reactive, nextTick } from 'vue';
|
|
96
96
|
import {
|
|
97
97
|
SENSITIVE_CONTENT_TYPES,
|
|
98
98
|
type SensitiveContent,
|
|
@@ -109,9 +109,6 @@ const brandPageMakerStore = useBrandPageMakerStore();
|
|
|
109
109
|
|
|
110
110
|
const props = defineProps<Props>();
|
|
111
111
|
|
|
112
|
-
const isBrandPage = computed(() => brandPageMakerStore.isBrandPage);
|
|
113
|
-
const isBrandContact = computed(() => brandPageMakerStore.isBrandContact);
|
|
114
|
-
|
|
115
112
|
const data = reactive({
|
|
116
113
|
sensitiveSettings: [
|
|
117
114
|
{
|
|
@@ -59,7 +59,7 @@ interface Props {
|
|
|
59
59
|
isCustomDomainRequestFailed?: boolean;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
defineProps<Props>();
|
|
63
63
|
const emit = defineEmits<{ (e: 'on-confirm'): void; (e: 'on-cancel'): void }>();
|
|
64
64
|
|
|
65
65
|
const emitConfirm = () => emit('on-confirm');
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
<script>
|
|
107
107
|
import { Button, TextInput, Textarea } from '@designcrowd/fe-shared-lib';
|
|
108
108
|
import SeoPageSettingsMixin from './SeoPageSettings.mixin.ts';
|
|
109
|
-
import {
|
|
109
|
+
import { commonTr, seoSettingsTr } from '@src/composables/useTranslate';
|
|
110
110
|
|
|
111
111
|
export default {
|
|
112
112
|
components: {
|
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
useBrandPageContainerStore,
|
|
10
10
|
useBrandPageMakerStore,
|
|
11
11
|
useLocalisedRouteStore,
|
|
12
|
-
useBrandPageMakerUserStore,
|
|
13
12
|
} from '@brand-page-maker/stores';
|
|
14
13
|
import { defaultUSDCurrency } from '@brand-page-maker/constants/currency-constants';
|
|
15
14
|
import { validateCustomDomainName } from '@brand-page-maker/utils';
|
|
@@ -393,7 +393,6 @@ import { Button, Loader, TextInput } from '@designcrowd/fe-shared-lib';
|
|
|
393
393
|
import { SellDomainNameWidget } from '@designcrowd/fe-shared-lib';
|
|
394
394
|
import UrlSettingsMixin from './UrlSettings.mixin.ts';
|
|
395
395
|
import DeleteDomainModal from './DeleteDomainModal.vue';
|
|
396
|
-
import ConfirmModal from '@shared/confirm-modal/ConfirmModal.vue';
|
|
397
396
|
import UseExistingDomainModal from './UseExistingDomainModal.vue';
|
|
398
397
|
import { commonTr, seoSettingsTr } from '@src/composables/useTranslate';
|
|
399
398
|
|
|
@@ -178,11 +178,7 @@ import {
|
|
|
178
178
|
Loader,
|
|
179
179
|
} from '@designcrowd/fe-shared-lib';
|
|
180
180
|
import UseExistingDomainModalMixin from './UseExistingDomainModal.mixin.ts';
|
|
181
|
-
import {
|
|
182
|
-
tr,
|
|
183
|
-
commonTr,
|
|
184
|
-
existingDomainModalTr,
|
|
185
|
-
} from '@src/composables/useTranslate';
|
|
181
|
+
import { commonTr, existingDomainModalTr } from '@src/composables/useTranslate';
|
|
186
182
|
|
|
187
183
|
export default {
|
|
188
184
|
components: {
|
|
@@ -172,7 +172,7 @@ const enableNotes = computed(() => productSettingStore.productEnableNotes);
|
|
|
172
172
|
const hasVariants = computed(() => productSettingStore.productHasVariants);
|
|
173
173
|
const currencySymbol = computed(() => shopConfigStore.currencySymbol);
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
defineEmits(['update:modelValue']);
|
|
176
176
|
|
|
177
177
|
const onImageUpload = () => {
|
|
178
178
|
productSettingStore.setImageUpload(true);
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
import type { UserMediaItemWithDimensions } from 'src/shared/my-uploads/models';
|
|
26
26
|
const productSettingStore = useProductConfigStore();
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
defineEmits(['on-close', 'on-save']);
|
|
29
29
|
|
|
30
30
|
const onBack = () => {
|
|
31
31
|
productSettingStore.setImageUpload(false);
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
<!-- End Loader Overlay -->
|
|
56
56
|
</template>
|
|
57
57
|
<script>
|
|
58
|
-
import {
|
|
58
|
+
import { Loader, TextInput } from '@designcrowd/fe-shared-lib';
|
|
59
59
|
import SocialShareMixin from './SocialShare.mixin';
|
|
60
60
|
import ImageField from '@shared/content-settings/components/image-field/ImageField.vue';
|
|
61
61
|
import { socialShareTr, commonTr } from '@src/composables/useTranslate';
|
|
@@ -15,10 +15,7 @@ import {
|
|
|
15
15
|
getBrandPageViewModelFromBrandPageModel,
|
|
16
16
|
} from '@brand-page/utils';
|
|
17
17
|
import { STYLE_THEME_KEYS } from '@brand-page/constants';
|
|
18
|
-
import {
|
|
19
|
-
TEMPLATE_TABS,
|
|
20
|
-
type TemplateSettingsTemplate,
|
|
21
|
-
} from '@shared/template-settings/models';
|
|
18
|
+
import type { TemplateSettingsTemplate } from '@shared/template-settings/models';
|
|
22
19
|
import type { DebounceHandle } from 'lodash.debounce';
|
|
23
20
|
import debounce from 'lodash.debounce';
|
|
24
21
|
import { MOBILE_HEIGHT, MOBILE_WIDTH } from '@brand-page-maker/constants';
|
|
@@ -74,7 +71,6 @@ export default defineComponent({
|
|
|
74
71
|
isBrandSite: computed(
|
|
75
72
|
() => brandPageMakerStore.brandPageType === BRAND_PAGE_TYPES.brandSite,
|
|
76
73
|
),
|
|
77
|
-
selectedTab: computed(() => templateSettingsStore.selectedTab.key),
|
|
78
74
|
renderAsImage: computed(() => templateSettingsStore.renderAsImage),
|
|
79
75
|
brandPageMakerUserStore,
|
|
80
76
|
brandPageContainerStore,
|
|
@@ -241,10 +237,28 @@ export default defineComponent({
|
|
|
241
237
|
return '';
|
|
242
238
|
}
|
|
243
239
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
240
|
+
const isAlreadyPersonalised =
|
|
241
|
+
previewImageUrl.includes('contentKey=') ||
|
|
242
|
+
previewImageUrl.includes('userPromptContentKey=');
|
|
243
|
+
|
|
244
|
+
if (
|
|
245
|
+
this.isPersonalisable &&
|
|
246
|
+
this.template.contentKey &&
|
|
247
|
+
!isAlreadyPersonalised
|
|
248
|
+
) {
|
|
249
|
+
if (this.userToken && !this.template.usesUserPromptContentKey) {
|
|
250
|
+
previewImageUrl += `&contentKey=${this.template.contentKey}`;
|
|
251
|
+
|
|
252
|
+
// The backend already bakes userToken into brand-site preview URLs. Only add
|
|
253
|
+
// it when missing - two userToken params parse as an array and the preview
|
|
254
|
+
// renderer rejects it ("userToken must be a string type") (bp-5765).
|
|
255
|
+
if (!previewImageUrl.includes('userToken=')) {
|
|
256
|
+
previewImageUrl += `&userToken=${this.userToken}`;
|
|
257
|
+
}
|
|
247
258
|
} else {
|
|
259
|
+
// userPromptContentKey resolves from the userPrompt S3 bucket (real AI images).
|
|
260
|
+
// Post-purchase designs with a userPrompt key route here too, NOT through the
|
|
261
|
+
// userToken/regular-bucket branch above which holds placeholders (bp-5454).
|
|
248
262
|
previewImageUrl += `&userPromptContentKey=${this.template.contentKey}`;
|
|
249
263
|
}
|
|
250
264
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div
|
|
3
3
|
ref="container"
|
|
4
4
|
data-component="template-preview"
|
|
5
|
-
class="template-preview-container hover:!tw-shadow-[0_0_0_3px] hover:!tw-shadow-info-500 tw-overflow-hidden"
|
|
5
|
+
class="template-preview-container hover:!tw-shadow-[0_0_0_3px] hover:!tw-shadow-info-500 tw-overflow-hidden tw-relative tw-isolate"
|
|
6
6
|
:style="containerStyle"
|
|
7
7
|
:class="{
|
|
8
8
|
'!tw-shadow-[0_0_0_3px] !tw-shadow-info-500':
|
|
@@ -55,17 +55,10 @@
|
|
|
55
55
|
/>
|
|
56
56
|
</div>
|
|
57
57
|
<!-- End Preview Image -->
|
|
58
|
-
<!-- Start personalisation tag -->
|
|
59
|
-
<div
|
|
60
|
-
v-if="isPersonalisable"
|
|
61
|
-
class="tw-absolute tw-bottom-0 tw-right-0 tw-p-2 tw-z-50 tw-text-white"
|
|
62
|
-
style="background: lightgreen"
|
|
63
|
-
>
|
|
64
|
-
<span>Personalisable</span>
|
|
65
|
-
</div>
|
|
66
|
-
<!-- End personalisation tag -->
|
|
67
58
|
</div>
|
|
68
59
|
</div>
|
|
60
|
+
<!-- AI badge outside scaled container so it renders at natural size -->
|
|
61
|
+
<TemplatePreviewAiBadge v-if="isPersonalisable" />
|
|
69
62
|
</div>
|
|
70
63
|
</template>
|
|
71
64
|
<script>
|
|
@@ -73,11 +66,13 @@ import { defineComponent } from 'vue';
|
|
|
73
66
|
import TemplatePreviewMixin from './TemplatePreview.mixin.ts';
|
|
74
67
|
import Page from '@brand-page/components/page/Page.vue';
|
|
75
68
|
import { Loader } from '@designcrowd/fe-shared-lib';
|
|
69
|
+
import TemplatePreviewAiBadge from './TemplatePreviewAiBadge.vue';
|
|
76
70
|
|
|
77
71
|
export default defineComponent({
|
|
78
72
|
components: {
|
|
79
73
|
Page,
|
|
80
74
|
Loader,
|
|
75
|
+
TemplatePreviewAiBadge,
|
|
81
76
|
},
|
|
82
77
|
mixins: [TemplatePreviewMixin],
|
|
83
78
|
setup(props, context) {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
data-test-ai-design
|
|
4
|
+
class="tw-flex tw-flex-row tw-absolute tw-top-2.5 tw-left-2.5 tw-rounded-full tw-py-1 tw-px-2 tw-text-white tw-text-xs tw-font-bold tw-z-[25] tw-bg-gradient-to-t tw-from-[#d946ef] tw-to-[#8b5cf6]"
|
|
5
|
+
>
|
|
6
|
+
<Icon name="ai" class="tw-text-white tw-pr-1" size="sm" />
|
|
7
|
+
<span>AI</span>
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
<script setup lang="ts">
|
|
11
|
+
import { Icon } from '@designcrowd/fe-shared-lib';
|
|
12
|
+
</script>
|
|
@@ -628,15 +628,15 @@ export const useRichTextEditor = (
|
|
|
628
628
|
);
|
|
629
629
|
fontSettings.selectedTextColor = hasLogoColorVar(globalStyles.color ?? '')
|
|
630
630
|
? '#000000'
|
|
631
|
-
: globalStyles?.color ?? '#000000';
|
|
631
|
+
: (globalStyles?.color ?? '#000000');
|
|
632
632
|
fontSettings.selectedBackgroundColor = hasLogoColorVar(
|
|
633
633
|
globalStyles?.backgroundColor ?? '',
|
|
634
634
|
)
|
|
635
635
|
? 'transparent'
|
|
636
|
-
: globalStyles?.backgroundColor ?? 'transparent';
|
|
636
|
+
: (globalStyles?.backgroundColor ?? 'transparent');
|
|
637
637
|
lineHeight.value = globalStyles?.lineHeight?.includes('em')
|
|
638
638
|
? emToPx(globalStyles?.lineHeight ?? '1em')
|
|
639
|
-
: globalStyles?.lineHeight ?? '1';
|
|
639
|
+
: (globalStyles?.lineHeight ?? '1');
|
|
640
640
|
letterSpacing.value = letterSpacingValueConvertor.convert(
|
|
641
641
|
globalStyles ?? {},
|
|
642
642
|
);
|
|
@@ -658,15 +658,15 @@ export const useRichTextEditor = (
|
|
|
658
658
|
props.styles?.color ?? '#000000',
|
|
659
659
|
)
|
|
660
660
|
? '#000000'
|
|
661
|
-
: props.styles?.color ?? '#000000';
|
|
661
|
+
: (props.styles?.color ?? '#000000');
|
|
662
662
|
fontSettings.selectedBackgroundColor = hasLogoColorVar(
|
|
663
663
|
props.styles?.backgroundColor ?? '',
|
|
664
664
|
)
|
|
665
665
|
? 'transparent'
|
|
666
|
-
: props.styles?.backgroundColor ?? 'transparent';
|
|
666
|
+
: (props.styles?.backgroundColor ?? 'transparent');
|
|
667
667
|
lineHeight.value = props.styles?.lineHeight?.includes('em')
|
|
668
668
|
? emToPx(props.styles?.lineHeight ?? '1em')
|
|
669
|
-
: props.styles?.lineHeight ?? '1';
|
|
669
|
+
: (props.styles?.lineHeight ?? '1');
|
|
670
670
|
letterSpacing.value = letterSpacingValueConvertor.convert(
|
|
671
671
|
props.styles ?? {},
|
|
672
672
|
);
|
|
@@ -201,6 +201,34 @@ const SETTINGS_STYLE_FIElD_GROUPS = (): ContentSettingsFieldGroup[] => {
|
|
|
201
201
|
];
|
|
202
202
|
};
|
|
203
203
|
|
|
204
|
+
/**
|
|
205
|
+
* Shared Top/Bottom padding sliders (BP-5687). Reuses the same `slider` control
|
|
206
|
+
* as the Divider block (track + editable number box), range 0–100, continuous.
|
|
207
|
+
* Spread into a block's `fields` to expose the Padding Control on that block.
|
|
208
|
+
* Pass the Style field-group id for blocks that use grouped panels.
|
|
209
|
+
*/
|
|
210
|
+
const PADDING_CONTROL_FIELDS = (
|
|
211
|
+
groupId?: string,
|
|
212
|
+
): {
|
|
213
|
+
topPadding: ContentSettingsField<Content>;
|
|
214
|
+
bottomPadding: ContentSettingsField<Content>;
|
|
215
|
+
} => ({
|
|
216
|
+
topPadding: {
|
|
217
|
+
type: 'slider',
|
|
218
|
+
title: contentSettingsTr(`topPaddingTitle`),
|
|
219
|
+
minLength: 0,
|
|
220
|
+
maxLength: 100,
|
|
221
|
+
groupId,
|
|
222
|
+
},
|
|
223
|
+
bottomPadding: {
|
|
224
|
+
type: 'slider',
|
|
225
|
+
title: contentSettingsTr(`bottomPaddingTitle`),
|
|
226
|
+
minLength: 0,
|
|
227
|
+
maxLength: 100,
|
|
228
|
+
groupId,
|
|
229
|
+
},
|
|
230
|
+
});
|
|
231
|
+
|
|
204
232
|
const DEFAULT_TITLE_STYLE_SETTINGS_FILED =
|
|
205
233
|
(): ContentSettingsField<Content> => ({
|
|
206
234
|
type: 'text-style',
|
|
@@ -418,9 +446,9 @@ const shopReplaceImageSettings =
|
|
|
418
446
|
titleReplace: contentSettingsTr(`imageReplaceTitle`),
|
|
419
447
|
contentMediaFieldName: MediaFieldNames.requestPaymentConfig,
|
|
420
448
|
setContentMedia: (
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
449
|
+
_content: ShopContent,
|
|
450
|
+
_value: SetContentMediaPayload,
|
|
451
|
+
_index?: number,
|
|
424
452
|
) => '',
|
|
425
453
|
openByDefault: false,
|
|
426
454
|
mediaType: null,
|
|
@@ -1097,6 +1125,7 @@ export const IMAGE_GALLERY_CONTENT_SETTINGS_CONFIG = (): ContentSettingsConfig<
|
|
|
1097
1125
|
defaultValue: false,
|
|
1098
1126
|
visibilityAssessor: imageGalleryFieldVisibilityAssessor,
|
|
1099
1127
|
},
|
|
1128
|
+
...PADDING_CONTROL_FIELDS(),
|
|
1100
1129
|
},
|
|
1101
1130
|
isEnabled: true,
|
|
1102
1131
|
isLocked: (features) => !features.canAddImageContents,
|
|
@@ -1136,6 +1165,7 @@ export const VIDEO_CONTENT_SETTINGS_CONFIG = (): ContentSettingsConfig<
|
|
|
1136
1165
|
label: contentSettingsTr(`muteLabel`),
|
|
1137
1166
|
valueConvertor: videoContentStateConvertor,
|
|
1138
1167
|
},
|
|
1168
|
+
...PADDING_CONTROL_FIELDS(),
|
|
1139
1169
|
},
|
|
1140
1170
|
isEnabled: true,
|
|
1141
1171
|
isLocked: (features) => !features.canAddVideoContents,
|
|
@@ -1278,6 +1308,7 @@ export const TEXT_CONTENT_SETTINGS_CONFIG = (): ContentSettingsConfig<
|
|
|
1278
1308
|
variant: 'icon',
|
|
1279
1309
|
visibilityAssessor: brandSiteTypeVisibilityAssessor,
|
|
1280
1310
|
},
|
|
1311
|
+
...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
|
|
1281
1312
|
backgroundColor: {
|
|
1282
1313
|
type: 'color',
|
|
1283
1314
|
defaultValue: {},
|
|
@@ -1736,6 +1767,7 @@ export const MAP_CONTENT_SETTINGS_CONFIG =
|
|
|
1736
1767
|
type: 'address',
|
|
1737
1768
|
title: contentSettingsTr(`addressTitle`),
|
|
1738
1769
|
},
|
|
1770
|
+
...PADDING_CONTROL_FIELDS(),
|
|
1739
1771
|
},
|
|
1740
1772
|
isEnabled: true,
|
|
1741
1773
|
isLocked: (features) => !features.canAddMapContents,
|
|
@@ -1787,6 +1819,7 @@ export const MAILING_LIST_CONTENT_SETTINGS_CONFIG =
|
|
|
1787
1819
|
},
|
|
1788
1820
|
titleStyle: DEFAULT_TITLE_STYLE_SETTINGS_FILED_WITH_TITLE(),
|
|
1789
1821
|
buttonTextStyle: DEFAULT_BUTTON_TEXT_STYLE_FIELD(),
|
|
1822
|
+
...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
|
|
1790
1823
|
},
|
|
1791
1824
|
isEnabled: true,
|
|
1792
1825
|
isLocked: false,
|
|
@@ -1971,6 +2004,7 @@ export const REQUEST_PAYMENT_CONTENT_SETTINGS_CONFIG =
|
|
|
1971
2004
|
defaultValue: {},
|
|
1972
2005
|
label: contentSettingsTr(`buttonTextStyleLabel`),
|
|
1973
2006
|
},
|
|
2007
|
+
...PADDING_CONTROL_FIELDS(REQUEST_PAYMENT_GROUPS.style),
|
|
1974
2008
|
},
|
|
1975
2009
|
isEnabled: (features) => features.canAddRequestPaymentContents,
|
|
1976
2010
|
isLocked: false,
|
|
@@ -2038,6 +2072,7 @@ export const SUPPORT_ME_CONTENT_SETTINGS_CONFIG =
|
|
|
2038
2072
|
label: contentSettingsTr(`itemStyleLabel`),
|
|
2039
2073
|
},
|
|
2040
2074
|
buttonTextStyle: DEFAULT_BUTTON_TEXT_STYLE_FIELD(),
|
|
2075
|
+
...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
|
|
2041
2076
|
},
|
|
2042
2077
|
isEnabled: (features) => features.canAddRequestPaymentContents,
|
|
2043
2078
|
isLocked: false,
|
|
@@ -2170,6 +2205,7 @@ export const CONTACT_FORM_SETTINGS_CONFIG =
|
|
|
2170
2205
|
variant: 'icon',
|
|
2171
2206
|
visibilityAssessor: brandSiteTypeVisibilityAssessor,
|
|
2172
2207
|
},
|
|
2208
|
+
...PADDING_CONTROL_FIELDS(CONTACT_FORM_GROUPS.style),
|
|
2173
2209
|
titleStyle: DEFAULT_TITLE_STYLE_SETTINGS_FILED_WITH_TITLE(),
|
|
2174
2210
|
descriptionStyle: DEFAULT_DESCRIPTION_STYLE_FILED(),
|
|
2175
2211
|
buttonTextStyle: DEFAULT_BUTTON_TEXT_STYLE_FIELD(),
|
|
@@ -2229,6 +2265,7 @@ export const BANNER_SECTION_SETTINGS_CONFIG =
|
|
|
2229
2265
|
groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.style,
|
|
2230
2266
|
variant: 'icon',
|
|
2231
2267
|
},
|
|
2268
|
+
...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
|
|
2232
2269
|
overlayColor: {
|
|
2233
2270
|
type: 'color',
|
|
2234
2271
|
title: contentSettingsTr(`overlayColorTitle`),
|
|
@@ -2507,6 +2544,7 @@ export const ABOUT_SECTION_SETTINGS_CONFIG =
|
|
|
2507
2544
|
groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.style,
|
|
2508
2545
|
variant: 'icon',
|
|
2509
2546
|
},
|
|
2547
|
+
...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
|
|
2510
2548
|
titleStyle: DEFAULT_TITLE_STYLE_SETTINGS_FILED_WITH_TITLE(),
|
|
2511
2549
|
paragraphStyle: {
|
|
2512
2550
|
type: 'text-style',
|
|
@@ -2594,6 +2632,7 @@ export const IMAGES_SECTION_SETTINGS_CONFIG =
|
|
|
2594
2632
|
],
|
|
2595
2633
|
fields: {
|
|
2596
2634
|
displayStyle: TEXT_MEDIA_DISPLAY_STYLE_FIELD(MEDIA_TYPES.image),
|
|
2635
|
+
...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
|
|
2597
2636
|
aspectRatio: {
|
|
2598
2637
|
type: 'radio',
|
|
2599
2638
|
role: 'multi',
|
|
@@ -2681,6 +2720,7 @@ export const TESTIMONIALS_SECTION_SETTINGS_CONFIG =
|
|
|
2681
2720
|
groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.style,
|
|
2682
2721
|
variant: 'icon',
|
|
2683
2722
|
},
|
|
2723
|
+
...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
|
|
2684
2724
|
title: {
|
|
2685
2725
|
type: 'text',
|
|
2686
2726
|
placeholder: contentSettingsTr(`titlePlaceholder`),
|
|
@@ -2793,6 +2833,7 @@ export const SOCIAL_LINKS_SETTINGS_CONFIG =
|
|
|
2793
2833
|
optionsConvertor: socialLinksIconDisplayStyleConvertor,
|
|
2794
2834
|
variant: 'icon',
|
|
2795
2835
|
},
|
|
2836
|
+
...PADDING_CONTROL_FIELDS(SOCIAL_LINKS_GROUPS.style),
|
|
2796
2837
|
titleStyle: {
|
|
2797
2838
|
type: 'text-style',
|
|
2798
2839
|
groupId: SOCIAL_LINKS_GROUPS.style,
|
|
@@ -2905,6 +2946,7 @@ export const SHAPES_SECTION_SETTINGS_CONFIG =
|
|
|
2905
2946
|
],
|
|
2906
2947
|
fields: {
|
|
2907
2948
|
displayStyle: TEXT_MEDIA_DISPLAY_STYLE_FIELD(MEDIA_TYPES.shape),
|
|
2949
|
+
...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
|
|
2908
2950
|
size: IMAGE_SIZE_FIELD(),
|
|
2909
2951
|
title: TEXT_MEDIA_TITLE_FIELD(),
|
|
2910
2952
|
description: TEXT_MEDIA_DESCRIPTION_FIELD(),
|
|
@@ -2942,6 +2984,7 @@ export const SHAPES_SECTION_SETTINGS_CONFIG =
|
|
|
2942
2984
|
? MAX_BS_MEDIA_AND_IMAGE_ITEMS
|
|
2943
2985
|
: MAX_BP_MEDIA_AND_IMAGE_ITEMS,
|
|
2944
2986
|
},
|
|
2987
|
+
...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
|
|
2945
2988
|
},
|
|
2946
2989
|
isEnabled: true,
|
|
2947
2990
|
isLocked: false,
|
|
@@ -3003,6 +3046,7 @@ export const SHOP_SECTION_SETTINGS_CONFIG = (): ContentSettingsConfig<
|
|
|
3003
3046
|
optionsConvertor: shopAspectRatioConvertor,
|
|
3004
3047
|
visibilityAssessor: shopImageOptionVisibilityAssessor,
|
|
3005
3048
|
},
|
|
3049
|
+
...PADDING_CONTROL_FIELDS(REQUEST_PAYMENT_GROUPS.style),
|
|
3006
3050
|
title: {
|
|
3007
3051
|
type: 'title',
|
|
3008
3052
|
groupId: REQUEST_PAYMENT_GROUPS.settings,
|
|
@@ -3166,6 +3210,7 @@ export const BOOKING_SECTION_SETTINGS_CONFIG =
|
|
|
3166
3210
|
visibilityAssessor: (c, b) =>
|
|
3167
3211
|
personalisationOverrideVisibility(c, b, 'buttonText'),
|
|
3168
3212
|
},
|
|
3213
|
+
...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
|
|
3169
3214
|
backgroundStyle: {
|
|
3170
3215
|
type: 'color',
|
|
3171
3216
|
groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.style,
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
ALIGN_RIGHT_ALIGNED,
|
|
7
7
|
ALIGN_RIGHT_FULL_IMAGE,
|
|
8
8
|
TEXT_ONLY,
|
|
9
|
+
ABOUT_DEFAULT_PADDING,
|
|
9
10
|
} from '@brand-page/constants';
|
|
10
11
|
|
|
11
12
|
import type { AboutSectionContent } from '@brand-page';
|
|
@@ -76,11 +77,18 @@ export const aboutDisplayStyleConvertor: ValueConvertor<
|
|
|
76
77
|
convertBack(config: ButtonGroupConfig): Partial<AboutSectionContent> {
|
|
77
78
|
const selectedOption = config.options.find((v) => v.isSelected);
|
|
78
79
|
|
|
80
|
+
// Switching display style adopts that style's canonical look — like the
|
|
81
|
+
// textAlign reset below — including its default block padding (a flat 32
|
|
82
|
+
// for every About style).
|
|
83
|
+
const padding = ABOUT_DEFAULT_PADDING;
|
|
84
|
+
|
|
79
85
|
if (!selectedOption || selectedOption.value === ALIGN_CENTERED) {
|
|
80
86
|
const textAlign = 'center';
|
|
81
87
|
|
|
82
88
|
return {
|
|
83
89
|
displayStyle: selectedOption?.value,
|
|
90
|
+
topPadding: padding,
|
|
91
|
+
bottomPadding: padding,
|
|
84
92
|
titleStyle: {
|
|
85
93
|
textAlign,
|
|
86
94
|
},
|
|
@@ -94,6 +102,8 @@ export const aboutDisplayStyleConvertor: ValueConvertor<
|
|
|
94
102
|
|
|
95
103
|
return {
|
|
96
104
|
displayStyle: selectedOption?.value,
|
|
105
|
+
topPadding: padding,
|
|
106
|
+
bottomPadding: padding,
|
|
97
107
|
titleStyle: {
|
|
98
108
|
textAlign,
|
|
99
109
|
},
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
ALIGN_TOP_FULL_IMAGE,
|
|
16
16
|
ALIGN_BOTTOM_FULL_IMAGE,
|
|
17
17
|
ALIGN_MIDDLE_FULL_IMAGE,
|
|
18
|
+
bannerDisplayStyleDefaultPadding,
|
|
18
19
|
} from '@brand-page/constants';
|
|
19
20
|
import type { BannerSectionContent } from '@brand-page';
|
|
20
21
|
|
|
@@ -172,8 +173,15 @@ export const bannerAlignDisplayStyleConvertor: ValueConvertor<
|
|
|
172
173
|
textAlign = 'center';
|
|
173
174
|
}
|
|
174
175
|
|
|
176
|
+
// Switching display style adopts that style's canonical look — like the
|
|
177
|
+
// textAlign resets above — including its default block padding. Full-bleed
|
|
178
|
+
// image styles default to 0 (image flush to the edges); the rest to 32.
|
|
179
|
+
const padding = bannerDisplayStyleDefaultPadding(selectedOption?.value);
|
|
180
|
+
|
|
175
181
|
return {
|
|
176
182
|
displayStyle: selectedOption?.value,
|
|
183
|
+
topPadding: padding,
|
|
184
|
+
bottomPadding: padding,
|
|
177
185
|
titleStyle: {
|
|
178
186
|
textAlign,
|
|
179
187
|
},
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { describe, test, expect } from 'vitest';
|
|
2
|
+
import { contactLayoutStyleConvertor } from './contact-layout-style.convertor';
|
|
3
|
+
import {
|
|
4
|
+
ALIGN_CENTERED,
|
|
5
|
+
ALIGN_CARD_CENTER,
|
|
6
|
+
ALIGN_CARD_CENTER_IMAGE,
|
|
7
|
+
ALIGN_LEFT_FULL_IMAGE,
|
|
8
|
+
TEXT_ONLY,
|
|
9
|
+
} from '@brand-page/constants';
|
|
10
|
+
|
|
11
|
+
const configWithSelected = (selected: string) => ({
|
|
12
|
+
options: contactLayoutStyleConvertor
|
|
13
|
+
.convert(selected)
|
|
14
|
+
.options.map((option) => ({
|
|
15
|
+
...option,
|
|
16
|
+
isSelected: option.value === selected,
|
|
17
|
+
})),
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
describe('contact-layout-style.convertor', () => {
|
|
21
|
+
test.each([
|
|
22
|
+
[ALIGN_CARD_CENTER, 32, 'center'],
|
|
23
|
+
[ALIGN_CENTERED, 32, 'center'],
|
|
24
|
+
[ALIGN_CARD_CENTER_IMAGE, 0, 'center'],
|
|
25
|
+
[TEXT_ONLY, 32, 'left'],
|
|
26
|
+
[ALIGN_LEFT_FULL_IMAGE, 0, 'left'],
|
|
27
|
+
])(
|
|
28
|
+
'convertBack should apply the default padding and text alignment for %s',
|
|
29
|
+
(layoutStyle, padding, textAlign) => {
|
|
30
|
+
const result = contactLayoutStyleConvertor.convertBack(
|
|
31
|
+
configWithSelected(layoutStyle),
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
expect(result).toStrictEqual({
|
|
35
|
+
layoutStyle,
|
|
36
|
+
topPadding: padding,
|
|
37
|
+
bottomPadding: padding,
|
|
38
|
+
titleStyle: {
|
|
39
|
+
textAlign,
|
|
40
|
+
},
|
|
41
|
+
descriptionStyle: {
|
|
42
|
+
textAlign,
|
|
43
|
+
},
|
|
44
|
+
buttonTextStyle: {
|
|
45
|
+
textAlign: 'center',
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
);
|
|
50
|
+
});
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
ALIGN_CARD_CENTER_IMAGE,
|
|
7
7
|
TEXT_ONLY,
|
|
8
8
|
ALIGN_CARD_CENTER,
|
|
9
|
+
CONTACT_FORM_LAYOUT_DEFAULT_PADDING,
|
|
9
10
|
} from '@brand-page/constants';
|
|
10
11
|
import type { ContactFormContent } from '@brand-page';
|
|
11
12
|
|
|
@@ -84,8 +85,15 @@ export const contactLayoutStyleConvertor: ValueConvertor<
|
|
|
84
85
|
textAlign = 'left';
|
|
85
86
|
}
|
|
86
87
|
|
|
88
|
+
// Switching layout adopts that layout's canonical look — same as the
|
|
89
|
+
// textAlign resets below — including its default block padding.
|
|
90
|
+
const padding =
|
|
91
|
+
CONTACT_FORM_LAYOUT_DEFAULT_PADDING[selectedOption?.value ?? ''] ?? 0;
|
|
92
|
+
|
|
87
93
|
return {
|
|
88
94
|
layoutStyle: selectedOption?.value,
|
|
95
|
+
topPadding: padding,
|
|
96
|
+
bottomPadding: padding,
|
|
89
97
|
titleStyle: {
|
|
90
98
|
textAlign,
|
|
91
99
|
},
|