@designcrowd/library.brand-page 6.0.3 → 6.0.4
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-BctSP4tp.js → CreatedOnBrandCrowd-de-de-Ruu5Az32.js} +3 -3
- package/lib/src/{CreatedOnBrandCrowd-en-us-BeNytcxt.js → CreatedOnBrandCrowd-en-us-DGUJtvld.js} +3 -3
- package/lib/src/{CreatedOnBrandCrowd-es-es-hY12f5TN.js → CreatedOnBrandCrowd-es-es-Dg-1uOfV.js} +3 -3
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-C4SCU39P.js → CreatedOnBrandCrowd-fr-ca-CRKraZl8.js} +3 -3
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-C4SCU39P.js → CreatedOnBrandCrowd-fr-fr-CRKraZl8.js} +3 -3
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-C5J5kWiD.js → CreatedOnBrandCrowd-pt-br-bZ9VlEAu.js} +3 -3
- package/lib/src/{CreatedOnBrandCrowd-pt-br-C5J5kWiD.js → CreatedOnBrandCrowd-pt-pt-bZ9VlEAu.js} +3 -3
- package/lib/src/{CreatedOnDcom-de-de-DXCeZZLg.js → CreatedOnDcom-de-de-CJYfwZx8.js} +3 -3
- package/lib/src/{CreatedOnDcom-en-us-GeBTaofv.js → CreatedOnDcom-en-us-rzA1lVxH.js} +3 -3
- package/lib/src/{CreatedOnDcom-es-es-BiPmv1q-.js → CreatedOnDcom-es-es-CNwGPjik.js} +3 -3
- package/lib/src/{CreatedOnDcom-fr-ca-Cns_iX4-.js → CreatedOnDcom-fr-ca-DKw7OGIz.js} +3 -3
- package/lib/src/{CreatedOnDcom-fr-fr-CC-f_hUR.js → CreatedOnDcom-fr-fr-WzOEaAZG.js} +3 -3
- package/lib/src/{CreatedOnDcom-pt-br-DnhSuPKo.js → CreatedOnDcom-pt-br-DkualVhm.js} +3 -3
- package/lib/src/{CreatedOnDcom-pt-pt-BCgbUsqY.js → CreatedOnDcom-pt-pt-w4Nnsdzq.js} +3 -3
- package/lib/src/brand-page/clients/brand-page.client.d.ts +9 -9
- package/lib/src/brand-page/components/image-gallery/masonry/MasonryGallery.mixin.d.ts +2 -1
- package/lib/src/brand-page/components/navigation/hamburger/HamburgerNavigation.mixin.d.ts +2 -4
- package/lib/src/brand-page/components/navigation/hamburger/HamburgerNavigation.mixin.js +0 -1
- package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.d.ts +2 -4
- package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.js +4 -5
- 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/constants/sections/footer-display.constants.js +1 -1
- package/lib/src/brand-page/models/index.d.ts +13 -2
- package/lib/src/brand-page/models/index.js +0 -3
- package/lib/src/brand-page/models/payment.model.d.ts +1 -1
- package/lib/src/brand-page/utils/personalisation.util.js +14 -72
- package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +19 -21
- package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.js +0 -1
- package/lib/src/brand-page-maker/components/admin-background-settings/AdminBackgroundSettings.mixin.d.ts +10 -16
- package/lib/src/brand-page-maker/components/admin-background-settings/ShapePositionSlider.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/admin-logo-settings/AdminLogoSettings.mixin.d.ts +3 -3
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +170 -181
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +0 -3
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.js +0 -1
- 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 +7 -0
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +149 -148
- 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 +2 -4
- package/lib/src/brand-page-maker/components/color-picker/components/ColorModeSelect.mixin.js +0 -1
- package/lib/src/brand-page-maker/components/color-picker/components/GradientColorSlider.mixin.d.ts +2 -4
- package/lib/src/brand-page-maker/components/color-picker/components/GradientColorSlider.mixin.js +0 -1
- package/lib/src/brand-page-maker/components/color-picker/components/GradientColorSliderHandler.mixin.d.ts +2 -5
- package/lib/src/brand-page-maker/components/color-picker/components/GradientColorSliderHandler.mixin.js +0 -1
- package/lib/src/brand-page-maker/components/color-picker/components/GradientTypeSelector.mixin.d.ts +2 -4
- package/lib/src/brand-page-maker/components/color-picker/components/GradientTypeSelector.mixin.js +0 -1
- package/lib/src/brand-page-maker/components/device/Device.mixin.d.ts +2 -4
- package/lib/src/brand-page-maker/components/device/Device.mixin.js +0 -1
- package/lib/src/brand-page-maker/components/navigation/Navigation.mixin.d.ts +2 -4
- package/lib/src/brand-page-maker/components/navigation/Navigation.mixin.js +0 -1
- 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 +25 -27
- package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.js +0 -1
- 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 +12 -17
- 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 +32 -30
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.js +5 -16
- 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 +6 -3
- 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 +3 -3
- 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/navigation-style-configs.js +1 -1
- package/lib/src/brand-page-maker/routing/brand-page-maker-router.d.ts +2 -1
- package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +378 -366
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +4 -5
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.js +5 -8
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.d.ts +1 -3
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +3 -7
- 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 +0 -6
- package/lib/src/brand-page-maker/stores/ui/ui-store.js +0 -8
- 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/clients/ai-assistant-client.d.ts +0 -7
- package/lib/src/clients/brand-page-client.d.ts +15 -16
- package/lib/src/clients/design-template-client.d.ts +0 -3
- package/lib/src/clients/media-client.d.ts +2 -2
- package/lib/src/clients/models.d.ts +0 -2
- package/lib/src/composables/useSnapshot.js +18 -18
- package/lib/src/css/library.brand-page-brandCrowd.min.css +324 -342
- package/lib/src/css/library.brand-page-brandPage.min.css +324 -620
- package/lib/src/css/library.brand-page-designCom.min.css +324 -342
- package/lib/src/css/library.brand-page-preview.min.css +324 -598
- package/lib/src/index.d.ts +1 -5
- package/lib/src/index.mjs +106 -110
- package/lib/src/{lib-Cw6L6CfQ.js → lib-Dy7MYyqz.js} +33240 -36457
- package/lib/src/lib.js +1 -11
- package/lib/src/metadata-builder/builders/footer-builder.js +62 -105
- package/lib/src/metadata-builder/builders/item-id-utils.d.ts +54 -0
- package/lib/src/metadata-builder/builders/item-id-utils.js +96 -0
- package/lib/src/metadata-builder/builders/section-builders/image-gallery-builder.js +57 -68
- package/lib/src/metadata-builder/builders/section-builders/images-section-builder.js +58 -93
- package/lib/src/metadata-builder/builders/section-builders/shapes-section-builder.js +66 -99
- package/lib/src/metadata-builder/builders/section-builders/social-links-builder.js +57 -17
- package/lib/src/metadata-builder/builders/section-builders/testimonial-section-builder.js +51 -85
- package/lib/src/metadata-builder/builders/section-builders/text-section-builder.js +49 -74
- package/lib/src/metadata-builder/builders/section-field-utils.d.ts +0 -7
- package/lib/src/metadata-builder/builders/section-field-utils.js +1 -1
- package/lib/src/metadata-builder/builders/shape-color-utils.js +1 -1
- package/lib/src/metadata-builder/parsers/ai-toolcall-parser.d.ts +16 -7
- package/lib/src/metadata-builder/parsers/section-tool-arguments.d.ts +66 -48
- 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 +2 -4
- package/lib/src/shared/color-picker/components/ColorPicker.mixin.js +2 -2
- package/lib/src/shared/color-picker/components/ColorPickerSwatch.mixin.d.ts +2 -4
- package/lib/src/shared/color-picker/components/ColorPickerSwatch.mixin.js +0 -1
- package/lib/src/shared/confirm-modal/ConfirmModal.mixin.d.ts +2 -5
- package/lib/src/shared/confirm-modal/ConfirmModal.mixin.js +0 -1
- package/lib/src/shared/content-settings/components/GenericTextInput.mixin.d.ts +1 -0
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +129 -131
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.js +1 -2
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +110 -111
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +81 -84
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.js +0 -5
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +109 -117
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.js +14 -1
- package/lib/src/shared/content-settings/components/email-field/EmailField.mixin.d.ts +1 -0
- package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +70 -72
- package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.js +3 -4
- 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 +1 -3
- package/lib/src/shared/content-settings/components/icon-library/IconLibrary.mixin.js +0 -1
- 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 +3 -4
- 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 +6 -5
- package/lib/src/shared/content-settings/components/shape-field/ShapeField.mixin.d.ts +1 -0
- package/lib/src/shared/content-settings/components/slider-field/SliderField.mixin.d.ts +2 -2
- package/lib/src/shared/content-settings/components/tel-field/TelField.mixin.d.ts +1 -0
- package/lib/src/shared/content-settings/components/testimonial-items-field/TestimonialItemsField.mixin.d.ts +2 -1
- package/lib/src/shared/content-settings/components/text-field/TextField.mixin.d.ts +1 -0
- package/lib/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.d.ts +2 -1
- 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 +1 -0
- 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 +1 -0
- package/lib/src/shared/content-settings/components/youtube-video-field/YoutubeVideoField.mixin.d.ts +1 -0
- package/lib/src/shared/content-settings/store/content-settings-store.d.ts +39 -39
- package/lib/src/shared/content-settings/utils.js +1 -0
- package/lib/src/shared/font-family-selector/FontFamilySelector.mixin.d.ts +4 -6
- package/lib/src/shared/font-family-selector/FontFamilySelector.mixin.js +0 -1
- package/lib/src/shared/image-gallery-style-settings/ImageGalleryStyleSettings.mixin.d.ts +2 -4
- package/lib/src/shared/image-gallery-style-settings/ImageGalleryStyleSettings.mixin.js +0 -1
- package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.d.ts +21 -29
- package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.js +1 -1
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +51 -50
- package/lib/src/shared/logo-settings/components/LogoSettingsHeader.mixin.d.ts +4 -6
- package/lib/src/shared/logo-settings/components/LogoSettingsHeader.mixin.js +0 -1
- 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 +5 -13
- package/lib/src/shared/logo-versions/LogoVersions.mixin.js +0 -1
- package/lib/src/shared/models.d.ts +0 -2
- package/lib/src/shared/my-designs/MyDesigns.mixin.d.ts +6 -14
- package/lib/src/shared/my-designs/MyDesigns.mixin.js +0 -1
- package/lib/src/shared/my-uploads/MyMedia.mixin.d.ts +5 -14
- package/lib/src/shared/my-uploads/MyMedia.mixin.js +0 -1
- package/lib/src/shared/my-uploads/MyUploads.mixin.d.ts +5 -14
- package/lib/src/shared/my-uploads/MyUploads.mixin.js +0 -1
- package/lib/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.d.ts +3 -5
- package/lib/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.js +0 -1
- 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 +28 -27
- package/lib/src/shared/page-settings/components/new-page-modal/NewPageModal.mixin.js +2 -0
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +179 -188
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +177 -181
- 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 +1 -0
- 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 +60 -66
- 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 +450 -20
- package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.js +2 -2
- package/lib/src/shared/template-settings/models.d.ts +0 -1
- package/lib/src/shared/template-settings/store/template-settings-store.d.ts +0 -4
- package/lib/src/shared/template-settings/store/template-settings-store.js +11 -79
- package/lib/src/shared/unsplash-library/UnsplashLibrary.mixin.d.ts +4 -9
- package/lib/src/utils/build-asset-manifest.d.ts +0 -4
- package/lib/src/utils/build-asset-manifest.js +0 -8
- package/lib/src/utils/minify-brand-page-metadata.d.ts +2 -0
- package/lib/src/utils/minify-brand-page-metadata.js +17 -2
- package/package.json +56 -60
- package/src/brand-page/components/about-section/AboutSection.vue.test.ts +5 -7
- package/src/brand-page/components/brand-page-footer/BrandPageFooter.vue +1 -1
- 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/masonry/MasonryGallery.mixin.ts +2 -1
- package/src/brand-page/components/images-section/ImagesSection.vue +1 -0
- package/src/brand-page/components/logo/LogoRender.vue +188 -188
- package/src/brand-page/components/navigation/hamburger/HamburgerNavigation.mixin.ts +0 -1
- package/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.ts +6 -15
- package/src/brand-page/components/page-footer/PageFooter.vue +0 -1
- package/src/brand-page/components/page-header/HeaderLayout.vue +6 -12
- package/src/brand-page/components/page-header/PageHeader.vue +0 -1
- package/src/brand-page/components/shapes-section/ShapesSection.vue +1 -1
- package/src/brand-page/components/shop/CartModal.vue +3 -1
- package/src/brand-page/components/shop/FeaturedDisplay.vue +2 -2
- package/src/brand-page/components/shop/PaymentModal.vue +5 -1
- package/src/brand-page/components/shop/ProductDetailModal.vue +1 -1
- package/src/brand-page/components/shop/Shop.vue +1 -1
- 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/testimonial-section/TestimonialSection.vue +3 -3
- package/src/brand-page/components/text-wrapper/TextWrapper.vue +1 -3
- package/src/brand-page/constants/sections/footer-display.constants.ts +1 -1
- package/src/brand-page/models/index.ts +12 -4
- package/src/brand-page/models/payment.model.ts +1 -2
- package/src/brand-page/models/shop.model.ts +2 -0
- package/src/brand-page/models/user-personalisation.model.ts +2 -1
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +0 -3
- package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +0 -1
- package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +0 -2
- package/src/brand-page/utils/migration/migration-01_1.ts +1 -1
- package/src/brand-page/utils/migration/migration-02.ts +1 -0
- package/src/brand-page/utils/migration/migration-03.ts +1 -0
- package/src/brand-page/utils/migration/migration-04.ts +1 -0
- package/src/brand-page/utils/migration/migration-05.ts +5 -1
- 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/personalisation.util.test.ts +0 -35
- package/src/brand-page/utils/personalisation.util.ts +23 -119
- package/src/brand-page/view-models.ts +56 -38
- 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 +0 -1
- package/src/brand-page-maker/components/ai-text-edit/TextBubble.vue +0 -1
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +1 -5
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.ts +0 -1
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.stories.ts +5 -2
- package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.ts +5 -0
- package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-payment.ts +8 -0
- package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-site-template.examples.ts +2 -0
- package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.vue +0 -1
- package/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.ts +1 -1
- package/src/brand-page-maker/components/color-palette/BpColorPalette.vue +2 -1
- package/src/brand-page-maker/components/color-picker/components/ColorModeSelect.mixin.ts +0 -1
- package/src/brand-page-maker/components/color-picker/components/GradientColorSlider.mixin.ts +0 -1
- package/src/brand-page-maker/components/color-picker/components/GradientColorSliderHandler.mixin.ts +0 -1
- package/src/brand-page-maker/components/color-picker/components/GradientTypeSelector.mixin.ts +0 -1
- package/src/brand-page-maker/components/device/Device.mixin.ts +0 -1
- package/src/brand-page-maker/components/navigation/Navigation.mixin.ts +0 -1
- package/src/brand-page-maker/components/rich-text-editor/RichTextEditor.vue +1 -3
- package/src/brand-page-maker/components/sensitive-content/SensitiveContent.vue +4 -1
- package/src/brand-page-maker/components/seo-settings/DeleteDomainModal.vue +1 -1
- package/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.ts +0 -1
- package/src/brand-page-maker/components/seo-settings/SeoPageSettings.vue +1 -1
- package/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.ts +1 -0
- package/src/brand-page-maker/components/seo-settings/UrlSettings.vue +1 -0
- package/src/brand-page-maker/components/seo-settings/UseExistingDomainModal.vue +5 -1
- 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 +8 -22
- package/src/brand-page-maker/components/template-preview/TemplatePreview.vue +10 -5
- package/src/brand-page-maker/components/video-play/VideoPlayButton.vue +1 -1
- package/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.ts +7 -3
- package/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.ts +6 -6
- package/src/brand-page-maker/constants/config-settings-constant.ts +5 -5
- package/src/brand-page-maker/convertors/text-image-display-style.convertor.ts +1 -1
- package/src/brand-page-maker/models/button-styles-config.ts +2 -4
- package/src/brand-page-maker/models/content-settings-configs.ts +2 -4
- package/src/brand-page-maker/models/navigation-style-configs.ts +6 -5
- package/src/brand-page-maker/stores/admin-logo-settings/admin-logo-settings-store.ts +1 -0
- package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.ts +5 -8
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.test.ts +3 -1
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +4 -12
- package/src/brand-page-maker/stores/ui/ui-store.ts +0 -16
- 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/clients/ai-assistant-client.ts +0 -7
- package/src/clients/design-template-client.ts +0 -3
- package/src/clients/models.ts +0 -2
- package/src/composables/useSnapshot.ts +22 -19
- package/src/lib.ts +0 -13
- package/src/metadata-builder/builders/footer-builder.test.ts +229 -130
- package/src/metadata-builder/builders/footer-builder.ts +90 -155
- package/src/metadata-builder/builders/item-id-utils.test.ts +184 -0
- package/src/metadata-builder/builders/item-id-utils.ts +117 -0
- package/src/metadata-builder/builders/section-builders/image-gallery-builder.ts +62 -88
- package/src/metadata-builder/builders/section-builders/images-section-builder.ts +66 -129
- package/src/metadata-builder/builders/section-builders/shapes-section-builder.ts +105 -160
- package/src/metadata-builder/builders/section-builders/social-links-builder.ts +65 -20
- package/src/metadata-builder/builders/section-builders/testimonial-section-builder.ts +83 -146
- package/src/metadata-builder/builders/section-builders/text-section-builder.ts +70 -122
- package/src/metadata-builder/builders/section-field-utils.ts +1 -1
- package/src/metadata-builder/builders/shape-color-utils.ts +2 -2
- package/src/metadata-builder/parsers/ai-toolcall-parser.ts +16 -7
- package/src/metadata-builder/parsers/section-tool-arguments.ts +66 -48
- 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 +7 -2
- package/src/shared/color-picker/components/ColorPickerSwatch.mixin.ts +0 -1
- package/src/shared/common/NumberInput.vue +0 -1
- package/src/shared/common/SideBarSettingsHeader.vue +2 -2
- package/src/shared/confirm-modal/ConfirmModal.mixin.ts +0 -1
- package/src/shared/content-settings/components/booking-url-field/BookingUrlField.vue +0 -1
- package/src/shared/content-settings/components/button-configuration-field/ButtonConfigurationField.vue +0 -1
- package/src/shared/content-settings/components/color-field/ColorField.vue +10 -3
- package/src/shared/content-settings/components/content-settings/ContentSettings.mixin.ts +1 -1
- package/src/shared/content-settings/components/content-settings/ContentSettingsLockedButton.vue +0 -1
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.ts +0 -5
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.ts +14 -1
- package/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.ts +6 -4
- package/src/shared/content-settings/components/icon-library/IconLibrary.mixin.ts +0 -1
- 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/text-image-field/TextImageField.vue +8 -2
- package/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.ts +1 -1
- package/src/shared/content-settings/models.ts +2 -3
- package/src/shared/content-settings/utils.ts +1 -0
- package/src/shared/dropzone-image-uploader/components/DropzoneImageUploader.vue +0 -1
- package/src/shared/ecommerce-settings/store/cart-store.test.ts +1 -1
- package/src/shared/font-family-selector/FontFamilySelector.mixin.ts +0 -1
- package/src/shared/image-gallery-style-settings/ImageGalleryStyleSettings.mixin.ts +0 -1
- package/src/shared/logo-settings/components/EditLogoSettings.mixin.ts +1 -1
- package/src/shared/logo-settings/components/LogoSettings.mixin.ts +1 -0
- package/src/shared/logo-settings/components/LogoSettingsHeader.mixin.ts +0 -1
- 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 +0 -1
- package/src/shared/models.ts +0 -6
- package/src/shared/my-designs/MyDesigns.mixin.ts +0 -1
- package/src/shared/my-uploads/MyMedia.mixin.ts +0 -1
- package/src/shared/my-uploads/MyMediaSelectionItem.vue +1 -2
- package/src/shared/my-uploads/MyUploads.mixin.ts +0 -1
- package/src/shared/my-uploads/models.ts +2 -1
- package/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.ts +0 -1
- 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 +3 -0
- package/src/shared/page-settings/components/page-settings/NestedDraggable.vue +1 -1
- package/src/shared/page-settings/components/page-settings/PageSettings.vue +2 -1
- 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 +8 -4
- package/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.ts +1 -0
- 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 +0 -1
- package/src/shared/template-settings/store/template-settings-store.ts +18 -105
- package/src/shared/unsplash-library/UnsplashLibrary.vue +6 -2
- package/src/shared/video-library/VideoLibrary.vue +1 -1
- package/src/utils/build-asset-manifest.ts +0 -12
- package/src/utils/minify-brand-page-metadata.ts +27 -7
- package/lib/src/brand-page/components/banner-section/BannerSection.mixin.d.ts +0 -103
- package/lib/src/brand-page/components/banner-section/BannerSection.mixin.js +0 -178
- package/src/brand-page/components/banner-section/BannerSection.mixin.ts +0 -210
- package/src/brand-page-maker/components/template-preview/TemplatePreviewAiBadge.vue +0 -12
|
@@ -234,6 +234,13 @@ export interface ImageContent extends Content {
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
export interface ImageItem {
|
|
237
|
+
/**
|
|
238
|
+
* Stable per-item identifier. Mirrors the section-level `Content.id` one
|
|
239
|
+
* level deeper so AI tool calls can reference items by id rather than by
|
|
240
|
+
* positional index. Optional for backward compatibility with persisted data
|
|
241
|
+
* that predates item ids — backfilled on load (see ensureItemIds).
|
|
242
|
+
*/
|
|
243
|
+
id?: string;
|
|
237
244
|
imageUrl: string;
|
|
238
245
|
imageTitle: string;
|
|
239
246
|
width: number;
|
|
@@ -466,6 +473,8 @@ export interface ShapeItem extends ImageItem {
|
|
|
466
473
|
}
|
|
467
474
|
|
|
468
475
|
export interface TestimonialItems {
|
|
476
|
+
/** Stable per-item identifier. See ImageItem.id. */
|
|
477
|
+
id?: string;
|
|
469
478
|
imageUrl: string;
|
|
470
479
|
name: string;
|
|
471
480
|
position: string;
|
|
@@ -483,6 +492,8 @@ export interface TestimonialItems {
|
|
|
483
492
|
}
|
|
484
493
|
|
|
485
494
|
export interface TextItem {
|
|
495
|
+
/** Stable per-item identifier. See ImageItem.id. */
|
|
496
|
+
id?: string;
|
|
486
497
|
text: string;
|
|
487
498
|
textStyle: TextStyleDeclaration;
|
|
488
499
|
|
|
@@ -552,6 +563,7 @@ export interface AboutSectionContent extends Content {
|
|
|
552
563
|
}
|
|
553
564
|
|
|
554
565
|
export interface LinksItem {
|
|
566
|
+
id?: string;
|
|
555
567
|
imageUrl: string;
|
|
556
568
|
url: string;
|
|
557
569
|
size?: string;
|
|
@@ -929,10 +941,6 @@ export class BrandPageModel {
|
|
|
929
941
|
// Model version
|
|
930
942
|
v: number;
|
|
931
943
|
|
|
932
|
-
// AI personalisation key persisted with the draft so previews survive login/checkout-back/
|
|
933
|
-
// refresh - content is retrieved by this token (user-agnostic), not regenerated (bp-5742).
|
|
934
|
-
userPromptContentKey?: string;
|
|
935
|
-
|
|
936
944
|
styles: PageStyles;
|
|
937
945
|
|
|
938
946
|
/** @deprecated */
|
|
@@ -44,8 +44,7 @@ export const isStripePaymentIntent = (
|
|
|
44
44
|
);
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
export interface CreateCartResult<T = unknown> {
|
|
47
|
+
export interface CreateCartResult<T> {
|
|
49
48
|
cartId: string;
|
|
50
49
|
paymentProviderName: string;
|
|
51
50
|
paymentProviderExternalId: string;
|
|
@@ -84,7 +84,8 @@ export type ContentPersonalisationMapping<T extends Content> = {
|
|
|
84
84
|
| keyof UserPersonalisationSection
|
|
85
85
|
| keyof UserPersonalisationItem]?: (keyof T)[];
|
|
86
86
|
};
|
|
87
|
-
export interface UserPersonalisationSectionWithIndices
|
|
87
|
+
export interface UserPersonalisationSectionWithIndices
|
|
88
|
+
extends UserPersonalisationSection {
|
|
88
89
|
imageIndex: number;
|
|
89
90
|
shapeIndex: number;
|
|
90
91
|
itemTitleIndex: number;
|
|
@@ -456,7 +456,6 @@ exports[`migration.util > Banner Contents - text Align and Font Family should no
|
|
|
456
456
|
},
|
|
457
457
|
},
|
|
458
458
|
},
|
|
459
|
-
"userPromptContentKey": undefined,
|
|
460
459
|
"v": 17,
|
|
461
460
|
},
|
|
462
461
|
"useOldLogoRenderSize": true,
|
|
@@ -902,7 +901,6 @@ exports[`migration.util > migrateBrandPageModel should return brand page model w
|
|
|
902
901
|
},
|
|
903
902
|
},
|
|
904
903
|
},
|
|
905
|
-
"userPromptContentKey": undefined,
|
|
906
904
|
"v": 17,
|
|
907
905
|
},
|
|
908
906
|
"useOldLogoRenderSize": true,
|
|
@@ -1355,7 +1353,6 @@ exports[`migration.util > migrateBrandPageModel should return brand page model w
|
|
|
1355
1353
|
},
|
|
1356
1354
|
},
|
|
1357
1355
|
},
|
|
1358
|
-
"userPromptContentKey": undefined,
|
|
1359
1356
|
"v": 17,
|
|
1360
1357
|
},
|
|
1361
1358
|
"useOldLogoRenderSize": true,
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
type BrandPageModel,
|
|
3
|
+
type TextContent,
|
|
4
|
+
type LogoImageModel,
|
|
5
|
+
} from '../..';
|
|
2
6
|
import type { MigrationData } from '../migration.util';
|
|
3
7
|
import { isTextContent } from '../model.util';
|
|
4
8
|
|
|
@@ -701,41 +701,6 @@ describe('personalisation.util', async () => {
|
|
|
701
701
|
).toBe(title);
|
|
702
702
|
});
|
|
703
703
|
|
|
704
|
-
test('applyUserPersonalisationToBrandPageModelAsync should fall back to a populated section when the block section was not generated', async () => {
|
|
705
|
-
// Arrange - simulate userPrompt AI content that only generated the core sections
|
|
706
|
-
// (profile/about/information/media); email/website/phone are never generated.
|
|
707
|
-
const personalisation = {
|
|
708
|
-
...PERSONALISATION,
|
|
709
|
-
websiteSection: undefined,
|
|
710
|
-
emailSection: undefined,
|
|
711
|
-
phoneSection: undefined,
|
|
712
|
-
} as unknown as typeof PERSONALISATION;
|
|
713
|
-
|
|
714
|
-
// A block whose role points at the ungenerated website section - without the fallback
|
|
715
|
-
// this renders the designer's placeholder instead of personalised content.
|
|
716
|
-
const model = new BrandPageModel({
|
|
717
|
-
brandPageType: BRAND_PAGE_TYPES.brandSite,
|
|
718
|
-
styles: {
|
|
719
|
-
backgroundStyles: {
|
|
720
|
-
backgroundImageUrl: faker.internet.url(),
|
|
721
|
-
personalisationRole: 'website',
|
|
722
|
-
},
|
|
723
|
-
},
|
|
724
|
-
});
|
|
725
|
-
|
|
726
|
-
// Act
|
|
727
|
-
const result = await applyUserPersonalisationToBrandPageModelAsync(
|
|
728
|
-
personalisation,
|
|
729
|
-
model,
|
|
730
|
-
);
|
|
731
|
-
|
|
732
|
-
// Assert - it borrowed the first populated fallback section (profile).
|
|
733
|
-
expect(result.isModified).toBe(true);
|
|
734
|
-
expect(result.model.styles.backgroundStyles.backgroundImageUrl).toBe(
|
|
735
|
-
PERSONALISATION.profileSection.imageUrls?.[0].imageUrl,
|
|
736
|
-
);
|
|
737
|
-
});
|
|
738
|
-
|
|
739
704
|
test('applyUserPersonalisationToBrandPageModelAsync should return modified text items when input has text with multiple items', async () => {
|
|
740
705
|
// Arrange
|
|
741
706
|
const textContent = {
|
|
@@ -326,84 +326,6 @@ const getPersonalisationValueAsync = async (
|
|
|
326
326
|
return { value: propertyValue, section };
|
|
327
327
|
};
|
|
328
328
|
|
|
329
|
-
// The userPrompt AI content generation only populates these content-bearing sections
|
|
330
|
-
// (see GenerateAiDesignMakerContentService / GenerateWebsiteContentService - About,
|
|
331
|
-
// Information, Profile, Media). Sections like email/website/phone are never generated, so
|
|
332
|
-
// blocks whose role points at an ungenerated section fall back to this pool.
|
|
333
|
-
const PERSONALISATION_FALLBACK_ROLES: PersonalisationRole[] = [
|
|
334
|
-
'profile',
|
|
335
|
-
'about',
|
|
336
|
-
'information',
|
|
337
|
-
'media',
|
|
338
|
-
];
|
|
339
|
-
|
|
340
|
-
// "Effectively empty" = no renderable content (ungenerated userPrompt sections like
|
|
341
|
-
// email/website/phone). A section that has data but lacks one property is NOT empty - it
|
|
342
|
-
// intentionally keeps its original content.
|
|
343
|
-
const isSectionEffectivelyEmpty = (
|
|
344
|
-
section: UserPersonalisationSectionWithIndices | undefined,
|
|
345
|
-
): boolean => {
|
|
346
|
-
if (!section) {
|
|
347
|
-
return true;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
return (
|
|
351
|
-
!section.title &&
|
|
352
|
-
!section.name &&
|
|
353
|
-
!section.url &&
|
|
354
|
-
!section.description &&
|
|
355
|
-
!section.descriptionShort &&
|
|
356
|
-
!section.ctaTitle &&
|
|
357
|
-
!section.imageUrls?.length &&
|
|
358
|
-
!section.shapes?.length &&
|
|
359
|
-
!section.items?.length &&
|
|
360
|
-
!section.mainShapesCollection?.tall?.length &&
|
|
361
|
-
!section.mainShapesCollection?.square?.length &&
|
|
362
|
-
!section.mainShapesCollection?.wide?.length
|
|
363
|
-
);
|
|
364
|
-
};
|
|
365
|
-
|
|
366
|
-
// Resolve a property from a specific role's section. Returns null when that section is
|
|
367
|
-
// ungenerated (effectively empty) or cannot supply the property, so the caller can try the
|
|
368
|
-
// next role.
|
|
369
|
-
const resolvePersonalisationValueForRoleAsync = async (
|
|
370
|
-
role: PersonalisationRole,
|
|
371
|
-
property: keyof UserPersonalisationSection | keyof UserPersonalisationItem,
|
|
372
|
-
personalisation: UserPersonalisationWithIndices,
|
|
373
|
-
): Promise<{
|
|
374
|
-
value: any;
|
|
375
|
-
personalisation: UserPersonalisationWithIndices;
|
|
376
|
-
valuesToUpdate?: Record<string, any>;
|
|
377
|
-
} | null> => {
|
|
378
|
-
const key = `${role}Section` as keyof UserPersonalisationWithIndices;
|
|
379
|
-
const section = personalisation[key] as
|
|
380
|
-
| UserPersonalisationSectionWithIndices
|
|
381
|
-
| undefined;
|
|
382
|
-
|
|
383
|
-
if (isSectionEffectivelyEmpty(section)) {
|
|
384
|
-
return null;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
const {
|
|
388
|
-
value,
|
|
389
|
-
section: updatedSection,
|
|
390
|
-
valuesToUpdate,
|
|
391
|
-
} = await getPersonalisationValueAsync(
|
|
392
|
-
section as UserPersonalisationSectionWithIndices,
|
|
393
|
-
property,
|
|
394
|
-
);
|
|
395
|
-
|
|
396
|
-
if (value === undefined || value === null) {
|
|
397
|
-
return null;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
return {
|
|
401
|
-
value,
|
|
402
|
-
personalisation: { ...personalisation, [key]: updatedSection },
|
|
403
|
-
valuesToUpdate,
|
|
404
|
-
};
|
|
405
|
-
};
|
|
406
|
-
|
|
407
329
|
const getPersonalisationValueFromPropertyAsync = async (
|
|
408
330
|
propertyKey: string,
|
|
409
331
|
propertyValue: any,
|
|
@@ -420,6 +342,16 @@ const getPersonalisationValueFromPropertyAsync = async (
|
|
|
420
342
|
return { value: undefined, personalisation };
|
|
421
343
|
}
|
|
422
344
|
|
|
345
|
+
const matchingValue = Object.entries(personalisation).find(
|
|
346
|
+
([key]) => key === `${personalisationRole}Section`,
|
|
347
|
+
);
|
|
348
|
+
|
|
349
|
+
if (!matchingValue) {
|
|
350
|
+
return { value: undefined, personalisation };
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
const section = matchingValue[1] as UserPersonalisationSectionWithIndices;
|
|
354
|
+
|
|
423
355
|
const mapping = getPersonalisationMappingForContentType(contentType);
|
|
424
356
|
|
|
425
357
|
const matchingProperty = Object.entries(mapping).find(([, value]) =>
|
|
@@ -440,48 +372,20 @@ const getPersonalisationValueFromPropertyAsync = async (
|
|
|
440
372
|
typeof propertyValue === 'string' && propertyValue.endsWith('.svg'),
|
|
441
373
|
});
|
|
442
374
|
|
|
443
|
-
const
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
// When the block's own section has content, use it as-is - this preserves existing
|
|
450
|
-
// behaviour, including legitimately keeping the original when that section lacks a
|
|
451
|
-
// specific property (e.g. no items, or an invalid shape).
|
|
452
|
-
if (!isSectionEffectivelyEmpty(primarySection)) {
|
|
453
|
-
const {
|
|
454
|
-
value,
|
|
455
|
-
section: updatedSection,
|
|
456
|
-
valuesToUpdate,
|
|
457
|
-
} = await getPersonalisationValueAsync(
|
|
458
|
-
primarySection as UserPersonalisationSectionWithIndices,
|
|
459
|
-
property,
|
|
460
|
-
);
|
|
461
|
-
|
|
462
|
-
return {
|
|
463
|
-
value,
|
|
464
|
-
personalisation: { ...personalisation, [primaryKey]: updatedSection },
|
|
465
|
-
valuesToUpdate,
|
|
466
|
-
};
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
// The block's section was never generated - fall back to the first populated section that
|
|
470
|
-
// can supply this property, so it doesn't render the "should be AI generated" placeholder.
|
|
471
|
-
// Never reached when the section exists (above) or all are populated (AI Website Builder).
|
|
472
|
-
for (const role of PERSONALISATION_FALLBACK_ROLES) {
|
|
473
|
-
const resolved = await resolvePersonalisationValueForRoleAsync(
|
|
474
|
-
role,
|
|
475
|
-
property,
|
|
476
|
-
personalisation,
|
|
477
|
-
);
|
|
478
|
-
|
|
479
|
-
if (resolved) {
|
|
480
|
-
return resolved;
|
|
481
|
-
}
|
|
482
|
-
}
|
|
375
|
+
const {
|
|
376
|
+
value,
|
|
377
|
+
section: updatedSection,
|
|
378
|
+
valuesToUpdate,
|
|
379
|
+
} = await getPersonalisationValueAsync(section, property);
|
|
483
380
|
|
|
484
|
-
return {
|
|
381
|
+
return {
|
|
382
|
+
value,
|
|
383
|
+
personalisation: {
|
|
384
|
+
...personalisation,
|
|
385
|
+
[`${personalisationRole}Section`]: updatedSection,
|
|
386
|
+
},
|
|
387
|
+
valuesToUpdate,
|
|
388
|
+
};
|
|
485
389
|
};
|
|
486
390
|
|
|
487
391
|
type ContentProperty = Record<string, string | any>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type {
|
|
2
|
+
PageStyles,
|
|
2
3
|
ButtonWithModalContent,
|
|
3
4
|
ProfileContent,
|
|
4
5
|
TextContent,
|
|
@@ -31,9 +32,11 @@ import type {
|
|
|
31
32
|
TextShapeItem,
|
|
32
33
|
TextStyleDeclaration,
|
|
33
34
|
AspectRatio,
|
|
35
|
+
LogoVariation,
|
|
34
36
|
LogoImageModel,
|
|
35
37
|
LogoTemplateImageModel,
|
|
36
38
|
CookieOptions,
|
|
39
|
+
SensitiveContent,
|
|
37
40
|
BookingSectionContent,
|
|
38
41
|
MediaTypes,
|
|
39
42
|
TextStyles,
|
|
@@ -81,7 +84,8 @@ export interface PageViewModel {
|
|
|
81
84
|
}
|
|
82
85
|
|
|
83
86
|
export interface ButtonViewModel
|
|
84
|
-
extends ContentViewModel,
|
|
87
|
+
extends ContentViewModel,
|
|
88
|
+
Omit<ButtonWithModalContent, 'type'> {
|
|
85
89
|
styles: Omit<ButtonStyles, 'templates'>;
|
|
86
90
|
onClicked: (vm: ButtonViewModel) => void;
|
|
87
91
|
buttonLinkType: ButtonLinkType;
|
|
@@ -91,8 +95,7 @@ export interface ButtonViewModel
|
|
|
91
95
|
export type ImageViewModel = ContentViewModel & Omit<ImageContent, 'type'>;
|
|
92
96
|
|
|
93
97
|
export interface ImageGalleryViewModel
|
|
94
|
-
extends
|
|
95
|
-
ContentViewModel,
|
|
98
|
+
extends ContentViewModel,
|
|
96
99
|
Omit<ImageGalleryContent, 'type' | 'galleryStyles'> {
|
|
97
100
|
styles: GalleryStyles;
|
|
98
101
|
}
|
|
@@ -111,12 +114,14 @@ export interface LogoViewModel extends ContentViewModel {
|
|
|
111
114
|
}
|
|
112
115
|
|
|
113
116
|
export interface ProfileViewModel
|
|
114
|
-
extends ContentViewModel,
|
|
117
|
+
extends ContentViewModel,
|
|
118
|
+
Omit<ProfileContent, 'type'> {
|
|
115
119
|
containerStyle?: BrandPageCssStyle;
|
|
116
120
|
}
|
|
117
121
|
|
|
118
122
|
export interface ShapesSectionViewModel
|
|
119
|
-
extends ContentViewModel,
|
|
123
|
+
extends ContentViewModel,
|
|
124
|
+
Omit<ShapesSectionContent, 'type' | 'items'> {
|
|
120
125
|
items: TextShapeItem[];
|
|
121
126
|
isFullWidth: boolean;
|
|
122
127
|
}
|
|
@@ -135,35 +140,41 @@ export type VideoViewModel = ContentViewModel &
|
|
|
135
140
|
export type MapViewModel = ContentViewModel & Omit<MapContent, 'type'>;
|
|
136
141
|
|
|
137
142
|
export interface MailingListViewModel
|
|
138
|
-
extends ContentViewModel,
|
|
143
|
+
extends ContentViewModel,
|
|
144
|
+
Omit<MailingListContent, 'type'> {
|
|
139
145
|
styles: Omit<ButtonStyles, 'templates'>;
|
|
140
146
|
}
|
|
141
147
|
|
|
142
148
|
export interface SupportMeViewModel
|
|
143
|
-
extends ContentViewModel,
|
|
149
|
+
extends ContentViewModel,
|
|
150
|
+
Omit<SupportMeContent, 'type'> {
|
|
144
151
|
buttonStyles: ButtonStyles;
|
|
145
152
|
}
|
|
146
153
|
|
|
147
154
|
export interface RequestPaymentViewModel
|
|
148
|
-
extends ContentViewModel,
|
|
155
|
+
extends ContentViewModel,
|
|
156
|
+
Omit<RequestPaymentContent, 'type'> {
|
|
149
157
|
buttonStyles: ButtonStyles;
|
|
150
158
|
}
|
|
151
159
|
|
|
152
160
|
export interface ShopViewModel
|
|
153
|
-
extends ContentViewModel,
|
|
161
|
+
extends ContentViewModel,
|
|
162
|
+
Omit<ShopContent, 'type'> {
|
|
154
163
|
buttonStyles: ButtonStyles;
|
|
155
164
|
isFullWidth: boolean;
|
|
156
165
|
isShippingEnabled: boolean;
|
|
157
166
|
}
|
|
158
167
|
|
|
159
168
|
export interface ContactFormViewModel
|
|
160
|
-
extends ContentViewModel,
|
|
169
|
+
extends ContentViewModel,
|
|
170
|
+
Omit<ContactFormContent, 'type'> {
|
|
161
171
|
buttonStyles: ButtonStyles;
|
|
162
172
|
isFullWidth: boolean;
|
|
163
173
|
}
|
|
164
174
|
|
|
165
175
|
export interface BannerSectionViewModel
|
|
166
|
-
extends ContentViewModel,
|
|
176
|
+
extends ContentViewModel,
|
|
177
|
+
Omit<BannerSectionContent, 'type'> {
|
|
167
178
|
buttonViewModel: ButtonViewModel;
|
|
168
179
|
isFullWidth: boolean;
|
|
169
180
|
isBigImageType: boolean;
|
|
@@ -214,57 +225,64 @@ export interface TextImageSectionViewModel {
|
|
|
214
225
|
}
|
|
215
226
|
|
|
216
227
|
export interface TestimonialSectionViewModel
|
|
217
|
-
extends ContentViewModel,
|
|
228
|
+
extends ContentViewModel,
|
|
229
|
+
Omit<TestimonialSectionContent, 'type'> {
|
|
218
230
|
isFullWidth: boolean;
|
|
219
231
|
}
|
|
220
232
|
|
|
221
233
|
export interface AboutSectionViewModel
|
|
222
|
-
extends ContentViewModel,
|
|
234
|
+
extends ContentViewModel,
|
|
235
|
+
Omit<AboutSectionContent, 'type'> {
|
|
223
236
|
isFullWidth: boolean;
|
|
224
237
|
}
|
|
225
238
|
|
|
226
239
|
export interface SocialLinksViewModel
|
|
227
|
-
extends ContentViewModel,
|
|
240
|
+
extends ContentViewModel,
|
|
241
|
+
Omit<SocialLinksContent, 'type'> {
|
|
228
242
|
isFullWidth: boolean;
|
|
229
243
|
}
|
|
230
244
|
|
|
231
245
|
export interface DividerSectionViewModel
|
|
232
|
-
extends ContentViewModel,
|
|
246
|
+
extends ContentViewModel,
|
|
247
|
+
Omit<DividerSectionContent, 'type'> {
|
|
233
248
|
isFullWidth: boolean;
|
|
234
249
|
}
|
|
235
250
|
|
|
236
251
|
export interface BookingSectionViewModel
|
|
237
|
-
extends ContentViewModel,
|
|
252
|
+
extends ContentViewModel,
|
|
253
|
+
Omit<BookingSectionContent, 'type'> {
|
|
238
254
|
buttonViewModel: ButtonViewModel;
|
|
239
255
|
isFullWidth: boolean;
|
|
240
256
|
}
|
|
241
257
|
|
|
242
|
-
export interface PageHeaderViewModel
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
258
|
+
export interface PageHeaderViewModel
|
|
259
|
+
extends Omit<
|
|
260
|
+
PageHeaderDesktop | PageHeaderMobile,
|
|
261
|
+
| 'logoImage'
|
|
262
|
+
| 'logoImageStyle'
|
|
263
|
+
| 'isLogoOptional'
|
|
264
|
+
| 'viewport'
|
|
265
|
+
| 'isLogoVisible'
|
|
266
|
+
| 'logoTemplateImage'
|
|
267
|
+
| 'logoImageHeight'
|
|
268
|
+
| 'logoImageWidth'
|
|
269
|
+
> {
|
|
253
270
|
logo: LogoViewModel;
|
|
254
271
|
pages: PageViewModel[];
|
|
255
272
|
}
|
|
256
273
|
|
|
257
|
-
export interface PageFooterViewModel
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
274
|
+
export interface PageFooterViewModel
|
|
275
|
+
extends Omit<
|
|
276
|
+
PageFooterDesktop | PageFooterMobile,
|
|
277
|
+
| 'logoImage'
|
|
278
|
+
| 'logoImageStyle'
|
|
279
|
+
| 'isLogoOptional'
|
|
280
|
+
| 'viewport'
|
|
281
|
+
| 'isLogoVisible'
|
|
282
|
+
| 'logoTemplateImage'
|
|
283
|
+
| 'logoImageHeight'
|
|
284
|
+
| 'logoImageWidth'
|
|
285
|
+
> {
|
|
268
286
|
logo: LogoViewModel;
|
|
269
287
|
}
|
|
270
288
|
|
|
@@ -48,11 +48,11 @@ export const bannerOverlayOptionsVisibilityAssessor: VisibilityAssessor<
|
|
|
48
48
|
> = (content) => {
|
|
49
49
|
return Boolean(
|
|
50
50
|
(content.media?.type === 'getty-video' || content.imageUrl) &&
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
[
|
|
52
|
+
ALIGN_CARD_CENTER_IMAGE,
|
|
53
|
+
ALIGN_CARD_LEFT_IMAGE,
|
|
54
|
+
BIG_IMAGE,
|
|
55
|
+
ALIGN_LEFT_BIG_IMAGE,
|
|
56
|
+
].includes(content.displayStyle),
|
|
57
57
|
);
|
|
58
58
|
};
|
|
@@ -6,7 +6,7 @@ export const colorReplacementIconVisibilityTypeAssessor: VisibilityAssessor<
|
|
|
6
6
|
> = (content) => {
|
|
7
7
|
return Boolean(
|
|
8
8
|
content?.colorReplacements &&
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
content?.iconUrl &&
|
|
10
|
+
content?.mediaType === 'shape',
|
|
11
11
|
);
|
|
12
12
|
};
|
|
@@ -6,7 +6,7 @@ export const colorReplacementProfileVisibilityTypeAssessor: VisibilityAssessor<
|
|
|
6
6
|
> = (content) => {
|
|
7
7
|
return Boolean(
|
|
8
8
|
content?.colorReplacements &&
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
content?.avatarImageUrl &&
|
|
10
|
+
content?.mediaType === 'shape',
|
|
11
11
|
);
|
|
12
12
|
};
|
|
@@ -10,7 +10,7 @@ export const colorReplacementVisibilityTypeAssessor: VisibilityAssessor<
|
|
|
10
10
|
> = (content) => {
|
|
11
11
|
return Boolean(
|
|
12
12
|
content?.colorReplacements &&
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
content?.imageUrl &&
|
|
14
|
+
content?.mediaType === 'shape',
|
|
15
15
|
);
|
|
16
16
|
};
|