@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
|
@@ -74,3 +74,140 @@ describe('FooterBuilder — copyright font vs global style', () => {
|
|
|
74
74
|
expect(style.textAlign).toBe('center');
|
|
75
75
|
});
|
|
76
76
|
});
|
|
77
|
+
|
|
78
|
+
type Link = { imageUrl: string; url: string };
|
|
79
|
+
|
|
80
|
+
const link = (imageUrl: string): Link => ({
|
|
81
|
+
imageUrl,
|
|
82
|
+
url: `https://${imageUrl}.com`,
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Footers migrated from the legacy single `footerStyles` model
|
|
87
|
+
* (migration-01) split into desktop + mobile via a shallow spread, leaving
|
|
88
|
+
* both viewports' `socialLinks` pointing at ONE shared array. `cloneDeep`
|
|
89
|
+
* preserves that shared reference. This factory reproduces that shape.
|
|
90
|
+
*/
|
|
91
|
+
const makeSharedSocialModel = (links: Link[]): BrandPageModel => {
|
|
92
|
+
const shared = links.map((l) => ({ ...l }));
|
|
93
|
+
|
|
94
|
+
return {
|
|
95
|
+
styles: { textStyles: { textStyleOptions } },
|
|
96
|
+
pageFooterDesktop: { socialLinks: shared },
|
|
97
|
+
pageFooterMobile: { socialLinks: shared },
|
|
98
|
+
} as unknown as BrandPageModel;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const makeIndependentSocialModel = (links: Link[]): BrandPageModel =>
|
|
102
|
+
({
|
|
103
|
+
styles: { textStyles: { textStyleOptions } },
|
|
104
|
+
pageFooterDesktop: { socialLinks: links.map((l) => ({ ...l })) },
|
|
105
|
+
pageFooterMobile: { socialLinks: links.map((l) => ({ ...l })) },
|
|
106
|
+
}) as unknown as BrandPageModel;
|
|
107
|
+
|
|
108
|
+
const socialIcons = (footer: { socialLinks?: Link[] } | undefined) =>
|
|
109
|
+
(footer?.socialLinks ?? []).map((l) => l.imageUrl);
|
|
110
|
+
|
|
111
|
+
describe('FooterBuilder — social link removal (shared-array regression)', () => {
|
|
112
|
+
// Reproduces the bug: a single requested removal index dropped TWO links
|
|
113
|
+
// because both viewports shared one array and the builder spliced it twice.
|
|
114
|
+
it('removes exactly one link per requested index even when viewports share the array', async () => {
|
|
115
|
+
const model = makeSharedSocialModel([
|
|
116
|
+
link('facebook'),
|
|
117
|
+
link('instagram'),
|
|
118
|
+
link('x'),
|
|
119
|
+
link('youtube'),
|
|
120
|
+
]);
|
|
121
|
+
|
|
122
|
+
const { model: out } = await run(
|
|
123
|
+
{ _remove_social_link_indices: [2] },
|
|
124
|
+
model,
|
|
125
|
+
);
|
|
126
|
+
|
|
127
|
+
expect(socialIcons(out.pageFooterDesktop)).toEqual([
|
|
128
|
+
'facebook',
|
|
129
|
+
'instagram',
|
|
130
|
+
'youtube',
|
|
131
|
+
]);
|
|
132
|
+
expect(socialIcons(out.pageFooterMobile)).toEqual([
|
|
133
|
+
'facebook',
|
|
134
|
+
'instagram',
|
|
135
|
+
'youtube',
|
|
136
|
+
]);
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
it('un-shares the viewport arrays so later in-place edits cannot cross-corrupt', async () => {
|
|
140
|
+
const model = makeSharedSocialModel([
|
|
141
|
+
link('facebook'),
|
|
142
|
+
link('instagram'),
|
|
143
|
+
link('x'),
|
|
144
|
+
]);
|
|
145
|
+
|
|
146
|
+
const { model: out } = await run(
|
|
147
|
+
{ _remove_social_link_indices: [0] },
|
|
148
|
+
model,
|
|
149
|
+
);
|
|
150
|
+
|
|
151
|
+
expect(out.pageFooterDesktop!.socialLinks).not.toBe(
|
|
152
|
+
out.pageFooterMobile!.socialLinks,
|
|
153
|
+
);
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
it('handles multiple removal indices on a shared array (descending splice)', async () => {
|
|
157
|
+
const model = makeSharedSocialModel([
|
|
158
|
+
link('facebook'),
|
|
159
|
+
link('instagram'),
|
|
160
|
+
link('x'),
|
|
161
|
+
link('youtube'),
|
|
162
|
+
]);
|
|
163
|
+
|
|
164
|
+
const { model: out } = await run(
|
|
165
|
+
{ _remove_social_link_indices: [0, 2] },
|
|
166
|
+
model,
|
|
167
|
+
);
|
|
168
|
+
|
|
169
|
+
expect(socialIcons(out.pageFooterDesktop)).toEqual([
|
|
170
|
+
'instagram',
|
|
171
|
+
'youtube',
|
|
172
|
+
]);
|
|
173
|
+
expect(socialIcons(out.pageFooterMobile)).toEqual(['instagram', 'youtube']);
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
it('removes one link per index for independent viewport arrays (no regression)', async () => {
|
|
177
|
+
const model = makeIndependentSocialModel([
|
|
178
|
+
link('facebook'),
|
|
179
|
+
link('instagram'),
|
|
180
|
+
link('x'),
|
|
181
|
+
]);
|
|
182
|
+
|
|
183
|
+
const { model: out } = await run(
|
|
184
|
+
{ _remove_social_link_indices: [1] },
|
|
185
|
+
model,
|
|
186
|
+
);
|
|
187
|
+
|
|
188
|
+
expect(socialIcons(out.pageFooterDesktop)).toEqual(['facebook', 'x']);
|
|
189
|
+
expect(socialIcons(out.pageFooterMobile)).toEqual(['facebook', 'x']);
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
it('inserts exactly one link on a shared array (symmetric add guard)', async () => {
|
|
193
|
+
const model = makeSharedSocialModel([link('facebook'), link('instagram')]);
|
|
194
|
+
|
|
195
|
+
const { model: out } = await run(
|
|
196
|
+
{
|
|
197
|
+
social_links: [{ insert_at: 1, social_link_icon: 'x', url: 'x.com' }],
|
|
198
|
+
},
|
|
199
|
+
model,
|
|
200
|
+
);
|
|
201
|
+
|
|
202
|
+
expect(socialIcons(out.pageFooterDesktop)).toEqual([
|
|
203
|
+
'facebook',
|
|
204
|
+
'x',
|
|
205
|
+
'instagram',
|
|
206
|
+
]);
|
|
207
|
+
expect(socialIcons(out.pageFooterMobile)).toEqual([
|
|
208
|
+
'facebook',
|
|
209
|
+
'x',
|
|
210
|
+
'instagram',
|
|
211
|
+
]);
|
|
212
|
+
});
|
|
213
|
+
});
|
|
@@ -17,6 +17,10 @@ import type { TextStyleOptions } from '../../brand-page/models/styles.model';
|
|
|
17
17
|
import { FOOTER_CHECKS } from './section-rules/footer.rules';
|
|
18
18
|
import { applyDetachedStyleOverride } from './section-field-utils';
|
|
19
19
|
|
|
20
|
+
type FooterSocialLink = NonNullable<
|
|
21
|
+
AbstractPageFooterStyles['socialLinks']
|
|
22
|
+
>[number];
|
|
23
|
+
|
|
20
24
|
const normaliseSocialUrl = (url: string): string => {
|
|
21
25
|
for (const prefix of ['mailto:', 'tel:']) {
|
|
22
26
|
if (url.startsWith(prefix)) return url.slice(prefix.length);
|
|
@@ -25,108 +29,127 @@ const normaliseSocialUrl = (url: string): string => {
|
|
|
25
29
|
return url;
|
|
26
30
|
};
|
|
27
31
|
|
|
28
|
-
const
|
|
29
|
-
|
|
32
|
+
const makeSocialLink = (
|
|
33
|
+
icon: string | undefined,
|
|
34
|
+
url: string | undefined,
|
|
35
|
+
): FooterSocialLink =>
|
|
36
|
+
({
|
|
37
|
+
imageUrl: icon || '',
|
|
38
|
+
url: normaliseSocialUrl(url || ''),
|
|
39
|
+
imageTitle: '',
|
|
40
|
+
width: 0,
|
|
41
|
+
height: 0,
|
|
42
|
+
imageLink: '',
|
|
43
|
+
}) as FooterSocialLink;
|
|
44
|
+
|
|
45
|
+
const hasSocialLinkMutation = (args: UpdateFooterArguments): boolean =>
|
|
46
|
+
args._replace_social_links === true ||
|
|
47
|
+
(args._remove_social_link_indices?.length ?? 0) > 0 ||
|
|
48
|
+
(args._reorder_social_links?.length ?? 0) > 0 ||
|
|
49
|
+
(args.social_links?.length ?? 0) > 0;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Social links are a GLOBAL footer concern — one logical list that both
|
|
53
|
+
* viewports render identically. Derive the new list ONCE from the current one
|
|
54
|
+
* WITHOUT mutating the input, so the caller can assign an independent copy to
|
|
55
|
+
* each viewport.
|
|
56
|
+
*
|
|
57
|
+
* Why this can't mutate per-viewport in place: footers migrated from the legacy
|
|
58
|
+
* single `footerStyles` model (migration-01) share ONE `socialLinks` array
|
|
59
|
+
* reference across pageFooterDesktop and pageFooterMobile, and `cloneDeep`
|
|
60
|
+
* preserves that shared reference. Running an in-place `splice` once per
|
|
61
|
+
* viewport therefore applies it TWICE to the same array — e.g. one requested
|
|
62
|
+
* removal index drops two links. Compute-once + assign-fresh is correct for
|
|
63
|
+
* both shared (legacy) and independent (new-model) footers.
|
|
64
|
+
*/
|
|
65
|
+
const computeSocialLinks = (
|
|
66
|
+
current: FooterSocialLink[] | undefined,
|
|
30
67
|
args: UpdateFooterArguments,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
footer.copyrightStyle = applyDetachedStyleOverride(
|
|
38
|
-
footer.copyrightStyle,
|
|
39
|
-
{ fontFamily: args.copyright_text_font_family },
|
|
40
|
-
textStyleOptions,
|
|
68
|
+
): FooterSocialLink[] => {
|
|
69
|
+
// _replace_social_links: replace entire list (empty/absent social_links = clear all).
|
|
70
|
+
// A replacement supersedes every other social link mutation.
|
|
71
|
+
if (args._replace_social_links) {
|
|
72
|
+
return (args.social_links ?? []).map((l) =>
|
|
73
|
+
makeSocialLink(l.social_link_icon, l.url),
|
|
41
74
|
);
|
|
75
|
+
}
|
|
42
76
|
|
|
43
|
-
const links =
|
|
77
|
+
const links: FooterSocialLink[] = [...(current ?? [])];
|
|
44
78
|
|
|
45
|
-
//
|
|
46
|
-
//
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
footer.socialLinks = (links ?? []).map((l) => ({
|
|
50
|
-
imageUrl: l.social_link_icon || '',
|
|
51
|
-
url: normaliseSocialUrl(l.url || ''),
|
|
52
|
-
imageTitle: '',
|
|
53
|
-
width: 0,
|
|
54
|
-
height: 0,
|
|
55
|
-
imageLink: '',
|
|
56
|
-
}));
|
|
57
|
-
} else {
|
|
58
|
-
// Targeted mutations — only run when NOT replacing the entire list.
|
|
59
|
-
|
|
60
|
-
// item_index-based updates for existing links
|
|
61
|
-
if (links?.length) {
|
|
62
|
-
for (const link of links) {
|
|
63
|
-
if (link.item_index === undefined) continue;
|
|
64
|
-
|
|
65
|
-
const existing = footer.socialLinks?.[link.item_index];
|
|
66
|
-
|
|
67
|
-
if (!existing) continue;
|
|
68
|
-
|
|
69
|
-
if (link.social_link_icon !== undefined)
|
|
70
|
-
existing.imageUrl = link.social_link_icon;
|
|
71
|
-
|
|
72
|
-
if (link.url !== undefined) existing.url = normaliseSocialUrl(link.url);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
79
|
+
// item_index-based updates for existing links — replace the item reference
|
|
80
|
+
// (never mutate the original object, which may be shared across viewports).
|
|
81
|
+
for (const link of args.social_links ?? []) {
|
|
82
|
+
if (link.item_index === undefined) continue;
|
|
75
83
|
|
|
76
|
-
|
|
77
|
-
if (args._remove_social_link_indices?.length && footer.socialLinks) {
|
|
78
|
-
const sorted = [...args._remove_social_link_indices].sort(
|
|
79
|
-
(a, b) => b - a,
|
|
80
|
-
);
|
|
84
|
+
const existing = links[link.item_index];
|
|
81
85
|
|
|
82
|
-
|
|
83
|
-
if (idx >= 0 && idx < footer.socialLinks.length)
|
|
84
|
-
footer.socialLinks.splice(idx, 1);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
86
|
+
if (!existing) continue;
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
88
|
+
links[link.item_index] = {
|
|
89
|
+
...existing,
|
|
90
|
+
...(link.social_link_icon !== undefined
|
|
91
|
+
? { imageUrl: link.social_link_icon }
|
|
92
|
+
: {}),
|
|
93
|
+
...(link.url !== undefined ? { url: normaliseSocialUrl(link.url) } : {}),
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
footer.socialLinks = footer.socialLinks ?? [];
|
|
104
|
-
footer.socialLinks.splice(pos, 0, {
|
|
105
|
-
imageUrl: link.social_link_icon || '',
|
|
106
|
-
url: normaliseSocialUrl(link.url || ''),
|
|
107
|
-
imageTitle: '',
|
|
108
|
-
width: 0,
|
|
109
|
-
height: 0,
|
|
110
|
-
imageLink: '',
|
|
111
|
-
});
|
|
97
|
+
// Remove by index (descending order to preserve indices during splice).
|
|
98
|
+
if (args._remove_social_link_indices?.length) {
|
|
99
|
+
const sorted = [...args._remove_social_link_indices].sort((a, b) => b - a);
|
|
100
|
+
|
|
101
|
+
for (const idx of sorted) {
|
|
102
|
+
if (idx >= 0 && idx < links.length) links.splice(idx, 1);
|
|
112
103
|
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Insert new links (descending insert_at order to preserve positions).
|
|
107
|
+
const insertLinks = (args.social_links ?? []).filter(
|
|
108
|
+
(l): l is FooterSocialLinkItem & { insert_at: number } =>
|
|
109
|
+
l.insert_at !== undefined && l.item_index === undefined,
|
|
110
|
+
);
|
|
111
|
+
const sortedInserts = [...insertLinks].sort(
|
|
112
|
+
(a, b) => b.insert_at - a.insert_at,
|
|
113
|
+
);
|
|
113
114
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
for (const link of sortedInserts) {
|
|
116
|
+
const pos = Math.max(0, Math.min(link.insert_at, links.length));
|
|
117
|
+
|
|
118
|
+
links.splice(pos, 0, makeSocialLink(link.social_link_icon, link.url));
|
|
119
|
+
}
|
|
118
120
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
const reordered = newOrder.map((idx) => footer.socialLinks![idx]);
|
|
121
|
+
// Reorder (requires ALL indices — partial reorder is not supported).
|
|
122
|
+
if (args._reorder_social_links?.length) {
|
|
123
|
+
const newOrder = args._reorder_social_links;
|
|
124
|
+
const unique = new Set(newOrder);
|
|
124
125
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
if (
|
|
127
|
+
unique.size === newOrder.length &&
|
|
128
|
+
newOrder.every((idx) => idx >= 0 && idx < links.length)
|
|
129
|
+
) {
|
|
130
|
+
const reordered = newOrder.map((idx) => links[idx]);
|
|
131
|
+
|
|
132
|
+
if (reordered.length === links.length) return reordered;
|
|
128
133
|
}
|
|
129
134
|
}
|
|
135
|
+
|
|
136
|
+
return links;
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
const applyGlobalFooterChanges = (
|
|
140
|
+
footer: AbstractPageFooterStyles,
|
|
141
|
+
args: UpdateFooterArguments,
|
|
142
|
+
textStyleOptions: TextStyleOptions | undefined,
|
|
143
|
+
): void => {
|
|
144
|
+
if (args.copyright_text !== undefined)
|
|
145
|
+
footer.copyrightText = args.copyright_text;
|
|
146
|
+
|
|
147
|
+
if (args.copyright_text_font_family !== undefined)
|
|
148
|
+
footer.copyrightStyle = applyDetachedStyleOverride(
|
|
149
|
+
footer.copyrightStyle,
|
|
150
|
+
{ fontFamily: args.copyright_text_font_family },
|
|
151
|
+
textStyleOptions,
|
|
152
|
+
);
|
|
130
153
|
};
|
|
131
154
|
|
|
132
155
|
const applyViewportFooterChanges = (
|
|
@@ -207,13 +230,30 @@ export class FooterBuilder extends BaseMetadataBuilder<UpdateFooterArguments> {
|
|
|
207
230
|
const args = this.request.payload ?? {};
|
|
208
231
|
const textStyleOptions = model.styles?.textStyles?.textStyleOptions;
|
|
209
232
|
|
|
210
|
-
// Global fields (
|
|
233
|
+
// Global scalar/style fields (copyright text + font) apply to both
|
|
234
|
+
// viewports. These are idempotent assignments, safe to run per-viewport.
|
|
211
235
|
if (model.pageFooterDesktop)
|
|
212
236
|
applyGlobalFooterChanges(model.pageFooterDesktop, args, textStyleOptions);
|
|
213
237
|
|
|
214
238
|
if (model.pageFooterMobile)
|
|
215
239
|
applyGlobalFooterChanges(model.pageFooterMobile, args, textStyleOptions);
|
|
216
240
|
|
|
241
|
+
// Social links are a single global list. Derive the new list ONCE, then
|
|
242
|
+
// assign an INDEPENDENT copy to each viewport — never mutate a (possibly
|
|
243
|
+
// shared) viewport array in place. See computeSocialLinks.
|
|
244
|
+
if (hasSocialLinkMutation(args)) {
|
|
245
|
+
const current =
|
|
246
|
+
model.pageFooterDesktop?.socialLinks ??
|
|
247
|
+
model.pageFooterMobile?.socialLinks;
|
|
248
|
+
const updated = computeSocialLinks(current, args);
|
|
249
|
+
|
|
250
|
+
if (model.pageFooterDesktop)
|
|
251
|
+
model.pageFooterDesktop.socialLinks = updated.map((l) => ({ ...l }));
|
|
252
|
+
|
|
253
|
+
if (model.pageFooterMobile)
|
|
254
|
+
model.pageFooterMobile.socialLinks = updated.map((l) => ({ ...l }));
|
|
255
|
+
}
|
|
256
|
+
|
|
217
257
|
// Viewport-specific styling via explicit sub-objects.
|
|
218
258
|
if (args.desktop && model.pageFooterDesktop)
|
|
219
259
|
applyViewportFooterChanges(model.pageFooterDesktop, args.desktop);
|
|
@@ -80,7 +80,7 @@ const mergeImageItems = (
|
|
|
80
80
|
...(existing || {}),
|
|
81
81
|
imageUrl: isValidUrl(item.image_url)
|
|
82
82
|
? item.image_url!
|
|
83
|
-
: existing?.imageUrl ?? '',
|
|
83
|
+
: (existing?.imageUrl ?? ''),
|
|
84
84
|
imageTitle: existing?.imageTitle ?? '',
|
|
85
85
|
width: existing?.width ?? 0,
|
|
86
86
|
height: existing?.height ?? 0,
|
|
@@ -128,7 +128,7 @@ const mergeTextItems = (
|
|
|
128
128
|
) as TextStyleDeclaration;
|
|
129
129
|
|
|
130
130
|
const resolved = item.text !== undefined ? resolveText(item.text) : null;
|
|
131
|
-
const text = resolved ? resolved.html : existing?.text ?? '';
|
|
131
|
+
const text = resolved ? resolved.html : (existing?.text ?? '');
|
|
132
132
|
|
|
133
133
|
return {
|
|
134
134
|
text,
|
|
@@ -68,8 +68,8 @@ export const applyColorThemeToReplacements = (
|
|
|
68
68
|
replacementColor:
|
|
69
69
|
replacements.length === 1
|
|
70
70
|
? colorTheme
|
|
71
|
-
: getNewColorBasedOnTargetColorTheme(
|
|
71
|
+
: (getNewColorBasedOnTargetColorTheme(
|
|
72
72
|
r.originalColor,
|
|
73
73
|
colorTheme,
|
|
74
|
-
)?.toString() ?? colorTheme,
|
|
74
|
+
)?.toString() ?? colorTheme),
|
|
75
75
|
}));
|
|
@@ -31,10 +31,10 @@ export interface AddressDetails {
|
|
|
31
31
|
export class GoogleMapsPlugin {
|
|
32
32
|
private initialised = false;
|
|
33
33
|
private initialising = false;
|
|
34
|
-
private readonly
|
|
34
|
+
private readonly options: GoogleMapsPluginOptions;
|
|
35
35
|
|
|
36
36
|
constructor(options: GoogleMapsPluginOptions) {
|
|
37
|
-
this.
|
|
37
|
+
this.options = options;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
private async initialise(): Promise<void> {
|
|
@@ -111,7 +111,7 @@ export class GoogleMapsPlugin {
|
|
|
111
111
|
const { PlaceAutocompleteElement } = await this.getPlacesLibrary();
|
|
112
112
|
|
|
113
113
|
return new PlaceAutocompleteElement({
|
|
114
|
-
requestedLanguage: this.
|
|
114
|
+
requestedLanguage: this.options.locale,
|
|
115
115
|
...options,
|
|
116
116
|
});
|
|
117
117
|
}
|
|
@@ -149,17 +149,17 @@ export class GoogleMapsPlugin {
|
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
private getGoogleScriptUrl(): string {
|
|
152
|
-
const baseUrl = `https://maps.googleapis.com/maps/api/js?key=${this.
|
|
152
|
+
const baseUrl = `https://maps.googleapis.com/maps/api/js?key=${this.options.apiKey}&libraries=places&loading=async`;
|
|
153
153
|
|
|
154
|
-
return this.
|
|
155
|
-
? `${baseUrl}&language=${this.
|
|
154
|
+
return this.options.locale
|
|
155
|
+
? `${baseUrl}&language=${this.options.locale}`
|
|
156
156
|
: baseUrl;
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
getEmbedGoogleMapsSrc(options: GetEmbedGoogleMapsOptions): string {
|
|
160
160
|
const mapMode = options.mapMode || MAP_MODE_PLACE;
|
|
161
|
-
const locale = options.locale || this.
|
|
162
|
-
const baseUrl = `https://www.google.com/maps/embed/v1/${mapMode}?key=${this.
|
|
161
|
+
const locale = options.locale || this.options.locale;
|
|
162
|
+
const baseUrl = `https://www.google.com/maps/embed/v1/${mapMode}?key=${this.options.apiKey}&q=${options.query}`;
|
|
163
163
|
|
|
164
164
|
return locale ? `${baseUrl}&language=${locale}` : baseUrl;
|
|
165
165
|
}
|
|
@@ -174,7 +174,7 @@ const isPersonalisationEnabled = computed(
|
|
|
174
174
|
);
|
|
175
175
|
const isDesignCom = computed(() => containerStore.isDesignCom);
|
|
176
176
|
|
|
177
|
-
|
|
177
|
+
defineEmits(['on-intent-image-replace']);
|
|
178
178
|
|
|
179
179
|
const shapeTabs = [
|
|
180
180
|
backgroundSettingsTr(`background`),
|
package/src/shared/background-settings/components/background-color/BackgroundColorSettings.vue
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
</div>
|
|
23
23
|
</template>
|
|
24
24
|
<script setup lang="ts">
|
|
25
|
-
import { computed
|
|
25
|
+
import { computed } from 'vue';
|
|
26
26
|
import { HelloBar } from '@designcrowd/fe-shared-lib';
|
|
27
27
|
import { useUiBackgroundSettingsStore } from '../../store';
|
|
28
28
|
import ColorField from '../../../content-settings/components/color-field/ColorField.vue';
|
|
@@ -3,15 +3,9 @@ import { Icon } from '@designcrowd/fe-shared-lib';
|
|
|
3
3
|
import ColorPickerSwatch from './ColorPickerSwatch.vue';
|
|
4
4
|
import type { ColorValue, ColorGroupItem, ColorGroup } from '../models';
|
|
5
5
|
import { DEFAULT_COLORS, DEFAULT_GRADIENT_COLORS } from '../constants';
|
|
6
|
-
import {
|
|
7
|
-
RGBAtoHex,
|
|
8
|
-
hexToRGB,
|
|
9
|
-
arrayToLinearGradient,
|
|
10
|
-
isRgbColor,
|
|
11
|
-
} from '@utils/helpers';
|
|
6
|
+
import { RGBAtoHex, arrayToLinearGradient, isRgbColor } from '@utils/helpers';
|
|
12
7
|
import { normalizeColorToHex, colorsMatch } from '@brand-page/utils/style.util';
|
|
13
8
|
import { colorPickerTr } from '@src/composables/useTranslate';
|
|
14
|
-
import { useUiStyleSettingsStore } from '../../style-settings/store';
|
|
15
9
|
|
|
16
10
|
// Simple session storage for newColors (persists during browser session, clears on refresh)
|
|
17
11
|
let sessionNewColors: ColorGroupItem[] = [];
|
|
@@ -53,6 +47,7 @@ export default defineComponent({
|
|
|
53
47
|
default: () => false,
|
|
54
48
|
},
|
|
55
49
|
},
|
|
50
|
+
emits: ['on-color-select'],
|
|
56
51
|
data() {
|
|
57
52
|
const groups: ColorGroup[] = [];
|
|
58
53
|
const newColors: ColorGroupItem[] = [];
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
</template>
|
|
34
34
|
<script setup lang="ts">
|
|
35
35
|
import { Button } from '@designcrowd/fe-shared-lib';
|
|
36
|
-
import {
|
|
36
|
+
import { commonTr } from '@src/composables/useTranslate';
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
defineProps({
|
|
39
39
|
showBackButton: {
|
|
40
40
|
type: Boolean,
|
|
41
41
|
required: false,
|
|
@@ -70,14 +70,7 @@
|
|
|
70
70
|
</template>
|
|
71
71
|
|
|
72
72
|
<script setup lang="ts">
|
|
73
|
-
import {
|
|
74
|
-
ref,
|
|
75
|
-
computed,
|
|
76
|
-
watch,
|
|
77
|
-
onMounted,
|
|
78
|
-
onBeforeMount,
|
|
79
|
-
type PropType,
|
|
80
|
-
} from 'vue';
|
|
73
|
+
import { ref, computed, watch, onMounted, onBeforeMount } from 'vue';
|
|
81
74
|
import { Toggle } from '@designcrowd/fe-shared-lib';
|
|
82
75
|
import {
|
|
83
76
|
addTransparentAlphaChannelToHex,
|
|
@@ -320,8 +313,8 @@ onBeforeMount(() => {
|
|
|
320
313
|
onMounted(() => {
|
|
321
314
|
const toggleState = Boolean(
|
|
322
315
|
color.value &&
|
|
323
|
-
|
|
324
|
-
|
|
316
|
+
typeof color.value === 'string' &&
|
|
317
|
+
!isHexTransparent(color.value),
|
|
325
318
|
);
|
|
326
319
|
|
|
327
320
|
emit('on-toggle-state-change', toggleState);
|
|
@@ -17,7 +17,6 @@ import {
|
|
|
17
17
|
import { SIDE_BAR_CONTENT_ID } from '../../constants';
|
|
18
18
|
import type { ComponentPublicInstance } from '@vue/runtime-core';
|
|
19
19
|
import {
|
|
20
|
-
EVENTS,
|
|
21
20
|
SELECT_LOCATIONS,
|
|
22
21
|
useEventTracker,
|
|
23
22
|
} from '@brand-page-maker/composables/useEventTracker';
|
|
@@ -37,6 +36,7 @@ interface CategoryTab {
|
|
|
37
36
|
}
|
|
38
37
|
|
|
39
38
|
export default defineComponent({
|
|
39
|
+
emits: ['capture-preview-snapshot'],
|
|
40
40
|
setup() {
|
|
41
41
|
const brandPageMakerStore = useBrandPageMakerStore();
|
|
42
42
|
const contentSettingsStore = useUiContentSettingsStore();
|
package/src/shared/content-settings/components/content-settings/i18n/content-settings.de-DE.json
CHANGED
|
@@ -113,6 +113,8 @@
|
|
|
113
113
|
"iconFillColorTitle": "Farbe der Symbolfüllung",
|
|
114
114
|
"iconBackgroundColorTitle": "Symbolhintergrundfarbe",
|
|
115
115
|
"paddingTitle": "Polsterung",
|
|
116
|
+
"topPaddingTitle": "Polsterung oben",
|
|
117
|
+
"bottomPaddingTitle": "Polsterung unten",
|
|
116
118
|
"dividerStyleTitle": "Trennlinienstil",
|
|
117
119
|
"dividerColorTitle": "Trennlinienfarbe",
|
|
118
120
|
"addItemTitle": "Artikel hinzufügen",
|