@designcrowd/library.brand-page 6.0.5 → 6.0.6-ast-bugs
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-DhzvKlTS.js → CreatedOnBrandCrowd-de-de-SHCspMwS.js} +3 -3
- package/lib/src/{CreatedOnBrandCrowd-en-us-DKH4lmNV.js → CreatedOnBrandCrowd-en-us-C6lITAAT.js} +3 -3
- package/lib/src/{CreatedOnBrandCrowd-es-es-RloPCLuV.js → CreatedOnBrandCrowd-es-es-Uh69c4vZ.js} +3 -3
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-Cu9e2H0K.js → CreatedOnBrandCrowd-fr-ca-Bb0rp7BV.js} +3 -3
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-Cu9e2H0K.js → CreatedOnBrandCrowd-fr-fr-Bb0rp7BV.js} +3 -3
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-CiCnjxBZ.js → CreatedOnBrandCrowd-pt-br-DsrQHcjs.js} +3 -3
- package/lib/src/{CreatedOnBrandCrowd-pt-br-CiCnjxBZ.js → CreatedOnBrandCrowd-pt-pt-DsrQHcjs.js} +3 -3
- package/lib/src/{CreatedOnDcom-de-de-CwlnedFV.js → CreatedOnDcom-de-de-BshZYzSp.js} +3 -3
- package/lib/src/{CreatedOnDcom-en-us-DFHex61v.js → CreatedOnDcom-en-us-CLu8mKUW.js} +3 -3
- package/lib/src/{CreatedOnDcom-es-es-BTxH6I4V.js → CreatedOnDcom-es-es-BZYhkONd.js} +3 -3
- package/lib/src/{CreatedOnDcom-fr-ca-BVw0KYxu.js → CreatedOnDcom-fr-ca-CIaBEp_9.js} +3 -3
- package/lib/src/{CreatedOnDcom-fr-fr-DaqNz1Er.js → CreatedOnDcom-fr-fr-dyF7hioJ.js} +3 -3
- package/lib/src/{CreatedOnDcom-pt-br-B4KsMI8W.js → CreatedOnDcom-pt-br-CUHjk2du.js} +3 -3
- package/lib/src/{CreatedOnDcom-pt-pt-CWoHEtOZ.js → CreatedOnDcom-pt-pt-CWDvQidv.js} +3 -3
- package/lib/src/brand-page/clients/brand-page.client.d.ts +9 -9
- package/lib/src/brand-page/components/banner-section/BannerSection.mixin.d.ts +103 -0
- package/lib/src/brand-page/components/banner-section/BannerSection.mixin.js +178 -0
- package/lib/src/brand-page/components/image-gallery/masonry/MasonryGallery.mixin.d.ts +1 -2
- package/lib/src/brand-page/components/navigation/hamburger/HamburgerNavigation.mixin.d.ts +4 -2
- package/lib/src/brand-page/components/navigation/hamburger/HamburgerNavigation.mixin.js +1 -0
- package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.d.ts +4 -2
- package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.js +11 -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 +2 -13
- package/lib/src/brand-page/models/index.js +3 -0
- package/lib/src/brand-page/models/payment.model.d.ts +1 -1
- package/lib/src/brand-page/utils/personalisation.util.js +72 -14
- package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +21 -19
- package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.js +1 -0
- package/lib/src/brand-page-maker/components/admin-background-settings/AdminBackgroundSettings.mixin.d.ts +16 -10
- package/lib/src/brand-page-maker/components/admin-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 +181 -170
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +3 -0
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.js +1 -0
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.d.ts +12 -12
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.stories.js +2 -2
- package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-payment.js +0 -7
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +148 -149
- package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.d.ts +21 -21
- package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.js +1 -1
- package/lib/src/brand-page-maker/components/color-picker/components/ColorModeSelect.mixin.d.ts +4 -2
- package/lib/src/brand-page-maker/components/color-picker/components/ColorModeSelect.mixin.js +1 -0
- package/lib/src/brand-page-maker/components/color-picker/components/GradientColorSlider.mixin.d.ts +4 -2
- package/lib/src/brand-page-maker/components/color-picker/components/GradientColorSlider.mixin.js +1 -0
- package/lib/src/brand-page-maker/components/color-picker/components/GradientColorSliderHandler.mixin.d.ts +5 -2
- package/lib/src/brand-page-maker/components/color-picker/components/GradientColorSliderHandler.mixin.js +1 -0
- package/lib/src/brand-page-maker/components/color-picker/components/GradientTypeSelector.mixin.d.ts +4 -2
- package/lib/src/brand-page-maker/components/color-picker/components/GradientTypeSelector.mixin.js +1 -0
- package/lib/src/brand-page-maker/components/device/Device.mixin.d.ts +4 -2
- package/lib/src/brand-page-maker/components/device/Device.mixin.js +1 -0
- package/lib/src/brand-page-maker/components/navigation/Navigation.mixin.d.ts +4 -2
- package/lib/src/brand-page-maker/components/navigation/Navigation.mixin.js +1 -0
- package/lib/src/brand-page-maker/components/preview/Preview.mixin.d.ts +3 -3
- package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.d.ts +11 -11
- package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +27 -25
- package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.js +1 -0
- package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +27 -27
- package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.js +1 -1
- package/lib/src/brand-page-maker/components/seo-settings/UseExistingDomainModal.mixin.d.ts +17 -12
- package/lib/src/brand-page-maker/components/social-share/SocialShare.mixin.d.ts +12 -12
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +30 -32
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.js +16 -5
- package/lib/src/brand-page-maker/components/upgrade-to-premium-button/UpgradeToPremiumButton.mixin.d.ts +11 -11
- package/lib/src/brand-page-maker/composables/ai-chat/types.d.ts +3 -0
- package/lib/src/brand-page-maker/composables/ai-chat/ui-actions.d.ts +29 -0
- package/lib/src/brand-page-maker/composables/ai-chat/ui-actions.js +32 -0
- package/lib/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.js +204 -177
- 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 +3 -2
- package/lib/src/brand-page-maker/composables/useEventTracker.js +1 -0
- 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 +1 -2
- package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +366 -378
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +5 -4
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.js +8 -5
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.d.ts +3 -1
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +7 -3
- package/lib/src/brand-page-maker/stores/history/history-store.d.ts +15 -15
- package/lib/src/brand-page-maker/stores/ui/ui-store.d.ts +6 -0
- package/lib/src/brand-page-maker/stores/ui/ui-store.js +8 -0
- package/lib/src/brand-page-maker/utils/content-settings.util.js +1 -1
- package/lib/src/brand-page-maker/utils/rich-text-editor.util.d.ts +1 -1
- package/lib/src/brand-page-maker/utils/rich-text-editor.util.js +4 -4
- package/lib/src/clients/ai-assistant-client.d.ts +7 -0
- package/lib/src/clients/brand-page-client.d.ts +16 -15
- package/lib/src/clients/design-template-client.d.ts +3 -0
- package/lib/src/clients/media-client.d.ts +2 -2
- package/lib/src/clients/models.d.ts +2 -0
- package/lib/src/composables/useSnapshot.js +18 -18
- package/lib/src/css/library.brand-page-brandCrowd.min.css +371 -344
- package/lib/src/css/library.brand-page-brandPage.min.css +649 -344
- package/lib/src/css/library.brand-page-designCom.min.css +371 -344
- package/lib/src/css/library.brand-page-preview.min.css +627 -344
- package/lib/src/index.d.ts +4 -0
- package/lib/src/index.mjs +107 -104
- package/lib/src/{lib-BPI8E2Ui.js → lib-COw-Rz05.js} +37005 -33761
- package/lib/src/lib.js +10 -0
- package/lib/src/metadata-builder/builders/footer-builder.js +105 -62
- package/lib/src/metadata-builder/builders/section-builders/image-gallery-builder.js +68 -57
- package/lib/src/metadata-builder/builders/section-builders/images-section-builder.js +93 -58
- package/lib/src/metadata-builder/builders/section-builders/shapes-section-builder.js +99 -66
- package/lib/src/metadata-builder/builders/section-builders/social-links-builder.js +17 -57
- package/lib/src/metadata-builder/builders/section-builders/testimonial-section-builder.js +85 -51
- package/lib/src/metadata-builder/builders/section-builders/text-section-builder.js +74 -49
- package/lib/src/metadata-builder/builders/section-field-utils.d.ts +7 -0
- 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 +7 -16
- package/lib/src/metadata-builder/parsers/section-tool-arguments.d.ts +48 -66
- package/lib/src/plugins/google-maps-plugin/google-maps-plugin.d.ts +1 -1
- package/lib/src/plugins/google-maps-plugin/google-maps-plugin.js +8 -8
- package/lib/src/shared/background-settings/components/background-shapes/BackgroundShapeSettings.mixin.d.ts +13 -13
- package/lib/src/shared/background-settings/store/background-settings-store.d.ts +3 -3
- package/lib/src/shared/color-picker/components/ColorPicker.mixin.d.ts +4 -2
- package/lib/src/shared/color-picker/components/ColorPicker.mixin.js +2 -2
- package/lib/src/shared/color-picker/components/ColorPickerSwatch.mixin.d.ts +4 -2
- package/lib/src/shared/color-picker/components/ColorPickerSwatch.mixin.js +1 -0
- package/lib/src/shared/confirm-modal/ConfirmModal.mixin.d.ts +5 -2
- package/lib/src/shared/confirm-modal/ConfirmModal.mixin.js +1 -0
- package/lib/src/shared/content-settings/components/GenericTextInput.mixin.d.ts +0 -1
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +131 -129
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.js +2 -1
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +111 -110
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +84 -81
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.js +5 -0
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +117 -109
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.js +1 -14
- package/lib/src/shared/content-settings/components/email-field/EmailField.mixin.d.ts +0 -1
- package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +72 -70
- package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.js +4 -3
- package/lib/src/shared/content-settings/components/form-fields-field/FormFieldsField.mixin.d.ts +4 -4
- package/lib/src/shared/content-settings/components/icon-library/IconLibrary.mixin.d.ts +3 -1
- package/lib/src/shared/content-settings/components/icon-library/IconLibrary.mixin.js +1 -0
- package/lib/src/shared/content-settings/components/images-field/ImagesField.mixin.d.ts +2 -2
- package/lib/src/shared/content-settings/components/items-field/ItemsField.mixin.d.ts +4 -3
- package/lib/src/shared/content-settings/components/items-field/ItemsField.mixin.js +1 -1
- package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +40 -40
- package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigOptionField.mixin.d.ts +5 -6
- package/lib/src/shared/content-settings/components/shape-field/ShapeField.mixin.d.ts +0 -1
- package/lib/src/shared/content-settings/components/slider-field/SliderField.mixin.d.ts +2 -2
- package/lib/src/shared/content-settings/components/tel-field/TelField.mixin.d.ts +0 -1
- package/lib/src/shared/content-settings/components/testimonial-items-field/TestimonialItemsField.mixin.d.ts +1 -2
- package/lib/src/shared/content-settings/components/text-field/TextField.mixin.d.ts +0 -1
- package/lib/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.d.ts +1 -2
- package/lib/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.js +1 -1
- package/lib/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.d.ts +28 -28
- package/lib/src/shared/content-settings/components/textarea-field/TextareaField.mixin.d.ts +0 -1
- package/lib/src/shared/content-settings/components/toggle-field/ToggleField.mixin.d.ts +2 -2
- package/lib/src/shared/content-settings/components/url-field/UrlField.mixin.d.ts +0 -1
- package/lib/src/shared/content-settings/components/youtube-video-field/YoutubeVideoField.mixin.d.ts +0 -1
- package/lib/src/shared/content-settings/store/content-settings-store.d.ts +39 -39
- package/lib/src/shared/content-settings/utils.js +0 -1
- package/lib/src/shared/font-family-selector/FontFamilySelector.mixin.d.ts +6 -4
- package/lib/src/shared/font-family-selector/FontFamilySelector.mixin.js +1 -0
- package/lib/src/shared/image-gallery-style-settings/ImageGalleryStyleSettings.mixin.d.ts +4 -2
- package/lib/src/shared/image-gallery-style-settings/ImageGalleryStyleSettings.mixin.js +1 -0
- package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.d.ts +29 -21
- package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.js +1 -1
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +50 -51
- package/lib/src/shared/logo-settings/components/LogoSettingsHeader.mixin.d.ts +6 -4
- package/lib/src/shared/logo-settings/components/LogoSettingsHeader.mixin.js +1 -0
- package/lib/src/shared/logo-settings/store/editable-logo-store.js +1 -1
- package/lib/src/shared/logo-settings/store/logo-settings-store.d.ts +1 -1
- package/lib/src/shared/logo-versions/LogoVersions.mixin.d.ts +13 -5
- package/lib/src/shared/logo-versions/LogoVersions.mixin.js +1 -0
- package/lib/src/shared/models.d.ts +2 -0
- package/lib/src/shared/my-designs/MyDesigns.mixin.d.ts +14 -6
- package/lib/src/shared/my-designs/MyDesigns.mixin.js +1 -0
- package/lib/src/shared/my-uploads/MyMedia.mixin.d.ts +14 -5
- package/lib/src/shared/my-uploads/MyMedia.mixin.js +1 -0
- package/lib/src/shared/my-uploads/MyUploads.mixin.d.ts +14 -5
- package/lib/src/shared/my-uploads/MyUploads.mixin.js +1 -0
- package/lib/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.d.ts +5 -3
- package/lib/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.js +1 -0
- package/lib/src/shared/navigation-style-settings/store/index.d.ts +2 -2
- package/lib/src/shared/page-navigation/store/page-navigation-store.d.ts +2 -2
- package/lib/src/shared/page-settings/components/new-page-modal/NewPageModal.mixin.d.ts +27 -28
- package/lib/src/shared/page-settings/components/new-page-modal/NewPageModal.mixin.js +0 -2
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +188 -179
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +181 -177
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.js +1 -1
- package/lib/src/shared/page-settings/store/page-settings-store.d.ts +9 -9
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +39 -39
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.js +0 -1
- package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +18 -18
- package/lib/src/shared/side-bar/components/SideBarTabButton.mixin.d.ts +6 -6
- package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +66 -60
- package/lib/src/shared/style-settings/store/style-settings-store.d.ts +1 -1
- package/lib/src/shared/style-settings/store/style-settings-store.js +1 -1
- package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.d.ts +20 -450
- package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.js +2 -2
- package/lib/src/shared/template-settings/models.d.ts +1 -0
- package/lib/src/shared/template-settings/store/template-settings-store.d.ts +4 -0
- package/lib/src/shared/template-settings/store/template-settings-store.js +79 -11
- package/lib/src/shared/unsplash-library/UnsplashLibrary.mixin.d.ts +9 -4
- package/lib/src/utils/build-asset-manifest.d.ts +4 -0
- package/lib/src/utils/build-asset-manifest.js +8 -0
- package/lib/src/utils/minify-brand-page-metadata.d.ts +0 -2
- package/lib/src/utils/minify-brand-page-metadata.js +2 -17
- package/package.json +60 -56
- package/src/brand-page/components/about-section/AboutSection.vue.test.ts +7 -5
- package/src/brand-page/components/banner-section/BannerSection.mixin.ts +210 -0
- package/src/brand-page/components/banner-section/BannerSection.vue +5 -1
- 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 +1 -2
- package/src/brand-page/components/images-section/ImagesSection.vue +0 -1
- package/src/brand-page/components/logo/LogoRender.vue +188 -188
- package/src/brand-page/components/navigation/hamburger/HamburgerNavigation.mixin.ts +1 -0
- package/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.ts +25 -8
- package/src/brand-page/components/page-footer/PageFooter.vue +1 -0
- package/src/brand-page/components/page-header/HeaderLayout.vue +12 -6
- package/src/brand-page/components/page-header/PageHeader.vue +1 -0
- package/src/brand-page/components/shapes-section/ShapesSection.vue +1 -1
- package/src/brand-page/components/shop/CartModal.vue +1 -3
- package/src/brand-page/components/shop/FeaturedDisplay.vue +2 -2
- package/src/brand-page/components/shop/PaymentModal.vue +1 -5
- package/src/brand-page/components/shop/ProductDetailModal.vue +1 -1
- package/src/brand-page/components/shop/Shop.vue +1 -5
- 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 +3 -1
- package/src/brand-page/constants/sections/footer-display.constants.ts +1 -1
- package/src/brand-page/models/index.ts +4 -12
- package/src/brand-page/models/payment.model.ts +2 -1
- package/src/brand-page/models/shop.model.ts +0 -2
- package/src/brand-page/models/user-personalisation.model.ts +1 -2
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +3 -0
- package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +1 -0
- package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +2 -0
- package/src/brand-page/utils/migration/migration-01_1.ts +1 -1
- package/src/brand-page/utils/migration/migration-02.ts +0 -1
- package/src/brand-page/utils/migration/migration-03.ts +0 -1
- package/src/brand-page/utils/migration/migration-04.ts +0 -1
- package/src/brand-page/utils/migration/migration-05.ts +1 -5
- package/src/brand-page/utils/migration/migration-05_2.ts +1 -1
- package/src/brand-page/utils/migration/migration-08.test.ts +1 -1
- package/src/brand-page/utils/personalisation.util.test.ts +35 -0
- package/src/brand-page/utils/personalisation.util.ts +119 -23
- package/src/brand-page/view-models.ts +38 -56
- package/src/brand-page-maker/assessors/banner-section-description-visibility.assessor.ts +6 -6
- package/src/brand-page-maker/assessors/color-replacement-icon-visibility.assessor.ts +2 -2
- package/src/brand-page-maker/assessors/color-replacement-profile-visibility.assessor.ts +2 -2
- package/src/brand-page-maker/assessors/color-replacement-visibility.assessor.ts +2 -2
- package/src/brand-page-maker/assessors/contact-form-visibility.assessor.ts +14 -14
- package/src/brand-page-maker/components/action-bar/ActionBar.mixin.ts +1 -0
- package/src/brand-page-maker/components/ai-text-edit/AiActionButtons.vue +27 -12
- package/src/brand-page-maker/components/ai-text-edit/AiChatbox.vue +3 -2
- package/src/brand-page-maker/components/ai-text-edit/TextBubble.vue +8 -7
- package/src/brand-page-maker/components/ai-website-builder/AiWebsiteBuilder.vue +21 -1
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +5 -1
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.ts +1 -0
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.stories.ts +2 -5
- package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.ts +0 -5
- package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-payment.ts +0 -8
- package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-site-template.examples.ts +0 -2
- package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.vue +1 -0
- package/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.ts +1 -1
- package/src/brand-page-maker/components/color-palette/BpColorPalette.vue +1 -2
- package/src/brand-page-maker/components/color-picker/components/ColorModeSelect.mixin.ts +1 -0
- package/src/brand-page-maker/components/color-picker/components/GradientColorSlider.mixin.ts +1 -0
- package/src/brand-page-maker/components/color-picker/components/GradientColorSliderHandler.mixin.ts +1 -0
- package/src/brand-page-maker/components/color-picker/components/GradientTypeSelector.mixin.ts +1 -0
- package/src/brand-page-maker/components/device/Device.mixin.ts +1 -0
- package/src/brand-page-maker/components/navigation/Navigation.mixin.ts +1 -0
- package/src/brand-page-maker/components/rich-text-editor/RichTextEditor.vue +3 -1
- package/src/brand-page-maker/components/sensitive-content/SensitiveContent.vue +1 -4
- package/src/brand-page-maker/components/seo-settings/DeleteDomainModal.vue +1 -1
- package/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.ts +1 -0
- package/src/brand-page-maker/components/seo-settings/SeoPageSettings.vue +1 -1
- package/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.ts +0 -1
- package/src/brand-page-maker/components/seo-settings/UrlSettings.vue +0 -1
- package/src/brand-page-maker/components/seo-settings/UseExistingDomainModal.vue +1 -5
- package/src/brand-page-maker/components/shop/AddOrEditProductContainer.vue +1 -1
- package/src/brand-page-maker/components/shop/ReplaceImageSettingsForShop.vue +1 -1
- package/src/brand-page-maker/components/social-share/SocialShare.vue +1 -1
- package/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.ts +22 -8
- package/src/brand-page-maker/components/template-preview/TemplatePreview.vue +5 -10
- package/src/brand-page-maker/components/template-preview/TemplatePreviewAiBadge.vue +12 -0
- package/src/brand-page-maker/components/video-play/VideoPlayButton.vue +1 -1
- package/src/brand-page-maker/composables/ai-chat/types.ts +6 -0
- package/src/brand-page-maker/composables/ai-chat/ui-actions.test.ts +80 -0
- package/src/brand-page-maker/composables/ai-chat/ui-actions.ts +58 -0
- package/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.ts +308 -262
- package/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.ts +6 -6
- package/src/brand-page-maker/composables/useEventTracker.ts +1 -0
- 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 +4 -2
- package/src/brand-page-maker/models/content-settings-configs.ts +4 -2
- package/src/brand-page-maker/models/navigation-style-configs.ts +5 -6
- package/src/brand-page-maker/stores/admin-logo-settings/admin-logo-settings-store.ts +0 -1
- package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.ts +8 -5
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.test.ts +1 -3
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +12 -4
- package/src/brand-page-maker/stores/ui/ui-store.ts +16 -0
- package/src/brand-page-maker/utils/content-settings.util.ts +1 -1
- package/src/brand-page-maker/utils/rich-text-editor.util.ts +4 -4
- package/src/clients/ai-assistant-client.ts +7 -0
- package/src/clients/design-template-client.ts +3 -0
- package/src/clients/models.ts +2 -0
- package/src/composables/useSnapshot.ts +19 -22
- package/src/lib.ts +12 -0
- package/src/metadata-builder/builders/footer-builder.test.ts +130 -229
- package/src/metadata-builder/builders/footer-builder.ts +155 -90
- package/src/metadata-builder/builders/section-builders/image-gallery-builder.ts +88 -62
- package/src/metadata-builder/builders/section-builders/images-section-builder.ts +129 -66
- package/src/metadata-builder/builders/section-builders/shapes-section-builder.ts +160 -105
- package/src/metadata-builder/builders/section-builders/social-links-builder.ts +20 -65
- package/src/metadata-builder/builders/section-builders/testimonial-section-builder.ts +146 -83
- package/src/metadata-builder/builders/section-builders/text-section-builder.ts +122 -70
- 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 +7 -16
- package/src/metadata-builder/parsers/section-tool-arguments.ts +48 -66
- package/src/plugins/google-maps-plugin/google-maps-plugin.ts +8 -8
- package/src/shared/background-settings/components/BackgroundSettings.vue +1 -1
- package/src/shared/background-settings/components/background-color/BackgroundColorSettings.vue +1 -1
- package/src/shared/color-picker/components/ColorPicker.mixin.ts +2 -7
- package/src/shared/color-picker/components/ColorPickerSwatch.mixin.ts +1 -0
- package/src/shared/common/NumberInput.vue +1 -0
- package/src/shared/common/SideBarSettingsHeader.vue +2 -2
- package/src/shared/confirm-modal/ConfirmModal.mixin.ts +1 -0
- package/src/shared/content-settings/components/booking-url-field/BookingUrlField.vue +1 -0
- package/src/shared/content-settings/components/button-configuration-field/ButtonConfigurationField.vue +1 -0
- package/src/shared/content-settings/components/color-field/ColorField.vue +3 -10
- package/src/shared/content-settings/components/content-settings/ContentSettings.mixin.ts +1 -1
- package/src/shared/content-settings/components/content-settings/ContentSettingsLockedButton.vue +1 -0
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.ts +5 -0
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.ts +1 -14
- package/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.ts +4 -6
- package/src/shared/content-settings/components/icon-library/IconLibrary.mixin.ts +1 -0
- package/src/shared/content-settings/components/items-field/ItemsField.mixin.ts +1 -1
- package/src/shared/content-settings/components/logo-selection-field/LogoSelectionField.vue +1 -1
- package/src/shared/content-settings/components/logo-size-field/LogoSizeSliderField.vue +1 -1
- package/src/shared/content-settings/components/page-dropdown-field/PageDropdownField.vue +1 -1
- package/src/shared/content-settings/components/personalisation-role-field/PersonalisationRoleField.vue +4 -4
- package/src/shared/content-settings/components/text-image-field/TextImageField.vue +2 -8
- package/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.ts +1 -1
- package/src/shared/content-settings/models.ts +3 -2
- package/src/shared/content-settings/utils.ts +0 -1
- package/src/shared/dropzone-image-uploader/components/DropzoneImageUploader.vue +1 -0
- package/src/shared/ecommerce-settings/store/cart-store.test.ts +1 -1
- package/src/shared/font-family-selector/FontFamilySelector.mixin.ts +1 -0
- package/src/shared/image-gallery-style-settings/ImageGalleryStyleSettings.mixin.ts +1 -0
- package/src/shared/logo-settings/components/EditLogoSettings.mixin.ts +1 -1
- package/src/shared/logo-settings/components/LogoSettings.mixin.ts +0 -1
- package/src/shared/logo-settings/components/LogoSettingsHeader.mixin.ts +1 -0
- package/src/shared/logo-settings/components/LogoStyleSettingsWithState.vue +2 -2
- package/src/shared/logo-settings/components/LogoTemplateSearch.vue +1 -1
- package/src/shared/logo-settings/store/editable-logo-store.ts +1 -1
- package/src/shared/logo-settings/store/logo-settings-store.test.ts +4 -4
- package/src/shared/logo-versions/LogoVersions.mixin.ts +1 -0
- package/src/shared/models.ts +6 -0
- package/src/shared/my-designs/MyDesigns.mixin.ts +1 -0
- package/src/shared/my-uploads/MyMedia.mixin.ts +1 -0
- package/src/shared/my-uploads/MyMediaSelectionItem.vue +2 -1
- package/src/shared/my-uploads/MyUploads.mixin.ts +1 -0
- package/src/shared/my-uploads/models.ts +1 -2
- package/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.ts +1 -0
- package/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.vue +1 -1
- package/src/shared/page-settings/components/new-page-modal/NewPageModal.mixin.ts +0 -3
- package/src/shared/page-settings/components/page-settings/NestedDraggable.vue +1 -1
- package/src/shared/page-settings/components/page-settings/PageSettings.vue +1 -2
- package/src/shared/page-settings/components/page-settings-section-styles/HeaderDisplayStyle.vue +1 -1
- package/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.ts +1 -1
- package/src/shared/page-settings/store/page-settings-store.test.ts +4 -8
- package/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.ts +0 -1
- package/src/shared/shape-library/ShapeLibrary.vue +2 -2
- package/src/shared/style-settings/store/style-settings-store.ts +1 -1
- package/src/shared/template-settings/components/TemplatesSettings.mixin.ts +2 -2
- package/src/shared/template-settings/models.ts +1 -0
- package/src/shared/template-settings/store/template-settings-store.ts +105 -18
- package/src/shared/unsplash-library/UnsplashLibrary.vue +2 -6
- package/src/shared/video-library/VideoLibrary.vue +1 -1
- package/src/utils/build-asset-manifest.ts +12 -0
- package/src/utils/minify-brand-page-metadata.ts +7 -27
- package/lib/src/metadata-builder/builders/item-id-utils.d.ts +0 -54
- package/lib/src/metadata-builder/builders/item-id-utils.js +0 -96
- package/src/metadata-builder/builders/item-id-utils.test.ts +0 -184
- package/src/metadata-builder/builders/item-id-utils.ts +0 -117
|
@@ -326,6 +326,84 @@ 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
|
+
|
|
329
407
|
const getPersonalisationValueFromPropertyAsync = async (
|
|
330
408
|
propertyKey: string,
|
|
331
409
|
propertyValue: any,
|
|
@@ -342,16 +420,6 @@ const getPersonalisationValueFromPropertyAsync = async (
|
|
|
342
420
|
return { value: undefined, personalisation };
|
|
343
421
|
}
|
|
344
422
|
|
|
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
|
-
|
|
355
423
|
const mapping = getPersonalisationMappingForContentType(contentType);
|
|
356
424
|
|
|
357
425
|
const matchingProperty = Object.entries(mapping).find(([, value]) =>
|
|
@@ -372,20 +440,48 @@ const getPersonalisationValueFromPropertyAsync = async (
|
|
|
372
440
|
typeof propertyValue === 'string' && propertyValue.endsWith('.svg'),
|
|
373
441
|
});
|
|
374
442
|
|
|
375
|
-
const
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
443
|
+
const primaryKey =
|
|
444
|
+
`${personalisationRole}Section` as keyof UserPersonalisationWithIndices;
|
|
445
|
+
const primarySection = personalisation[primaryKey] as
|
|
446
|
+
| UserPersonalisationSectionWithIndices
|
|
447
|
+
| undefined;
|
|
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
|
+
);
|
|
380
461
|
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
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
|
+
}
|
|
483
|
+
|
|
484
|
+
return { value: undefined, personalisation };
|
|
389
485
|
};
|
|
390
486
|
|
|
391
487
|
type ContentProperty = Record<string, string | any>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type {
|
|
2
|
-
PageStyles,
|
|
3
2
|
ButtonWithModalContent,
|
|
4
3
|
ProfileContent,
|
|
5
4
|
TextContent,
|
|
@@ -32,11 +31,9 @@ import type {
|
|
|
32
31
|
TextShapeItem,
|
|
33
32
|
TextStyleDeclaration,
|
|
34
33
|
AspectRatio,
|
|
35
|
-
LogoVariation,
|
|
36
34
|
LogoImageModel,
|
|
37
35
|
LogoTemplateImageModel,
|
|
38
36
|
CookieOptions,
|
|
39
|
-
SensitiveContent,
|
|
40
37
|
BookingSectionContent,
|
|
41
38
|
MediaTypes,
|
|
42
39
|
TextStyles,
|
|
@@ -84,8 +81,7 @@ export interface PageViewModel {
|
|
|
84
81
|
}
|
|
85
82
|
|
|
86
83
|
export interface ButtonViewModel
|
|
87
|
-
extends ContentViewModel,
|
|
88
|
-
Omit<ButtonWithModalContent, 'type'> {
|
|
84
|
+
extends ContentViewModel, Omit<ButtonWithModalContent, 'type'> {
|
|
89
85
|
styles: Omit<ButtonStyles, 'templates'>;
|
|
90
86
|
onClicked: (vm: ButtonViewModel) => void;
|
|
91
87
|
buttonLinkType: ButtonLinkType;
|
|
@@ -95,7 +91,8 @@ export interface ButtonViewModel
|
|
|
95
91
|
export type ImageViewModel = ContentViewModel & Omit<ImageContent, 'type'>;
|
|
96
92
|
|
|
97
93
|
export interface ImageGalleryViewModel
|
|
98
|
-
extends
|
|
94
|
+
extends
|
|
95
|
+
ContentViewModel,
|
|
99
96
|
Omit<ImageGalleryContent, 'type' | 'galleryStyles'> {
|
|
100
97
|
styles: GalleryStyles;
|
|
101
98
|
}
|
|
@@ -114,14 +111,12 @@ export interface LogoViewModel extends ContentViewModel {
|
|
|
114
111
|
}
|
|
115
112
|
|
|
116
113
|
export interface ProfileViewModel
|
|
117
|
-
extends ContentViewModel,
|
|
118
|
-
Omit<ProfileContent, 'type'> {
|
|
114
|
+
extends ContentViewModel, Omit<ProfileContent, 'type'> {
|
|
119
115
|
containerStyle?: BrandPageCssStyle;
|
|
120
116
|
}
|
|
121
117
|
|
|
122
118
|
export interface ShapesSectionViewModel
|
|
123
|
-
extends ContentViewModel,
|
|
124
|
-
Omit<ShapesSectionContent, 'type' | 'items'> {
|
|
119
|
+
extends ContentViewModel, Omit<ShapesSectionContent, 'type' | 'items'> {
|
|
125
120
|
items: TextShapeItem[];
|
|
126
121
|
isFullWidth: boolean;
|
|
127
122
|
}
|
|
@@ -140,41 +135,35 @@ export type VideoViewModel = ContentViewModel &
|
|
|
140
135
|
export type MapViewModel = ContentViewModel & Omit<MapContent, 'type'>;
|
|
141
136
|
|
|
142
137
|
export interface MailingListViewModel
|
|
143
|
-
extends ContentViewModel,
|
|
144
|
-
Omit<MailingListContent, 'type'> {
|
|
138
|
+
extends ContentViewModel, Omit<MailingListContent, 'type'> {
|
|
145
139
|
styles: Omit<ButtonStyles, 'templates'>;
|
|
146
140
|
}
|
|
147
141
|
|
|
148
142
|
export interface SupportMeViewModel
|
|
149
|
-
extends ContentViewModel,
|
|
150
|
-
Omit<SupportMeContent, 'type'> {
|
|
143
|
+
extends ContentViewModel, Omit<SupportMeContent, 'type'> {
|
|
151
144
|
buttonStyles: ButtonStyles;
|
|
152
145
|
}
|
|
153
146
|
|
|
154
147
|
export interface RequestPaymentViewModel
|
|
155
|
-
extends ContentViewModel,
|
|
156
|
-
Omit<RequestPaymentContent, 'type'> {
|
|
148
|
+
extends ContentViewModel, Omit<RequestPaymentContent, 'type'> {
|
|
157
149
|
buttonStyles: ButtonStyles;
|
|
158
150
|
}
|
|
159
151
|
|
|
160
152
|
export interface ShopViewModel
|
|
161
|
-
extends ContentViewModel,
|
|
162
|
-
Omit<ShopContent, 'type'> {
|
|
153
|
+
extends ContentViewModel, Omit<ShopContent, 'type'> {
|
|
163
154
|
buttonStyles: ButtonStyles;
|
|
164
155
|
isFullWidth: boolean;
|
|
165
156
|
isShippingEnabled: boolean;
|
|
166
157
|
}
|
|
167
158
|
|
|
168
159
|
export interface ContactFormViewModel
|
|
169
|
-
extends ContentViewModel,
|
|
170
|
-
Omit<ContactFormContent, 'type'> {
|
|
160
|
+
extends ContentViewModel, Omit<ContactFormContent, 'type'> {
|
|
171
161
|
buttonStyles: ButtonStyles;
|
|
172
162
|
isFullWidth: boolean;
|
|
173
163
|
}
|
|
174
164
|
|
|
175
165
|
export interface BannerSectionViewModel
|
|
176
|
-
extends ContentViewModel,
|
|
177
|
-
Omit<BannerSectionContent, 'type'> {
|
|
166
|
+
extends ContentViewModel, Omit<BannerSectionContent, 'type'> {
|
|
178
167
|
buttonViewModel: ButtonViewModel;
|
|
179
168
|
isFullWidth: boolean;
|
|
180
169
|
isBigImageType: boolean;
|
|
@@ -225,64 +214,57 @@ export interface TextImageSectionViewModel {
|
|
|
225
214
|
}
|
|
226
215
|
|
|
227
216
|
export interface TestimonialSectionViewModel
|
|
228
|
-
extends ContentViewModel,
|
|
229
|
-
Omit<TestimonialSectionContent, 'type'> {
|
|
217
|
+
extends ContentViewModel, Omit<TestimonialSectionContent, 'type'> {
|
|
230
218
|
isFullWidth: boolean;
|
|
231
219
|
}
|
|
232
220
|
|
|
233
221
|
export interface AboutSectionViewModel
|
|
234
|
-
extends ContentViewModel,
|
|
235
|
-
Omit<AboutSectionContent, 'type'> {
|
|
222
|
+
extends ContentViewModel, Omit<AboutSectionContent, 'type'> {
|
|
236
223
|
isFullWidth: boolean;
|
|
237
224
|
}
|
|
238
225
|
|
|
239
226
|
export interface SocialLinksViewModel
|
|
240
|
-
extends ContentViewModel,
|
|
241
|
-
Omit<SocialLinksContent, 'type'> {
|
|
227
|
+
extends ContentViewModel, Omit<SocialLinksContent, 'type'> {
|
|
242
228
|
isFullWidth: boolean;
|
|
243
229
|
}
|
|
244
230
|
|
|
245
231
|
export interface DividerSectionViewModel
|
|
246
|
-
extends ContentViewModel,
|
|
247
|
-
Omit<DividerSectionContent, 'type'> {
|
|
232
|
+
extends ContentViewModel, Omit<DividerSectionContent, 'type'> {
|
|
248
233
|
isFullWidth: boolean;
|
|
249
234
|
}
|
|
250
235
|
|
|
251
236
|
export interface BookingSectionViewModel
|
|
252
|
-
extends ContentViewModel,
|
|
253
|
-
Omit<BookingSectionContent, 'type'> {
|
|
237
|
+
extends ContentViewModel, Omit<BookingSectionContent, 'type'> {
|
|
254
238
|
buttonViewModel: ButtonViewModel;
|
|
255
239
|
isFullWidth: boolean;
|
|
256
240
|
}
|
|
257
241
|
|
|
258
|
-
export interface PageHeaderViewModel
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
> {
|
|
242
|
+
export interface PageHeaderViewModel extends Omit<
|
|
243
|
+
PageHeaderDesktop | PageHeaderMobile,
|
|
244
|
+
| 'logoImage'
|
|
245
|
+
| 'logoImageStyle'
|
|
246
|
+
| 'isLogoOptional'
|
|
247
|
+
| 'viewport'
|
|
248
|
+
| 'isLogoVisible'
|
|
249
|
+
| 'logoTemplateImage'
|
|
250
|
+
| 'logoImageHeight'
|
|
251
|
+
| 'logoImageWidth'
|
|
252
|
+
> {
|
|
270
253
|
logo: LogoViewModel;
|
|
271
254
|
pages: PageViewModel[];
|
|
272
255
|
}
|
|
273
256
|
|
|
274
|
-
export interface PageFooterViewModel
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
> {
|
|
257
|
+
export interface PageFooterViewModel extends Omit<
|
|
258
|
+
PageFooterDesktop | PageFooterMobile,
|
|
259
|
+
| 'logoImage'
|
|
260
|
+
| 'logoImageStyle'
|
|
261
|
+
| 'isLogoOptional'
|
|
262
|
+
| 'viewport'
|
|
263
|
+
| 'isLogoVisible'
|
|
264
|
+
| 'logoTemplateImage'
|
|
265
|
+
| 'logoImageHeight'
|
|
266
|
+
| 'logoImageWidth'
|
|
267
|
+
> {
|
|
286
268
|
logo: LogoViewModel;
|
|
287
269
|
}
|
|
288
270
|
|
|
@@ -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
|
};
|
|
@@ -15,12 +15,12 @@ export const contactCardDisplayTypeVisibilityAssessor: VisibilityAssessor<
|
|
|
15
15
|
return (
|
|
16
16
|
Boolean(
|
|
17
17
|
content?.layoutStyle &&
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
[
|
|
19
|
+
ALIGN_CARD_CENTER_IMAGE,
|
|
20
|
+
ALIGN_CARD_CENTER,
|
|
21
|
+
ALIGN_LEFT_FULL_IMAGE,
|
|
22
|
+
ALIGN_RIGHT_FULL_IMAGE,
|
|
23
|
+
].includes(content?.layoutStyle),
|
|
24
24
|
) && context!.isBrandSite
|
|
25
25
|
);
|
|
26
26
|
};
|
|
@@ -37,11 +37,11 @@ export const imageUrlVisibilityAssessor: VisibilityAssessor<
|
|
|
37
37
|
return (
|
|
38
38
|
Boolean(
|
|
39
39
|
content?.layoutStyle &&
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
[
|
|
41
|
+
ALIGN_CARD_CENTER_IMAGE,
|
|
42
|
+
ALIGN_LEFT_FULL_IMAGE,
|
|
43
|
+
ALIGN_RIGHT_FULL_IMAGE,
|
|
44
|
+
].includes(content?.layoutStyle),
|
|
45
45
|
) && context!.isBrandSite
|
|
46
46
|
);
|
|
47
47
|
};
|
|
@@ -52,9 +52,9 @@ export const contactBackgroundDisplayTypeVisibilityAssessor: VisibilityAssessor<
|
|
|
52
52
|
return (
|
|
53
53
|
Boolean(
|
|
54
54
|
content?.layoutStyle &&
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
[ALIGN_CARD_CENTER, ALIGN_CENTERED, TEXT_ONLY].includes(
|
|
56
|
+
content?.layoutStyle,
|
|
57
|
+
),
|
|
58
58
|
) && context!.isBrandSite
|
|
59
59
|
);
|
|
60
60
|
};
|
|
@@ -8,6 +8,7 @@ import { UPGRADE_CTA_LOCATIONS } from './../../composables/useEventTracker';
|
|
|
8
8
|
import { BRAND_PAGE_TYPES } from '@brand-page/models';
|
|
9
9
|
|
|
10
10
|
export default defineComponent({
|
|
11
|
+
emits: ['create-team-cards'],
|
|
11
12
|
setup() {
|
|
12
13
|
const userStore = useBrandPageMakerUserStore();
|
|
13
14
|
const brandPageMakerStore = useBrandPageMakerStore();
|
|
@@ -9,13 +9,18 @@
|
|
|
9
9
|
icon-left="stop"
|
|
10
10
|
@click="$emit('stop-generation')"
|
|
11
11
|
/>
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
<template v-else>
|
|
13
|
+
<Button
|
|
14
|
+
v-for="action in actions"
|
|
15
|
+
:key="action.type"
|
|
16
|
+
:label="action.label"
|
|
17
|
+
variant="primary"
|
|
18
|
+
size="small"
|
|
19
|
+
:icon-left="action.icon || undefined"
|
|
20
|
+
classes="ai-cta-button"
|
|
21
|
+
@click="$emit('action-click', action.type)"
|
|
22
|
+
/>
|
|
23
|
+
</template>
|
|
19
24
|
<Button
|
|
20
25
|
v-if="showRegenerateButton && !isTyping"
|
|
21
26
|
label="Regenerate"
|
|
@@ -31,24 +36,34 @@
|
|
|
31
36
|
<script setup lang="ts">
|
|
32
37
|
import { Button } from '@designcrowd/fe-shared-lib';
|
|
33
38
|
import { generateAiModalTr } from '../../../composables/useTranslate';
|
|
39
|
+
import type { AgentAction } from '../../composables/ai-chat/types';
|
|
34
40
|
|
|
35
41
|
interface Props {
|
|
36
42
|
isTyping?: boolean;
|
|
37
|
-
showUseButton?: boolean;
|
|
38
43
|
showRegenerateButton?: boolean;
|
|
39
|
-
|
|
44
|
+
actions?: AgentAction[];
|
|
40
45
|
}
|
|
41
46
|
|
|
42
47
|
withDefaults(defineProps<Props>(), {
|
|
43
48
|
isTyping: false,
|
|
44
|
-
showUseButton: false,
|
|
45
49
|
showRegenerateButton: false,
|
|
46
|
-
|
|
50
|
+
actions: () => [],
|
|
47
51
|
});
|
|
48
52
|
|
|
49
53
|
defineEmits<{
|
|
50
|
-
'use-content': [];
|
|
51
54
|
'stop-generation': [];
|
|
52
55
|
regenerate: [];
|
|
56
|
+
'action-click': [type: AgentAction['type']];
|
|
53
57
|
}>();
|
|
54
58
|
</script>
|
|
59
|
+
|
|
60
|
+
<style scoped>
|
|
61
|
+
/* The upgrade glyph (`upgrade-alt`) is a hairline faceted gem that barely reads
|
|
62
|
+
at button size. Give it a stroke in the current text colour so the icon is
|
|
63
|
+
distinguishable from afar. Scoped to the CTA button via the `ai-cta-button`
|
|
64
|
+
class passed to the design-system Button. */
|
|
65
|
+
:deep(.ai-cta-button svg path) {
|
|
66
|
+
stroke: currentColor;
|
|
67
|
+
stroke-width: 1;
|
|
68
|
+
}
|
|
69
|
+
</style>
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
:key="index"
|
|
9
9
|
v-bind="message.props"
|
|
10
10
|
:is-design-com="isDesignCom"
|
|
11
|
-
@use-text="$emit('use-text', message.props.text)"
|
|
12
11
|
@stop-generation="$emit('stop-generation')"
|
|
13
12
|
@use-image="$emit('use-image', $event)"
|
|
13
|
+
@action-click="$emit('action-click', $event)"
|
|
14
14
|
>
|
|
15
15
|
<template v-if="message.content" #default>
|
|
16
16
|
{{ message.content }}
|
|
@@ -49,6 +49,7 @@ import { ref, watch, nextTick, onMounted } from 'vue';
|
|
|
49
49
|
import { Button } from '@designcrowd/fe-shared-lib';
|
|
50
50
|
import TextBubble from './TextBubble.vue';
|
|
51
51
|
import ImageBubble from './ImageBubble.vue';
|
|
52
|
+
import type { AgentAction } from '../../composables/ai-chat/types';
|
|
52
53
|
|
|
53
54
|
interface Message {
|
|
54
55
|
type: 'text' | 'image';
|
|
@@ -82,10 +83,10 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
82
83
|
const emit = defineEmits<{
|
|
83
84
|
'update:modelValue': [value: string];
|
|
84
85
|
send: [text: string];
|
|
85
|
-
'use-text': [text: string];
|
|
86
86
|
'stop-generation': [];
|
|
87
87
|
'use-image': [images: any[]];
|
|
88
88
|
'prompt-click': [prompt: SuggestedPrompt];
|
|
89
|
+
'action-click': [type: AgentAction['type']];
|
|
89
90
|
}>();
|
|
90
91
|
|
|
91
92
|
const textareaRef = ref<HTMLTextAreaElement | null>(null);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
<!-- eslint-disable vue/no-v-html -->
|
|
1
2
|
<template>
|
|
2
3
|
<div class="tw-mb-4" :class="containerClass">
|
|
3
4
|
<div class="tw-flex" :class="containerClass">
|
|
@@ -30,12 +31,11 @@
|
|
|
30
31
|
<AiActionButtons
|
|
31
32
|
v-if="showActions || isTyping"
|
|
32
33
|
:is-typing="isTyping || isAnimating"
|
|
33
|
-
:show-use-button="showUseButton"
|
|
34
34
|
:show-regenerate-button="showRegenerateButton"
|
|
35
|
-
|
|
36
|
-
@use-content="$emit('use-text')"
|
|
35
|
+
:actions="actions"
|
|
37
36
|
@stop-generation="$emit('stop-generation')"
|
|
38
37
|
@regenerate="$emit('regenerate')"
|
|
38
|
+
@action-click="$emit('action-click', $event)"
|
|
39
39
|
>
|
|
40
40
|
<slot name="actions" />
|
|
41
41
|
</AiActionButtons>
|
|
@@ -59,13 +59,13 @@ import AiActionButtons from './AiActionButtons.vue';
|
|
|
59
59
|
import AiProgressFeed from './AiProgressFeed.vue';
|
|
60
60
|
import { generateAiModalTr } from '../../../composables/useTranslate';
|
|
61
61
|
import { type PlanItem } from '../../../clients/websocket-gateway-client';
|
|
62
|
+
import type { AgentAction } from '../../composables/ai-chat/types';
|
|
62
63
|
|
|
63
64
|
interface Props {
|
|
64
65
|
text?: string;
|
|
65
66
|
isUser?: boolean;
|
|
66
67
|
isAi?: boolean;
|
|
67
68
|
isTyping?: boolean;
|
|
68
|
-
showUseButton?: boolean;
|
|
69
69
|
showRegenerateButton?: boolean;
|
|
70
70
|
showIcon?: boolean;
|
|
71
71
|
isResponse?: boolean; // New prop to indicate if it's a response (not initial message)
|
|
@@ -75,6 +75,7 @@ interface Props {
|
|
|
75
75
|
initialMessage?: string;
|
|
76
76
|
planItems?: PlanItem[];
|
|
77
77
|
completedItemIds?: string[];
|
|
78
|
+
actions?: AgentAction[];
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
const props = withDefaults(defineProps<Props>(), {
|
|
@@ -82,7 +83,6 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
82
83
|
isUser: false,
|
|
83
84
|
isAi: false,
|
|
84
85
|
isTyping: false,
|
|
85
|
-
showUseButton: false,
|
|
86
86
|
showRegenerateButton: false,
|
|
87
87
|
showIcon: true,
|
|
88
88
|
isResponse: false,
|
|
@@ -92,12 +92,13 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
92
92
|
initialMessage: undefined,
|
|
93
93
|
planItems: () => [],
|
|
94
94
|
completedItemIds: () => [],
|
|
95
|
+
actions: () => [],
|
|
95
96
|
});
|
|
96
97
|
|
|
97
98
|
defineEmits<{
|
|
98
|
-
'use-text': [];
|
|
99
99
|
'stop-generation': [];
|
|
100
100
|
regenerate: [];
|
|
101
|
+
'action-click': [type: AgentAction['type']];
|
|
101
102
|
}>();
|
|
102
103
|
|
|
103
104
|
const copiedFeedback = ref(false);
|
|
@@ -220,7 +221,7 @@ const showActions = computed(() => {
|
|
|
220
221
|
props.isAi &&
|
|
221
222
|
!props.isTyping &&
|
|
222
223
|
!isAnimating.value &&
|
|
223
|
-
props.
|
|
224
|
+
(props.actions?.length ?? 0) > 0
|
|
224
225
|
);
|
|
225
226
|
});
|
|
226
227
|
</script>
|