@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
|
@@ -69,14 +69,14 @@ const viewport = computed<ViewportsType>(() => {
|
|
|
69
69
|
return brandPageMakerStore.viewport;
|
|
70
70
|
});
|
|
71
71
|
|
|
72
|
-
const
|
|
72
|
+
const logoSliderMin = computed(() => {
|
|
73
73
|
if (viewport.value === VIEWPORTS.mobile) {
|
|
74
74
|
return LOGO_SLIDER_MOBILE_MIN;
|
|
75
75
|
}
|
|
76
76
|
return LOGO_SLIDER_DESKTOP_MIN;
|
|
77
77
|
});
|
|
78
78
|
|
|
79
|
-
const
|
|
79
|
+
const logoSliderMax = computed(() => {
|
|
80
80
|
if (viewport.value === VIEWPORTS.mobile) {
|
|
81
81
|
return LOGO_SLIDER_MOBILE_MAX;
|
|
82
82
|
}
|
|
@@ -183,7 +183,7 @@ const onNewLogoSelected = async () => {
|
|
|
183
183
|
const client = FabricRenderClient.getInstance();
|
|
184
184
|
|
|
185
185
|
// To handle parallel requests
|
|
186
|
-
const [
|
|
186
|
+
const [_, logoDesignAttributes] = await Promise.all([
|
|
187
187
|
updateTask(),
|
|
188
188
|
client.getLogoAttributesByLogoTemplateTokenAsync(
|
|
189
189
|
data.selectedTemplate.token,
|
|
@@ -311,7 +311,7 @@ export const useUiEditableLogoStore = defineStore('uiEditableLogo', {
|
|
|
311
311
|
|
|
312
312
|
this.logoEdits.textObjects = [];
|
|
313
313
|
|
|
314
|
-
templateMetadata.objects.forEach((o,
|
|
314
|
+
templateMetadata.objects.forEach((o, i) => {
|
|
315
315
|
const matchingDraftObject = draftMetadata?.objects?.find(
|
|
316
316
|
(d) => d.id === o.id,
|
|
317
317
|
);
|
|
@@ -2,7 +2,7 @@ import type Vue from 'vue';
|
|
|
2
2
|
import { createApp } from 'vue';
|
|
3
3
|
import { createRouter, createMemoryHistory } from 'vue-router';
|
|
4
4
|
import { createPinia, setActivePinia } from 'pinia';
|
|
5
|
-
import type { LogoContent, TextContent } from '@brand-page';
|
|
5
|
+
import type { LogoContent, NavRoute, TextContent } from '@brand-page';
|
|
6
6
|
import type { ContentItem } from '../../content-settings/models';
|
|
7
7
|
import { useBrandPageMakerStore } from '@brand-page-maker/stores';
|
|
8
8
|
import { INITIALISE_PAYLOAD } from '@brand-page-maker/components/brand-page-maker/__fixtures__';
|
|
@@ -15,7 +15,7 @@ import { setLocaleAsync } from '@src/composables/useTranslate';
|
|
|
15
15
|
|
|
16
16
|
const FABRIC_RENDER_BASE_URL = 'https://localhost:6006';
|
|
17
17
|
|
|
18
|
-
const
|
|
18
|
+
const LOGO_VERSION_ONE_URL =
|
|
19
19
|
'https://localhost:6006/asset/logodraft/brand-page/00000000-0000-0000-0000-000000000000?v=637979483674400000&outputFormat=png&dimensionsType=preview_image_transparent_no_buffer';
|
|
20
20
|
|
|
21
21
|
const LOGO_VERSION_TWO_URL =
|
|
@@ -53,7 +53,7 @@ const PAGE_TWO = createPage(2);
|
|
|
53
53
|
const PAGE_THREE = createPage(3);
|
|
54
54
|
|
|
55
55
|
describe('logo store module', () => {
|
|
56
|
-
let
|
|
56
|
+
let app: Vue.App;
|
|
57
57
|
|
|
58
58
|
beforeAll(async () => {
|
|
59
59
|
FabricRenderClient.setInstance({ baseUrl: FABRIC_RENDER_BASE_URL });
|
|
@@ -64,7 +64,7 @@ describe('logo store module', () => {
|
|
|
64
64
|
|
|
65
65
|
await setLocaleAsync('en-US');
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
app = createApp({
|
|
68
68
|
pinia,
|
|
69
69
|
router: createRouter({ history: createMemoryHistory(), routes: [] }),
|
|
70
70
|
});
|
package/src/shared/models.ts
CHANGED
|
@@ -19,12 +19,6 @@ export interface UIRootState {
|
|
|
19
19
|
thirdPartySettings: UIRootStateThirdPartySettings;
|
|
20
20
|
personalisationData: UserPersonalisationContent[] | undefined;
|
|
21
21
|
isPersonalisationEnabled: boolean;
|
|
22
|
-
// Pre-purchase AI content key used to personalise AI template previews when
|
|
23
|
-
// there is no post-purchase personalisationData (bp-5742).
|
|
24
|
-
userPromptContentKey: string | undefined;
|
|
25
|
-
// Controls visibility of the dedicated AI templates tab. Decoupled from personalisationData
|
|
26
|
-
// so the slug flow can personalise previews/apply without surfacing the AI tab (bp-5742).
|
|
27
|
-
showAiTemplatesTab: boolean;
|
|
28
22
|
}
|
|
29
23
|
|
|
30
24
|
export interface Endpoints {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
</template>
|
|
30
30
|
|
|
31
31
|
<script setup lang="ts">
|
|
32
|
-
import { ref, onMounted } from 'vue';
|
|
32
|
+
import { ref, onMounted, defineProps, defineEmits } from 'vue';
|
|
33
33
|
import { Icon, Loader } from '@designcrowd/fe-shared-lib';
|
|
34
34
|
import type { UserMediaClient } from 'src/clients/user-media-client';
|
|
35
35
|
import type { UserMediaItemWithDimensions } from './models';
|
|
@@ -72,7 +72,6 @@ async function checkStatusAsync(): Promise<boolean> {
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
if (status === 'done') {
|
|
75
|
-
// eslint-disable-next-line vue/require-explicit-emits
|
|
76
75
|
emit('on-media-done', data);
|
|
77
76
|
previewSrc.value = data.thumbnailUrl ?? data.url ?? '';
|
|
78
77
|
isDone.value = true;
|
|
@@ -27,7 +27,8 @@ export interface MediaBaseSelectedPayload {
|
|
|
27
27
|
type: MediaTypes;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
export interface GettyVideoMediaSelectedPayload
|
|
30
|
+
export interface GettyVideoMediaSelectedPayload
|
|
31
|
+
extends MediaBaseSelectedPayload {
|
|
31
32
|
assetId: string;
|
|
32
33
|
token: string;
|
|
33
34
|
mimeType: string;
|
|
@@ -116,7 +116,7 @@ import { Toggle } from '@designcrowd/fe-shared-lib';
|
|
|
116
116
|
import NavigationStyleSettingsMixin from './NavigationStyleSettings.mixin.ts';
|
|
117
117
|
import ColorField from '../../../content-settings/components/color-field/ColorField.vue';
|
|
118
118
|
import TextStyleField from '../../../content-settings/components/text-style-field/TextStyleField.vue';
|
|
119
|
-
import { commonTr } from '@src/composables/useTranslate';
|
|
119
|
+
import { tr, commonTr } from '@src/composables/useTranslate';
|
|
120
120
|
|
|
121
121
|
export default {
|
|
122
122
|
components: {
|
|
@@ -3,6 +3,9 @@ import { getPageTitleError } from '../../utils';
|
|
|
3
3
|
import { useUiPageSettingsStore } from '../../store';
|
|
4
4
|
import { useEventTracker } from '@brand-page-maker/composables/useEventTracker';
|
|
5
5
|
import { usePageNavigationStore } from '../../../page-navigation/store/page-navigation-store';
|
|
6
|
+
import type { NavRoute } from '@brand-page';
|
|
7
|
+
import { v4 as uuid } from 'uuid';
|
|
8
|
+
import { getPageSlugFromPageTitle } from '@src/lib';
|
|
6
9
|
|
|
7
10
|
export default defineComponent({
|
|
8
11
|
setup() {
|
|
@@ -256,7 +256,7 @@ function canMoveToPosition(
|
|
|
256
256
|
sourceParentRouteId: string | null,
|
|
257
257
|
draggedRouteId: string | undefined,
|
|
258
258
|
draggedHasSubPages: boolean,
|
|
259
|
-
|
|
259
|
+
futureIndex: number | undefined,
|
|
260
260
|
): boolean {
|
|
261
261
|
// Rule 1: Pages with sub-pages cannot become sub-pages themselves
|
|
262
262
|
if (targetParentRouteId && draggedHasSubPages) {
|
|
@@ -115,6 +115,7 @@ import SideBarSettingsHeader from '../../../common/SideBarSettingsHeader.vue';
|
|
|
115
115
|
import PageSettingsMixin from './PageSettings.mixin.ts';
|
|
116
116
|
import SideBarSectionTitle from '../../../common/SideBarSectionTitle.vue';
|
|
117
117
|
import DeletePageModal from '../delete-page-modal/DeletePageModal.vue';
|
|
118
|
+
import PageElement from './PageElement.vue';
|
|
118
119
|
import PageSettingsSectionStyles from '../page-settings-section-styles/PageSettingsSectionStyles.vue';
|
|
119
120
|
import NestedDraggable from './NestedDraggable.vue';
|
|
120
121
|
import { useBrandPageContainerStore } from '@brand-page-maker/stores';
|
|
@@ -132,7 +133,7 @@ export default {
|
|
|
132
133
|
PageSettingsSectionStyles,
|
|
133
134
|
},
|
|
134
135
|
mixins: [PageSettingsMixin],
|
|
135
|
-
setup(
|
|
136
|
+
setup(props, context) {
|
|
136
137
|
const brandPageContainerStore = useBrandPageContainerStore();
|
|
137
138
|
|
|
138
139
|
return {
|
package/src/shared/page-settings/components/page-settings-section-styles/HeaderDisplayStyle.vue
CHANGED
|
@@ -72,7 +72,7 @@ const options = computed(() => {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
const filteredOptions = filteredConfigs.reduce((arr, config,
|
|
75
|
+
const filteredOptions = filteredConfigs.reduce((arr, config, index) => {
|
|
76
76
|
config.option.isSelected = props.displayStyle === config.option.value;
|
|
77
77
|
|
|
78
78
|
arr.push(config.option);
|
|
@@ -575,7 +575,7 @@ export default defineComponent({
|
|
|
575
575
|
|
|
576
576
|
async onLogoVersionSelected(selectedLogoVersion: DisplayLogoDraftAsset) {
|
|
577
577
|
const uiStore = useUiStore();
|
|
578
|
-
const
|
|
578
|
+
const brandPageMakerStore = useBrandPageMakerStore();
|
|
579
579
|
|
|
580
580
|
this.logoDraftToken = selectedLogoVersion.token;
|
|
581
581
|
|
|
@@ -3,7 +3,7 @@ import type Vue from 'vue';
|
|
|
3
3
|
import { createApp } from 'vue';
|
|
4
4
|
import { createPinia, setActivePinia } from 'pinia';
|
|
5
5
|
import type { ContentPage } from '../models';
|
|
6
|
-
import type { TextContent } from '@brand-page';
|
|
6
|
+
import type { PageModel, TextContent } from '@brand-page';
|
|
7
7
|
import type { ContentItem } from '../../content-settings/models';
|
|
8
8
|
import {
|
|
9
9
|
UNLIMITED_MAX_NUM_OF_PAGES,
|
|
@@ -13,11 +13,15 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
INITIALISE_PAYLOAD,
|
|
15
15
|
USER_FEATURES,
|
|
16
|
+
brandPageEmpty,
|
|
16
17
|
} from '@brand-page-maker/components/brand-page-maker/__fixtures__';
|
|
17
18
|
import { useUiPageSettingsStore } from './index';
|
|
19
|
+
import { useUiContentSettingsStore } from '../../content-settings/store';
|
|
18
20
|
import { FabricRenderClient } from '../../../clients/fabric-render-client';
|
|
19
21
|
import { setLocaleAsync } from '@src/composables/useTranslate';
|
|
20
22
|
import { usePageNavigationStore } from '@src/shared/page-navigation/store/page-navigation-store';
|
|
23
|
+
import { getPageSlugFromPageTitle } from '@src/lib';
|
|
24
|
+
import { v4 as uuid } from 'uuid';
|
|
21
25
|
|
|
22
26
|
vi.mock('../../../clients/brand-page-client', () => ({
|
|
23
27
|
default: {
|
|
@@ -46,7 +50,7 @@ const PAGE_TWO = createPage(2);
|
|
|
46
50
|
const PAGE_THREE = createPage(3);
|
|
47
51
|
|
|
48
52
|
describe('page store module', () => {
|
|
49
|
-
let
|
|
53
|
+
let app: Vue.App;
|
|
50
54
|
|
|
51
55
|
beforeAll(async () => {
|
|
52
56
|
FabricRenderClient.setInstance({ baseUrl: 'http://localhost:3000' });
|
|
@@ -59,7 +63,7 @@ describe('page store module', () => {
|
|
|
59
63
|
|
|
60
64
|
await setLocaleAsync('en-US');
|
|
61
65
|
|
|
62
|
-
|
|
66
|
+
app = createApp({
|
|
63
67
|
pinia,
|
|
64
68
|
router,
|
|
65
69
|
});
|
|
@@ -162,7 +166,7 @@ describe('page store module', () => {
|
|
|
162
166
|
pages: [PAGE_ONE, PAGE_TWO],
|
|
163
167
|
});
|
|
164
168
|
|
|
165
|
-
pageSettingsStore.addNewPage({
|
|
169
|
+
const firstPage = pageSettingsStore.addNewPage({
|
|
166
170
|
title: 'Page 3',
|
|
167
171
|
});
|
|
168
172
|
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
useEventTracker,
|
|
18
18
|
} from '@brand-page-maker/composables/useEventTracker';
|
|
19
19
|
import { publishBrandPageModalWithStateTr } from '@src/composables/useTranslate';
|
|
20
|
+
import { BRAND_PAGE_TYPES } from '@brand-page/models';
|
|
20
21
|
|
|
21
22
|
export default defineComponent({
|
|
22
23
|
props: {
|
|
@@ -203,8 +203,8 @@ const makerMode = computed(() =>
|
|
|
203
203
|
? `admin_${makerStore.brandPageType.toLocaleLowerCase()}`
|
|
204
204
|
: makerStore.brandPageType.toLocaleLowerCase(),
|
|
205
205
|
);
|
|
206
|
-
const
|
|
207
|
-
const
|
|
206
|
+
const endpoints = computed(() => uiStore.endpoints);
|
|
207
|
+
const thirdPartySettings = computed(() => uiStore.thirdPartySettings);
|
|
208
208
|
const isDesignCom = computed(() => containerStore.isDesignCom);
|
|
209
209
|
|
|
210
210
|
const tabsWithTranslations = [
|
|
@@ -230,7 +230,7 @@ export const useUiStyleSettingsStore = defineStore('uiStyleSettings', {
|
|
|
230
230
|
type: TextStyleType;
|
|
231
231
|
style: TextStyleDeclaration;
|
|
232
232
|
}) {
|
|
233
|
-
const { ...style } = payload.style;
|
|
233
|
+
const { textAlign, textStyleType, ...style } = payload.style;
|
|
234
234
|
|
|
235
235
|
this.$patch((state) => {
|
|
236
236
|
state.textStyles.textStyleOptions[payload.type].isModified = true;
|
|
@@ -60,7 +60,7 @@ export default defineComponent({
|
|
|
60
60
|
templateCategories: computed(
|
|
61
61
|
() => templateSettingsStore.templateCategories,
|
|
62
62
|
),
|
|
63
|
-
|
|
63
|
+
personalisationData: computed(() => uiStore.personalisationData),
|
|
64
64
|
templateSettingsStore,
|
|
65
65
|
uiStore,
|
|
66
66
|
isDesignCom: computed(() => containerStore.isDesignCom),
|
|
@@ -155,7 +155,7 @@ export default defineComponent({
|
|
|
155
155
|
},
|
|
156
156
|
|
|
157
157
|
visibleTabs() {
|
|
158
|
-
return this.
|
|
158
|
+
return this.personalisationData
|
|
159
159
|
? this.tabs
|
|
160
160
|
: [...this.tabs].splice(
|
|
161
161
|
0,
|
|
@@ -14,7 +14,6 @@ import * as DesignTemplateClient from '../../../clients/design-template-client';
|
|
|
14
14
|
import { type DesignTemplate } from '../../../clients/models';
|
|
15
15
|
import {
|
|
16
16
|
BP_DEFAULT_TEMPLATE_TYPE_NAME,
|
|
17
|
-
BP_BRAND_SITE_TEMPLATE_TYPE_NAME,
|
|
18
17
|
SIDE_BAR_TAB_NAMES,
|
|
19
18
|
} from '@brand-page-maker/constants';
|
|
20
19
|
import { defineStore, storeToRefs } from 'pinia';
|
|
@@ -33,7 +32,6 @@ import {
|
|
|
33
32
|
useUiEditableLogoStore,
|
|
34
33
|
useUiLogoSettingsStore,
|
|
35
34
|
} from '../../logo-settings/store';
|
|
36
|
-
import { useEventTracker } from '@brand-page-maker/composables/useEventTracker';
|
|
37
35
|
import {
|
|
38
36
|
templateSettingsTr,
|
|
39
37
|
getCurrentLocale,
|
|
@@ -41,17 +39,6 @@ import {
|
|
|
41
39
|
import { watch } from 'vue';
|
|
42
40
|
|
|
43
41
|
export const DEFAULT_PAGE_SIZE = 6;
|
|
44
|
-
|
|
45
|
-
const POST_PURCHASE_PAGE_SECTION_BY_TAB: Record<string, string> = {
|
|
46
|
-
[TEMPLATE_TABS.all]: 'MakerPostPurchaseSidebarTemplatesAllTab',
|
|
47
|
-
[TEMPLATE_TABS.AI]: 'MakerPostPurchaseSidebarTemplatesAiTab',
|
|
48
|
-
[TEMPLATE_TABS.categories]: 'MakerPostPurchaseSidebarTemplatesCategoryTab',
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const PRE_PURCHASE_PAGE_SECTION_BY_TAB: Record<string, string> = {
|
|
52
|
-
[TEMPLATE_TABS.all]: 'MakerPrePurchaseSidebarTemplatesAllTab',
|
|
53
|
-
[TEMPLATE_TABS.categories]: 'MakerPrePurchaseSidebarTemplatesCategoryTab',
|
|
54
|
-
};
|
|
55
42
|
const LOAD_PAGE_RETRY_DELAY = 250;
|
|
56
43
|
|
|
57
44
|
type SelectedTabType = {
|
|
@@ -79,7 +66,6 @@ export interface TemplatesSettingState {
|
|
|
79
66
|
tabsWithTranslations: SelectedTabType[];
|
|
80
67
|
logoChangeWatcherInitialized: boolean;
|
|
81
68
|
initialSearchTerm: string | undefined;
|
|
82
|
-
aiTemplateKeywords: string | undefined;
|
|
83
69
|
onSearchTermChanged: OnSearchTermChangedCallback | undefined;
|
|
84
70
|
}
|
|
85
71
|
|
|
@@ -117,7 +103,6 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
|
|
|
117
103
|
cachedTemplates: {},
|
|
118
104
|
logoChangeWatcherInitialized: false,
|
|
119
105
|
initialSearchTerm: undefined,
|
|
120
|
-
aiTemplateKeywords: undefined,
|
|
121
106
|
onSearchTermChanged: undefined,
|
|
122
107
|
};
|
|
123
108
|
},
|
|
@@ -317,60 +302,22 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
|
|
|
317
302
|
const editableLogoVariation =
|
|
318
303
|
editableLogoStore.editableLogoVariations[logoVariation];
|
|
319
304
|
|
|
320
|
-
const isPrePurchase = brandPageContainerStore.isPrePurchase;
|
|
321
|
-
const isBrandSite =
|
|
322
|
-
this.templateType === BP_BRAND_SITE_TEMPLATE_TYPE_NAME;
|
|
323
|
-
|
|
324
|
-
// Pre-purchase has no logo draft for logo-based recommendation, so fall back to the seeded
|
|
325
|
-
// search term (the keyword from the URL/cookie - never the business name) so the All tab
|
|
326
|
-
// stays relevant instead of generic (bp-5454).
|
|
327
|
-
const effectiveSearchTerm =
|
|
328
|
-
!this.searchTerm &&
|
|
329
|
-
!this.selectedCategory &&
|
|
330
|
-
isPrePurchase &&
|
|
331
|
-
isBrandSite &&
|
|
332
|
-
this.selectedTab.key === TEMPLATE_TABS.all
|
|
333
|
-
? this.initialSearchTerm
|
|
334
|
-
: this.searchTerm;
|
|
335
|
-
|
|
336
|
-
const pageSection = isBrandSite
|
|
337
|
-
? (isPrePurchase
|
|
338
|
-
? PRE_PURCHASE_PAGE_SECTION_BY_TAB
|
|
339
|
-
: POST_PURCHASE_PAGE_SECTION_BY_TAB)[this.selectedTab.key]
|
|
340
|
-
: undefined;
|
|
341
|
-
|
|
342
|
-
const pageName = isBrandSite
|
|
343
|
-
? isPrePurchase
|
|
344
|
-
? 'maker-pre-purchase'
|
|
345
|
-
: 'maker'
|
|
346
|
-
: undefined;
|
|
347
|
-
|
|
348
|
-
const baseParams = {
|
|
349
|
-
page: pageNo,
|
|
350
|
-
categoryName: this.selectedCategory,
|
|
351
|
-
searchTerm: effectiveSearchTerm,
|
|
352
|
-
keywords: this.aiTemplateKeywords,
|
|
353
|
-
logoDraftToken: logoSettingsStore.selectedLogoImage.logoDraftToken,
|
|
354
|
-
logoVariation: logoSettingsStore.selectedLogoImage.logoVariation,
|
|
355
|
-
selectedTemplateToken: designTemplateToken,
|
|
356
|
-
locale: currentLocale,
|
|
357
|
-
logoS3Token: !isByo ? editableLogoVariation.s3Token : undefined,
|
|
358
|
-
logoTemplateToken: isByo ? logoTemplateToken : undefined,
|
|
359
|
-
useLogoForRecommendedTemplates:
|
|
360
|
-
isBrandSite && this.selectedTab.key === TEMPLATE_TABS.all,
|
|
361
|
-
pageSection,
|
|
362
|
-
pageName,
|
|
363
|
-
};
|
|
364
|
-
|
|
365
|
-
// AI templates are interleaved server-side for the Brand Site All tab
|
|
366
|
-
// (bp-5306); the frontend just renders the returned order.
|
|
367
305
|
const result =
|
|
368
306
|
await designTemplateClient.getTemplateItemsByTemplateType(
|
|
369
307
|
this.templateType,
|
|
370
308
|
{
|
|
371
|
-
|
|
309
|
+
page: pageNo,
|
|
372
310
|
pageSize: DEFAULT_PAGE_SIZE,
|
|
311
|
+
categoryName: this.selectedCategory,
|
|
312
|
+
searchTerm: this.searchTerm,
|
|
313
|
+
logoDraftToken:
|
|
314
|
+
logoSettingsStore.selectedLogoImage.logoDraftToken,
|
|
315
|
+
logoVariation: logoSettingsStore.selectedLogoImage.logoVariation,
|
|
373
316
|
personalisable: this.selectedTab.key === TEMPLATE_TABS.AI,
|
|
317
|
+
selectedTemplateToken: designTemplateToken,
|
|
318
|
+
locale: currentLocale,
|
|
319
|
+
logoS3Token: !isByo ? editableLogoVariation.s3Token : undefined,
|
|
320
|
+
logoTemplateToken: isByo ? logoTemplateToken : undefined,
|
|
374
321
|
},
|
|
375
322
|
);
|
|
376
323
|
|
|
@@ -380,27 +327,11 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
|
|
|
380
327
|
|
|
381
328
|
this._setPageCount({ pageCount: result.pageCount });
|
|
382
329
|
|
|
383
|
-
if (
|
|
384
|
-
pageNo === 1 &&
|
|
385
|
-
result.abTestValuesToBePushed &&
|
|
386
|
-
Object.keys(result.abTestValuesToBePushed).length > 0
|
|
387
|
-
) {
|
|
388
|
-
const eventTracker = useEventTracker();
|
|
389
|
-
|
|
390
|
-
for (const [experimentName, experimentValue] of Object.entries(
|
|
391
|
-
result.abTestValuesToBePushed,
|
|
392
|
-
)) {
|
|
393
|
-
eventTracker.sendExperimentStartedEvent(
|
|
394
|
-
experimentName,
|
|
395
|
-
experimentValue,
|
|
396
|
-
);
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
|
|
400
330
|
const templates = await Promise.all(
|
|
401
331
|
result.paginatedItems.map(async (item) => {
|
|
402
332
|
try {
|
|
403
333
|
if (brandPageMakerUserStore.isAdmin) {
|
|
334
|
+
// Pre-purchase: full template with brandPageModel for live rendering
|
|
404
335
|
const template =
|
|
405
336
|
await designTemplateClient.getTemplateByTemplateToken(
|
|
406
337
|
item.designTemplateToken,
|
|
@@ -418,24 +349,17 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
|
|
|
418
349
|
uiStore.personalisationData.length,
|
|
419
350
|
);
|
|
420
351
|
|
|
421
|
-
contentKey
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
contentKey = uiStore.userPromptContentKey;
|
|
352
|
+
// Get the contentKey from the selected personalisation variation
|
|
353
|
+
// This is needed for the backend preview URL to show the correct variation
|
|
354
|
+
const selectedPersonalisation =
|
|
355
|
+
uiStore.personalisationData[personalisationContentIndex];
|
|
356
|
+
|
|
357
|
+
contentKey = selectedPersonalisation.contentKey;
|
|
428
358
|
}
|
|
429
359
|
|
|
430
360
|
return {
|
|
431
361
|
id: item.designTemplateToken,
|
|
432
|
-
isPersonalisable: item.isPersonalisable,
|
|
433
362
|
contentKey,
|
|
434
|
-
// A userPromptContentKey signals this design's real AI images live
|
|
435
|
-
// in the userPrompt bucket (post- or pre-purchase). The preview must
|
|
436
|
-
// then resolve via userPromptContentKey, not the regular bucket which
|
|
437
|
-
// holds placeholders post-purchase (bp-5454).
|
|
438
|
-
usesUserPromptContentKey: !!uiStore.userPromptContentKey,
|
|
439
363
|
previewImageUrl: item.previewImageUrl,
|
|
440
364
|
} as TemplateSettingsTemplate;
|
|
441
365
|
}
|
|
@@ -450,15 +374,7 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
|
|
|
450
374
|
(t): t is TemplateSettingsTemplate => t !== null,
|
|
451
375
|
);
|
|
452
376
|
|
|
453
|
-
|
|
454
|
-
// (bp-5454 scenario 5). The badge is driven purely by isPersonalisable,
|
|
455
|
-
// so clear it for category results regardless of the template's catalog flag.
|
|
456
|
-
const displayTemplates =
|
|
457
|
-
this.selectedTab.key === TEMPLATE_TABS.categories
|
|
458
|
-
? validTemplates.map((t) => ({ ...t, isPersonalisable: false }))
|
|
459
|
-
: validTemplates;
|
|
460
|
-
|
|
461
|
-
this._addTemplates({ templates: displayTemplates });
|
|
377
|
+
this._addTemplates({ templates: validTemplates });
|
|
462
378
|
this._setPageNoLoaded({ pageNoLoaded: pageNo });
|
|
463
379
|
} finally {
|
|
464
380
|
this._setIsBusy({ isBusy: false });
|
|
@@ -580,9 +496,6 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
|
|
|
580
496
|
this.initialSearchTerm = payload.initialSearchTerm;
|
|
581
497
|
this.onSearchTermChanged = payload.onSearchTermChanged;
|
|
582
498
|
},
|
|
583
|
-
setAiTemplateKeywords(payload: { aiTemplateKeywords: string }) {
|
|
584
|
-
this.aiTemplateKeywords = payload.aiTemplateKeywords;
|
|
585
|
-
},
|
|
586
499
|
notifySearchTermChanged(searchTerm: string | undefined) {
|
|
587
500
|
this.onSearchTermChanged?.(searchTerm);
|
|
588
501
|
},
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
</div>
|
|
104
104
|
<p class="tw-mt-4 tw-text-xs tw-text-grayscale-600">
|
|
105
105
|
{{ tr('poweredBy') }}
|
|
106
|
-
|
|
106
|
+
<a
|
|
107
107
|
href="https://unsplash.com"
|
|
108
108
|
class="maker-anchor tw-no-underline"
|
|
109
109
|
>Unsplash</a
|
|
@@ -114,7 +114,11 @@ class="maker-anchor tw-no-underline"
|
|
|
114
114
|
<script>
|
|
115
115
|
import UnsplashLibraryMixin from './UnsplashLibrary.mixin.ts';
|
|
116
116
|
import { Button, Loader, TextInput } from '@designcrowd/fe-shared-lib';
|
|
117
|
-
import {
|
|
117
|
+
import {
|
|
118
|
+
tr,
|
|
119
|
+
commonTr,
|
|
120
|
+
unsplashImageCategoriesTr,
|
|
121
|
+
} from '@src/composables/useTranslate';
|
|
118
122
|
|
|
119
123
|
export default {
|
|
120
124
|
components: {
|
|
@@ -41,18 +41,6 @@ export function resolveLogoData(
|
|
|
41
41
|
return logoImageBase64Url || undefined;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
/**
|
|
45
|
-
* Look up an asset key from the manifest by matching the data content.
|
|
46
|
-
*/
|
|
47
|
-
export function findAssetKey(
|
|
48
|
-
assets: AssetEntry[] | undefined,
|
|
49
|
-
data: string | undefined,
|
|
50
|
-
): string | undefined {
|
|
51
|
-
if (!data || !assets) return undefined;
|
|
52
|
-
|
|
53
|
-
return assets.find((a) => a.data === data)?.key;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
44
|
/**
|
|
57
45
|
* Hash a string using SHA-256 and return the first 16 hex characters.
|
|
58
46
|
* Uses the Web Crypto API (available in browsers and modern runtimes).
|