@designcrowd/library.brand-page 5.19.2 → 6.0.0-undo-redo-1
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-Ekmn0O3s.js → CreatedOnBrandCrowd-de-de-Cbi1PSNS.js} +3 -3
- package/lib/src/{CreatedOnBrandCrowd-en-us-BjeXlKTS.js → CreatedOnBrandCrowd-en-us-B2ZTei1t.js} +3 -3
- package/lib/src/{CreatedOnBrandCrowd-es-es-rpNINAMY.js → CreatedOnBrandCrowd-es-es-DGz8UfQQ.js} +3 -3
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-BL4nSaLj.js → CreatedOnBrandCrowd-fr-ca-C4rUBQUM.js} +3 -3
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-BL4nSaLj.js → CreatedOnBrandCrowd-fr-fr-C4rUBQUM.js} +3 -3
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-K0r4FyYq.js → CreatedOnBrandCrowd-pt-br-Cw7sVI1F.js} +3 -3
- package/lib/src/{CreatedOnBrandCrowd-pt-br-K0r4FyYq.js → CreatedOnBrandCrowd-pt-pt-Cw7sVI1F.js} +3 -3
- package/lib/src/{CreatedOnDcom-de-de-0XYyEKYc.js → CreatedOnDcom-de-de-DPSPgKj7.js} +3 -3
- package/lib/src/{CreatedOnDcom-en-us-E8hvwiMd.js → CreatedOnDcom-en-us-AXXhwSXg.js} +3 -3
- package/lib/src/{CreatedOnDcom-es-es-pRuCd7xX.js → CreatedOnDcom-es-es-DY8bmxi_.js} +3 -3
- package/lib/src/{CreatedOnDcom-fr-ca-Bu4V3jpn.js → CreatedOnDcom-fr-ca-D3QxYtYl.js} +3 -3
- package/lib/src/{CreatedOnDcom-fr-fr-CCcrGNz2.js → CreatedOnDcom-fr-fr-KIt7qTPd.js} +3 -3
- package/lib/src/{CreatedOnDcom-pt-br-1GTvaLKd.js → CreatedOnDcom-pt-br-Bv4bHhuR.js} +3 -3
- package/lib/src/{CreatedOnDcom-pt-pt-CTIYW10X.js → CreatedOnDcom-pt-pt-NNO1huza.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 +0 -1
- package/lib/src/brand-page/components/navigation/hamburger/HamburgerNavigation.mixin.d.ts +4 -2
- package/lib/src/brand-page/components/navigation/hamburger/HamburgerNavigation.mixin.js +1 -0
- package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.d.ts +4 -2
- package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.js +5 -4
- package/lib/src/brand-page/components/page/Page.mixin.d.ts +1 -1
- package/lib/src/brand-page/components/page/PageComponent.mixin.d.ts +1 -1
- package/lib/src/brand-page/components/payment/Payment.mixin.d.ts +3 -3
- package/lib/src/brand-page/components/payment/__fixtures__/request-payment.d.ts +13 -13
- package/lib/src/brand-page/components/payment/__fixtures__/support-me.d.ts +13 -13
- package/lib/src/brand-page/constants/sections/footer-display.constants.js +1 -1
- package/lib/src/brand-page/models/index.d.ts +1 -1
- package/lib/src/brand-page/models/payment.model.d.ts +1 -1
- package/lib/src/brand-page/utils/logo.util.d.ts +14 -0
- package/lib/src/brand-page/utils/logo.util.js +19 -0
- 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 +10 -10
- 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 -170
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +2 -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 +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 +29 -30
- package/lib/src/brand-page-maker/components/upgrade-to-premium-button/UpgradeToPremiumButton.mixin.d.ts +11 -11
- package/lib/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.js +1 -1
- package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.d.ts +1 -1
- package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.js +6 -6
- package/lib/src/brand-page-maker/composables/useEventTracker.d.ts +2 -2
- package/lib/src/brand-page-maker/composables/useUndoRedoFlag.d.ts +6 -7
- package/lib/src/brand-page-maker/composables/useUndoRedoFlag.js +7 -12
- 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 +1 -1
- package/lib/src/brand-page-maker/convertors/text-image-display-style.convertor.d.ts +1 -1
- package/lib/src/brand-page-maker/convertors/text-image-display-style.convertor.js +1 -1
- package/lib/src/brand-page-maker/models/content-settings.d.ts +1 -1
- package/lib/src/brand-page-maker/models/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 +360 -360
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +4 -4
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.js +5 -5
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.d.ts +1 -1
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +5 -9
- package/lib/src/brand-page-maker/stores/history/history-store.d.ts +15 -15
- 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/brand-page-client.d.ts +16 -15
- package/lib/src/clients/media-client.d.ts +2 -2
- package/lib/src/css/library.brand-page-brandCrowd.min.css +323 -317
- package/lib/src/css/library.brand-page-brandPage.min.css +601 -317
- package/lib/src/css/library.brand-page-designCom.min.css +323 -317
- package/lib/src/css/library.brand-page-preview.min.css +579 -317
- package/lib/src/index.d.ts +1 -1
- package/lib/src/index.mjs +16 -15
- package/lib/src/{lib-BfgUqu0B.js → lib-IDusUqYG.js} +36316 -33381
- package/lib/src/lib.js +1 -1
- package/lib/src/metadata-builder/builders/reorder-pages-builder.d.ts +13 -0
- package/lib/src/metadata-builder/builders/reorder-pages-builder.js +49 -0
- package/lib/src/metadata-builder/builders/section-builders/image-gallery-builder.js +1 -1
- package/lib/src/metadata-builder/builders/section-builders/images-section-builder.js +1 -1
- package/lib/src/metadata-builder/builders/section-builders/testimonial-section-builder.js +1 -1
- package/lib/src/metadata-builder/builders/section-builders/text-section-builder.js +1 -1
- package/lib/src/metadata-builder/builders/shape-color-utils.js +1 -1
- package/lib/src/plugins/google-maps-plugin/google-maps-plugin.d.ts +1 -1
- package/lib/src/plugins/google-maps-plugin/google-maps-plugin.js +8 -8
- package/lib/src/shared/background-settings/components/background-shapes/BackgroundShapeSettings.mixin.d.ts +13 -13
- package/lib/src/shared/background-settings/store/background-settings-store.d.ts +3 -3
- package/lib/src/shared/color-picker/components/ColorPicker.mixin.d.ts +4 -2
- package/lib/src/shared/color-picker/components/ColorPicker.mixin.js +2 -2
- package/lib/src/shared/color-picker/components/ColorPickerSwatch.mixin.d.ts +4 -2
- package/lib/src/shared/color-picker/components/ColorPickerSwatch.mixin.js +1 -0
- package/lib/src/shared/confirm-modal/ConfirmModal.mixin.d.ts +5 -2
- package/lib/src/shared/confirm-modal/ConfirmModal.mixin.js +1 -0
- package/lib/src/shared/content-settings/components/GenericTextInput.mixin.d.ts +0 -1
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +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 +111 -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 +20 -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 +7 -5
- package/lib/src/shared/logo-versions/LogoVersions.mixin.js +1 -0
- package/lib/src/shared/my-designs/MyDesigns.mixin.d.ts +8 -6
- package/lib/src/shared/my-designs/MyDesigns.mixin.js +1 -0
- package/lib/src/shared/my-uploads/MyMedia.mixin.d.ts +8 -5
- package/lib/src/shared/my-uploads/MyMedia.mixin.js +1 -0
- package/lib/src/shared/my-uploads/MyUploads.mixin.d.ts +8 -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 +182 -177
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +175 -175
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.js +1 -1
- package/lib/src/shared/page-settings/store/page-settings-store.d.ts +9 -9
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +39 -39
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.js +0 -1
- package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +18 -18
- package/lib/src/shared/side-bar/components/SideBarTabButton.mixin.d.ts +6 -6
- package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +60 -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 +10 -11
- package/lib/src/shared/unsplash-library/UnsplashLibrary.mixin.d.ts +3 -4
- 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/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/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 +15 -6
- package/src/brand-page/components/page-footer/PageFooter.vue +1 -0
- package/src/brand-page/components/page-header/HeaderLayout.vue +12 -6
- package/src/brand-page/components/page-header/PageHeader.vue +1 -0
- package/src/brand-page/components/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 -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 +3 -1
- package/src/brand-page/constants/sections/footer-display.constants.ts +1 -1
- 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/logo.util.test.ts +54 -1
- package/src/brand-page/utils/logo.util.ts +23 -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/view-models.ts +38 -56
- package/src/brand-page-maker/assessors/banner-section-description-visibility.assessor.ts +6 -6
- package/src/brand-page-maker/assessors/color-replacement-icon-visibility.assessor.ts +2 -2
- package/src/brand-page-maker/assessors/color-replacement-profile-visibility.assessor.ts +2 -2
- package/src/brand-page-maker/assessors/color-replacement-visibility.assessor.ts +2 -2
- package/src/brand-page-maker/assessors/contact-form-visibility.assessor.ts +14 -14
- package/src/brand-page-maker/components/action-bar/ActionBar.mixin.ts +1 -0
- package/src/brand-page-maker/components/ai-text-edit/TextBubble.vue +1 -0
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +2 -2
- 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/video-play/VideoPlayButton.vue +1 -1
- package/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.ts +1 -1
- package/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.ts +6 -6
- package/src/brand-page-maker/composables/useUndoRedoFlag.ts +7 -13
- package/src/brand-page-maker/constants/config-settings-constant.ts +3 -3
- 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 +3 -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 +4 -20
- 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/lib.ts +1 -0
- package/src/metadata-builder/builders/reorder-pages-builder.ts +80 -0
- package/src/metadata-builder/builders/section-builders/image-gallery-builder.ts +1 -1
- package/src/metadata-builder/builders/section-builders/images-section-builder.ts +1 -1
- package/src/metadata-builder/builders/section-builders/testimonial-section-builder.ts +1 -1
- package/src/metadata-builder/builders/section-builders/text-section-builder.ts +1 -1
- package/src/metadata-builder/builders/shape-color-utils.ts +2 -2
- package/src/plugins/google-maps-plugin/google-maps-plugin.ts +8 -8
- package/src/shared/background-settings/components/BackgroundSettings.vue +1 -1
- package/src/shared/background-settings/components/background-color/BackgroundColorSettings.vue +1 -1
- package/src/shared/color-picker/components/ColorPicker.mixin.ts +2 -7
- package/src/shared/color-picker/components/ColorPickerSwatch.mixin.ts +1 -0
- package/src/shared/common/NumberInput.vue +1 -0
- package/src/shared/common/SideBarSettingsHeader.vue +2 -2
- package/src/shared/confirm-modal/ConfirmModal.mixin.ts +1 -0
- package/src/shared/content-settings/components/booking-url-field/BookingUrlField.vue +1 -0
- package/src/shared/content-settings/components/button-configuration-field/ButtonConfigurationField.vue +1 -0
- package/src/shared/content-settings/components/color-field/ColorField.vue +3 -10
- package/src/shared/content-settings/components/content-settings/ContentSettings.mixin.ts +1 -1
- package/src/shared/content-settings/components/content-settings/ContentSettingsLockedButton.vue +1 -0
- package/src/shared/content-settings/components/content-settings-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/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/unsplash-library/UnsplashLibrary.vue +2 -6
- package/src/shared/video-library/VideoLibrary.vue +1 -1
|
@@ -552,6 +552,7 @@ const availableTextFontFamilyOptions = computed(
|
|
|
552
552
|
() => styleSettingsStore.availableTextFontFamilyOptions,
|
|
553
553
|
);
|
|
554
554
|
|
|
555
|
+
// eslint-disable-next-line vue/require-prop-types
|
|
555
556
|
const model = defineModel();
|
|
556
557
|
const emit = defineEmits([
|
|
557
558
|
'focus',
|
|
@@ -709,7 +710,8 @@ watch(
|
|
|
709
710
|
() =>
|
|
710
711
|
contentSettingStore.getItem(props.rawId)?.settings?.content?.textItemsStyle
|
|
711
712
|
?.color,
|
|
712
|
-
|
|
713
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
714
|
+
(_newColor) => {
|
|
713
715
|
if (isAdmin.value) {
|
|
714
716
|
if (props.textItemIndex !== undefined && selectedGlobalTextStyles) {
|
|
715
717
|
toggleTextColor.value =
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
</template>
|
|
93
93
|
<script setup lang="ts">
|
|
94
94
|
import { Button } from '@designcrowd/fe-shared-lib';
|
|
95
|
-
import { computed, reactive, nextTick
|
|
95
|
+
import { computed, reactive, nextTick } from 'vue';
|
|
96
96
|
import {
|
|
97
97
|
SENSITIVE_CONTENT_TYPES,
|
|
98
98
|
type SensitiveContent,
|
|
@@ -109,9 +109,6 @@ const brandPageMakerStore = useBrandPageMakerStore();
|
|
|
109
109
|
|
|
110
110
|
const props = defineProps<Props>();
|
|
111
111
|
|
|
112
|
-
const isBrandPage = computed(() => brandPageMakerStore.isBrandPage);
|
|
113
|
-
const isBrandContact = computed(() => brandPageMakerStore.isBrandContact);
|
|
114
|
-
|
|
115
112
|
const data = reactive({
|
|
116
113
|
sensitiveSettings: [
|
|
117
114
|
{
|
|
@@ -59,7 +59,7 @@ interface Props {
|
|
|
59
59
|
isCustomDomainRequestFailed?: boolean;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
defineProps<Props>();
|
|
63
63
|
const emit = defineEmits<{ (e: 'on-confirm'): void; (e: 'on-cancel'): void }>();
|
|
64
64
|
|
|
65
65
|
const emitConfirm = () => emit('on-confirm');
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
<script>
|
|
107
107
|
import { Button, TextInput, Textarea } from '@designcrowd/fe-shared-lib';
|
|
108
108
|
import SeoPageSettingsMixin from './SeoPageSettings.mixin.ts';
|
|
109
|
-
import {
|
|
109
|
+
import { commonTr, seoSettingsTr } from '@src/composables/useTranslate';
|
|
110
110
|
|
|
111
111
|
export default {
|
|
112
112
|
components: {
|
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
useBrandPageContainerStore,
|
|
10
10
|
useBrandPageMakerStore,
|
|
11
11
|
useLocalisedRouteStore,
|
|
12
|
-
useBrandPageMakerUserStore,
|
|
13
12
|
} from '@brand-page-maker/stores';
|
|
14
13
|
import { defaultUSDCurrency } from '@brand-page-maker/constants/currency-constants';
|
|
15
14
|
import { validateCustomDomainName } from '@brand-page-maker/utils';
|
|
@@ -393,7 +393,6 @@ import { Button, Loader, TextInput } from '@designcrowd/fe-shared-lib';
|
|
|
393
393
|
import { SellDomainNameWidget } from '@designcrowd/fe-shared-lib';
|
|
394
394
|
import UrlSettingsMixin from './UrlSettings.mixin.ts';
|
|
395
395
|
import DeleteDomainModal from './DeleteDomainModal.vue';
|
|
396
|
-
import ConfirmModal from '@shared/confirm-modal/ConfirmModal.vue';
|
|
397
396
|
import UseExistingDomainModal from './UseExistingDomainModal.vue';
|
|
398
397
|
import { commonTr, seoSettingsTr } from '@src/composables/useTranslate';
|
|
399
398
|
|
|
@@ -178,11 +178,7 @@ import {
|
|
|
178
178
|
Loader,
|
|
179
179
|
} from '@designcrowd/fe-shared-lib';
|
|
180
180
|
import UseExistingDomainModalMixin from './UseExistingDomainModal.mixin.ts';
|
|
181
|
-
import {
|
|
182
|
-
tr,
|
|
183
|
-
commonTr,
|
|
184
|
-
existingDomainModalTr,
|
|
185
|
-
} from '@src/composables/useTranslate';
|
|
181
|
+
import { commonTr, existingDomainModalTr } from '@src/composables/useTranslate';
|
|
186
182
|
|
|
187
183
|
export default {
|
|
188
184
|
components: {
|
|
@@ -172,7 +172,7 @@ const enableNotes = computed(() => productSettingStore.productEnableNotes);
|
|
|
172
172
|
const hasVariants = computed(() => productSettingStore.productHasVariants);
|
|
173
173
|
const currencySymbol = computed(() => shopConfigStore.currencySymbol);
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
defineEmits(['update:modelValue']);
|
|
176
176
|
|
|
177
177
|
const onImageUpload = () => {
|
|
178
178
|
productSettingStore.setImageUpload(true);
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
import type { UserMediaItemWithDimensions } from 'src/shared/my-uploads/models';
|
|
26
26
|
const productSettingStore = useProductConfigStore();
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
defineEmits(['on-close', 'on-save']);
|
|
29
29
|
|
|
30
30
|
const onBack = () => {
|
|
31
31
|
productSettingStore.setImageUpload(false);
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
<!-- End Loader Overlay -->
|
|
56
56
|
</template>
|
|
57
57
|
<script>
|
|
58
|
-
import {
|
|
58
|
+
import { Loader, TextInput } from '@designcrowd/fe-shared-lib';
|
|
59
59
|
import SocialShareMixin from './SocialShare.mixin';
|
|
60
60
|
import ImageField from '@shared/content-settings/components/image-field/ImageField.vue';
|
|
61
61
|
import { socialShareTr, commonTr } from '@src/composables/useTranslate';
|
|
@@ -628,15 +628,15 @@ export const useRichTextEditor = (
|
|
|
628
628
|
);
|
|
629
629
|
fontSettings.selectedTextColor = hasLogoColorVar(globalStyles.color ?? '')
|
|
630
630
|
? '#000000'
|
|
631
|
-
: globalStyles?.color ?? '#000000';
|
|
631
|
+
: (globalStyles?.color ?? '#000000');
|
|
632
632
|
fontSettings.selectedBackgroundColor = hasLogoColorVar(
|
|
633
633
|
globalStyles?.backgroundColor ?? '',
|
|
634
634
|
)
|
|
635
635
|
? 'transparent'
|
|
636
|
-
: globalStyles?.backgroundColor ?? 'transparent';
|
|
636
|
+
: (globalStyles?.backgroundColor ?? 'transparent');
|
|
637
637
|
lineHeight.value = globalStyles?.lineHeight?.includes('em')
|
|
638
638
|
? emToPx(globalStyles?.lineHeight ?? '1em')
|
|
639
|
-
: globalStyles?.lineHeight ?? '1';
|
|
639
|
+
: (globalStyles?.lineHeight ?? '1');
|
|
640
640
|
letterSpacing.value = letterSpacingValueConvertor.convert(
|
|
641
641
|
globalStyles ?? {},
|
|
642
642
|
);
|
|
@@ -658,15 +658,15 @@ export const useRichTextEditor = (
|
|
|
658
658
|
props.styles?.color ?? '#000000',
|
|
659
659
|
)
|
|
660
660
|
? '#000000'
|
|
661
|
-
: props.styles?.color ?? '#000000';
|
|
661
|
+
: (props.styles?.color ?? '#000000');
|
|
662
662
|
fontSettings.selectedBackgroundColor = hasLogoColorVar(
|
|
663
663
|
props.styles?.backgroundColor ?? '',
|
|
664
664
|
)
|
|
665
665
|
? 'transparent'
|
|
666
|
-
: props.styles?.backgroundColor ?? 'transparent';
|
|
666
|
+
: (props.styles?.backgroundColor ?? 'transparent');
|
|
667
667
|
lineHeight.value = props.styles?.lineHeight?.includes('em')
|
|
668
668
|
? emToPx(props.styles?.lineHeight ?? '1em')
|
|
669
|
-
: props.styles?.lineHeight ?? '1';
|
|
669
|
+
: (props.styles?.lineHeight ?? '1');
|
|
670
670
|
letterSpacing.value = letterSpacingValueConvertor.convert(
|
|
671
671
|
props.styles ?? {},
|
|
672
672
|
);
|
|
@@ -1,30 +1,24 @@
|
|
|
1
1
|
import { computed, type ComputedRef } from 'vue';
|
|
2
2
|
import { useBrandPageMakerUserStore } from '@brand-page-maker/stores/user';
|
|
3
|
-
import { useBrandPageMakerStore } from '@brand-page-maker/stores/brandpage-maker/brandpage-maker-store';
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
|
-
* Returns whether undo/redo is active for the current maker session.
|
|
7
|
-
*
|
|
5
|
+
* Returns whether undo/redo is active for the current maker session. Both
|
|
6
|
+
* conditions must hold:
|
|
8
7
|
*
|
|
9
8
|
* 1. `userStore.features.canUseUndoRedo` is true. The flag is populated by
|
|
10
9
|
* the consumer (BrandCrowd.Net / web-renderer) via the
|
|
11
10
|
* `WebsiteDesignUserFeatures.CanUseUndoRedo` boolean on the ViewModel —
|
|
12
|
-
* same precedent as RichTextEditor / GettyVideos / AITextGenerator.
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* 3. The session is NOT in admin-maker mode (`userStore.isAdmin`). The
|
|
11
|
+
* same precedent as RichTextEditor / GettyVideos / AITextGenerator. The
|
|
12
|
+
* one flag governs all three brands (brand-site, brand-page,
|
|
13
|
+
* brand-contact) — there is no per-brand gating.
|
|
14
|
+
* 2. The session is NOT in admin-maker mode (`userStore.isAdmin`). The
|
|
17
15
|
* admin maker uses the same components but a different editing flow
|
|
18
16
|
* (template authoring) where undo/redo is out of scope.
|
|
19
17
|
*/
|
|
20
18
|
export function useUndoRedoFlag(): ComputedRef<boolean> {
|
|
21
19
|
const userStore = useBrandPageMakerUserStore();
|
|
22
|
-
const brandPageMakerStore = useBrandPageMakerStore();
|
|
23
20
|
|
|
24
21
|
return computed(
|
|
25
|
-
() =>
|
|
26
|
-
userStore.features.canUseUndoRedo &&
|
|
27
|
-
brandPageMakerStore.isBrandSite &&
|
|
28
|
-
!userStore.isAdmin,
|
|
22
|
+
() => userStore.features.canUseUndoRedo && !userStore.isAdmin,
|
|
29
23
|
);
|
|
30
24
|
}
|
|
@@ -446,9 +446,9 @@ const shopReplaceImageSettings =
|
|
|
446
446
|
titleReplace: contentSettingsTr(`imageReplaceTitle`),
|
|
447
447
|
contentMediaFieldName: MediaFieldNames.requestPaymentConfig,
|
|
448
448
|
setContentMedia: (
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
449
|
+
_content: ShopContent,
|
|
450
|
+
_value: SetContentMediaPayload,
|
|
451
|
+
_index?: number,
|
|
452
452
|
) => '',
|
|
453
453
|
openByDefault: false,
|
|
454
454
|
mediaType: null,
|
|
@@ -15,8 +15,10 @@ export const ButtonStyleConfigOptions = [
|
|
|
15
15
|
|
|
16
16
|
export type ButtonStyleConfigOption = (typeof ButtonStyleConfigOptions)[number];
|
|
17
17
|
|
|
18
|
-
export interface ButtonStyleConfig
|
|
19
|
-
|
|
18
|
+
export interface ButtonStyleConfig extends Omit<
|
|
19
|
+
ButtonStyles,
|
|
20
|
+
'style' | 'template' | 'selectedButtonStyleId'
|
|
21
|
+
> {
|
|
20
22
|
readonly id: string;
|
|
21
23
|
readonly hasShadow: boolean;
|
|
22
24
|
readonly hasSoftShadow?: boolean;
|
|
@@ -156,8 +156,10 @@ export interface ContentSettingsField<TContent> {
|
|
|
156
156
|
styleName?: string;
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
export interface ContentSettingsMultiField<TContent, TField>
|
|
160
|
-
|
|
159
|
+
export interface ContentSettingsMultiField<TContent, TField> extends Omit<
|
|
160
|
+
ContentSettingsField<TContent>,
|
|
161
|
+
'type' | 'role'
|
|
162
|
+
> {
|
|
161
163
|
type: ItemMultiFieldType;
|
|
162
164
|
role: 'multi';
|
|
163
165
|
fields?: {
|
|
@@ -14,7 +14,7 @@ import type {
|
|
|
14
14
|
import type { PageSection } from '@shared/page-settings/models';
|
|
15
15
|
import { PAGE_SECTIONS } from '@shared/page-settings/models';
|
|
16
16
|
import type { ButtonGroupOption } from './button-group.model';
|
|
17
|
-
import {
|
|
17
|
+
import { commonTr, modelsTr } from '@src/composables/useTranslate';
|
|
18
18
|
|
|
19
19
|
export const NavigationStyleConfigOptions = {
|
|
20
20
|
defaultBorderColor: 'defaultBorderColor',
|
|
@@ -46,11 +46,10 @@ export const NAVIGATION_STYLE_CONFIG_OPTION_TITLES = (): Record<
|
|
|
46
46
|
subNavBackgroundColor: modelsTr('subNavBackgroundColor'),
|
|
47
47
|
});
|
|
48
48
|
|
|
49
|
-
export interface NavigationStyleConfig
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
> {
|
|
49
|
+
export interface NavigationStyleConfig extends Omit<
|
|
50
|
+
NavigationDesktop | NavigationMobile,
|
|
51
|
+
'isLogoVisible' | 'hamburgerMenuStyle' | 'viewport'
|
|
52
|
+
> {
|
|
54
53
|
buttonGroupOption: ButtonGroupOption;
|
|
55
54
|
options: NavigationStyleConfigOption[];
|
|
56
55
|
}
|
|
@@ -21,7 +21,6 @@ import {
|
|
|
21
21
|
BRAND_PAGE_TYPES,
|
|
22
22
|
SENSITIVE_CONTENT_TYPES,
|
|
23
23
|
getAbTestResults,
|
|
24
|
-
getValueType,
|
|
25
24
|
type AbTest,
|
|
26
25
|
type LogoContent,
|
|
27
26
|
} from '@brand-page';
|
|
@@ -34,7 +33,6 @@ import {
|
|
|
34
33
|
TRIGGER_TYPE,
|
|
35
34
|
UPGRADE_CTA_LOCATIONS,
|
|
36
35
|
useEventTracker,
|
|
37
|
-
EVENTS,
|
|
38
36
|
} from '@brand-page-maker/composables/useEventTracker';
|
|
39
37
|
import { navigationTr } from '@src/composables/useTranslate';
|
|
40
38
|
import type { WebsiteSlugCheckResponse } from '@brand-page-maker/models/api.model';
|
|
@@ -451,7 +449,7 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
451
449
|
|
|
452
450
|
async publishBrandPage({ shouldPublish, slug }) {
|
|
453
451
|
const brandPageMakerStore = useBrandPageMakerStore();
|
|
454
|
-
const
|
|
452
|
+
const _eventTracker = useEventTracker();
|
|
455
453
|
|
|
456
454
|
if (!this.designDraftToken) {
|
|
457
455
|
throw new Error(
|
|
@@ -558,7 +556,7 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
558
556
|
isPurchasedDomain,
|
|
559
557
|
}) {
|
|
560
558
|
const brandPageMakerStore = useBrandPageMakerStore();
|
|
561
|
-
const
|
|
559
|
+
const _eventTracker = useEventTracker();
|
|
562
560
|
|
|
563
561
|
if (!this.designDraftToken) {
|
|
564
562
|
throw new Error(
|
|
@@ -892,7 +890,7 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
892
890
|
) {
|
|
893
891
|
const userStore = useBrandPageMakerUserStore();
|
|
894
892
|
const brandPageMakerStore = useBrandPageMakerStore();
|
|
895
|
-
const
|
|
893
|
+
const _eventTracker = useEventTracker();
|
|
896
894
|
|
|
897
895
|
if (userStore.isAdmin) {
|
|
898
896
|
throw new Error('save brand page is not allowed in admin mode');
|
|
@@ -2,7 +2,6 @@ import { vi } from 'vitest';
|
|
|
2
2
|
import {
|
|
3
3
|
BRAND_PAGE,
|
|
4
4
|
INITIALISE_PAYLOAD,
|
|
5
|
-
USER_FEATURES,
|
|
6
5
|
userFeatures,
|
|
7
6
|
} from '../../components/brand-page-maker/__fixtures__';
|
|
8
7
|
import {
|
|
@@ -44,6 +43,7 @@ import { useUiBackgroundSettingsStore } from '@shared/background-settings/store'
|
|
|
44
43
|
import { useBrandPageMakerUserStore } from '../user';
|
|
45
44
|
import { useBrandPageContainerStore } from '../brandpage-container';
|
|
46
45
|
import { useUiTemplateSettingsStore } from '@shared/template-settings/store';
|
|
46
|
+
import { usePageNavigationStore } from '@shared/page-navigation/store/page-navigation-store';
|
|
47
47
|
import {
|
|
48
48
|
CONTENT_SETTINGS_MODES,
|
|
49
49
|
useUiContentSettingsStore,
|
|
@@ -54,8 +54,6 @@ import { SIDE_BAR_TAB_NAMES } from '@brand-page-maker/constants';
|
|
|
54
54
|
import { PAGE_SECTIONS } from '@shared/page-settings/models';
|
|
55
55
|
import { FabricRenderClient } from '../../../clients/fabric-render-client';
|
|
56
56
|
import { setLocaleAsync } from '@src/composables/useTranslate';
|
|
57
|
-
import { usePageNavigationStore } from '@shared/page-navigation/store/page-navigation-store';
|
|
58
|
-
import type { NavModel } from '@brand-page/models';
|
|
59
57
|
|
|
60
58
|
const createInitialisePayload = () => {
|
|
61
59
|
const initialisePayload = {
|
|
@@ -23,14 +23,12 @@ import {
|
|
|
23
23
|
CONTENT_TYPES,
|
|
24
24
|
NavigationDesktop,
|
|
25
25
|
NavigationMobile,
|
|
26
|
-
NavModel,
|
|
27
26
|
} from '@brand-page';
|
|
28
27
|
import type {
|
|
29
28
|
DesignTemplateType,
|
|
30
29
|
InitialCategories,
|
|
31
30
|
TemplateCategory,
|
|
32
31
|
} from '@shared/template-settings/models';
|
|
33
|
-
import type { UserFeatures } from '../user';
|
|
34
32
|
import { useBrandPageMakerUserStore } from '../user';
|
|
35
33
|
import { defineStore } from 'pinia';
|
|
36
34
|
import { toRaw } from 'vue';
|
|
@@ -947,14 +945,7 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
947
945
|
}
|
|
948
946
|
}
|
|
949
947
|
|
|
950
|
-
const logoImage =
|
|
951
|
-
snapshot.brandPageType === BRAND_PAGE_TYPES.default
|
|
952
|
-
? (
|
|
953
|
-
snapshot.pages?.[0]?.contents?.find(
|
|
954
|
-
(c) => c.type === 'logo',
|
|
955
|
-
) as any
|
|
956
|
-
)?.logoImage
|
|
957
|
-
: snapshot.pageHeaderDesktop?.logoImage;
|
|
948
|
+
const logoImage = logoUtil.getLogoImageFromModel(snapshot);
|
|
958
949
|
|
|
959
950
|
if (!logoImage) return;
|
|
960
951
|
|
|
@@ -1238,7 +1229,7 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
1238
1229
|
industry,
|
|
1239
1230
|
layout,
|
|
1240
1231
|
logoVariationImageUrls,
|
|
1241
|
-
shopConfigData,
|
|
1232
|
+
shopConfigData: _shopConfigData,
|
|
1242
1233
|
isServerRenderOverride = false,
|
|
1243
1234
|
}: InitialisePayload) {
|
|
1244
1235
|
const brandPageContainerStore = useBrandPageContainerStore();
|
|
@@ -1250,7 +1241,7 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
1250
1241
|
const backgroundSettingsStore = useUiBackgroundSettingsStore();
|
|
1251
1242
|
const styleSettingsStore = useUiStyleSettingsStore();
|
|
1252
1243
|
const navigationStyleSettingsStore = useUiNavigationStyleSettingsStore();
|
|
1253
|
-
const
|
|
1244
|
+
const _sideBarStore = useUiSideBarStore();
|
|
1254
1245
|
|
|
1255
1246
|
navigationStyleSettingsStore.initialise({ reset: false });
|
|
1256
1247
|
|
|
@@ -1275,14 +1266,7 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
1275
1266
|
brandPageType: _brandPageType,
|
|
1276
1267
|
});
|
|
1277
1268
|
|
|
1278
|
-
let logoImage =
|
|
1279
|
-
brandPageModel.brandPageType === BRAND_PAGE_TYPES.default
|
|
1280
|
-
? (
|
|
1281
|
-
brandPageModel.pages?.[0].contents.find(
|
|
1282
|
-
(c) => c.type === 'logo',
|
|
1283
|
-
) as any
|
|
1284
|
-
)?.logoImage
|
|
1285
|
-
: brandPageModel.pageHeaderDesktop?.logoImage;
|
|
1269
|
+
let logoImage = logoUtil.getLogoImageFromModel(brandPageModel);
|
|
1286
1270
|
|
|
1287
1271
|
if (!logoImage?.logoDraftToken) {
|
|
1288
1272
|
logoImage = logoUtil.safeGetLogoImageFromLogoImageUrl(
|
|
@@ -7,7 +7,7 @@ import type {
|
|
|
7
7
|
ContentSettingsConfig,
|
|
8
8
|
CreateInitialContentOptions,
|
|
9
9
|
} from '../models';
|
|
10
|
-
import {
|
|
10
|
+
import { type Content } from '@brand-page';
|
|
11
11
|
import { RESERVED_FIELD_NAMES } from '@shared/content-settings/constants';
|
|
12
12
|
import { CONTENT_SETTINGS_CONFIGS } from '../constants';
|
|
13
13
|
import type { UIUserFeatures } from '@src/constants/ui';
|
|
@@ -431,7 +431,7 @@ const transformRTEField = (
|
|
|
431
431
|
if (textStyleType && (textStyleType === type || uiStyleSettingsStore)) {
|
|
432
432
|
let globalContentStyle = uiStyleSettingsStore
|
|
433
433
|
? uiStyleSettingsStore.textStyles.textStyleOptions[textStyleType].style
|
|
434
|
-
: newStyle ?? ({} as TextStyleDeclaration);
|
|
434
|
+
: (newStyle ?? ({} as TextStyleDeclaration));
|
|
435
435
|
|
|
436
436
|
globalContentStyle = {
|
|
437
437
|
...globalContentStyle,
|
|
@@ -549,7 +549,7 @@ export const transformToRTE = (
|
|
|
549
549
|
? uiStyleSettingsStore.textStyles.textStyleOptions[
|
|
550
550
|
textItemStyleType
|
|
551
551
|
].style
|
|
552
|
-
: newStyle ?? ({} as TextStyleDeclaration);
|
|
552
|
+
: (newStyle ?? ({} as TextStyleDeclaration));
|
|
553
553
|
|
|
554
554
|
globalContentStyle = {
|
|
555
555
|
...globalContentStyle,
|
|
@@ -593,7 +593,7 @@ export const transformToRTE = (
|
|
|
593
593
|
let globalContentStyle = uiStyleSettingsStore
|
|
594
594
|
? uiStyleSettingsStore.textStyles.textStyleOptions[textStyleType]
|
|
595
595
|
.style
|
|
596
|
-
: newStyle ?? ({} as TextStyleDeclaration);
|
|
596
|
+
: (newStyle ?? ({} as TextStyleDeclaration));
|
|
597
597
|
|
|
598
598
|
globalContentStyle = {
|
|
599
599
|
...globalContentStyle,
|
|
@@ -647,7 +647,7 @@ export const switchAllContentToRTE = (
|
|
|
647
647
|
|
|
648
648
|
if (textContent.textItems && textContent.textItems.length > 0) {
|
|
649
649
|
for (const [
|
|
650
|
-
|
|
650
|
+
_itemIndex,
|
|
651
651
|
textItemContent,
|
|
652
652
|
] of textContent.textItems.entries()) {
|
|
653
653
|
const textItemStyleType = textItemContent.textStyle.textStyleType;
|
package/src/lib.ts
CHANGED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { BrandPageModel, NavOrder } from '../../brand-page/models';
|
|
2
|
+
import {
|
|
3
|
+
BaseMetadataBuilder,
|
|
4
|
+
type BuilderResult,
|
|
5
|
+
type MetadataBuilderRequest,
|
|
6
|
+
} from '../models';
|
|
7
|
+
import type { Logger } from '../logger';
|
|
8
|
+
|
|
9
|
+
export interface ReorderPagesPayload {
|
|
10
|
+
pageOrder: string[];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export class ReorderPagesBuilder extends BaseMetadataBuilder<ReorderPagesPayload> {
|
|
14
|
+
constructor(
|
|
15
|
+
request: MetadataBuilderRequest<ReorderPagesPayload>,
|
|
16
|
+
logger?: Logger,
|
|
17
|
+
) {
|
|
18
|
+
super(request, logger);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
async validateAsync(): Promise<{ errors: string[] }> {
|
|
22
|
+
const errors: string[] = [];
|
|
23
|
+
const payload = this.request.payload;
|
|
24
|
+
|
|
25
|
+
if (!payload?.pageOrder?.length) {
|
|
26
|
+
errors.push('page_order is required for reorder_pages');
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return { errors };
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
async buildAsync(model: BrandPageModel): Promise<BuilderResult> {
|
|
33
|
+
this.log('Build called');
|
|
34
|
+
|
|
35
|
+
const validation = await this.validateAsync();
|
|
36
|
+
|
|
37
|
+
if (validation.errors.length) {
|
|
38
|
+
return { request: this.request, model, errors: validation.errors };
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const { pageOrder } = this.request.payload!;
|
|
42
|
+
|
|
43
|
+
// Build pageId → routeId lookup from nav.routes
|
|
44
|
+
const pageIdToRouteId = new Map<string, string>();
|
|
45
|
+
|
|
46
|
+
for (const route of model.nav.routes) {
|
|
47
|
+
pageIdToRouteId.set(route.pageId, route.id);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Build new nav.orders from the flat page_order (array of pageIds)
|
|
51
|
+
const newOrders: NavOrder[] = [];
|
|
52
|
+
const seenRouteIds = new Set<string>();
|
|
53
|
+
|
|
54
|
+
for (const pageId of pageOrder) {
|
|
55
|
+
const routeId = pageIdToRouteId.get(pageId);
|
|
56
|
+
|
|
57
|
+
if (!routeId) continue;
|
|
58
|
+
|
|
59
|
+
newOrders.push({ routeId, subRoutes: [] });
|
|
60
|
+
seenRouteIds.add(routeId);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Safety: append any routes not mentioned (don't lose pages)
|
|
64
|
+
for (const route of model.nav.routes) {
|
|
65
|
+
const routeId = pageIdToRouteId.get(route.pageId);
|
|
66
|
+
|
|
67
|
+
if (routeId && !seenRouteIds.has(routeId)) {
|
|
68
|
+
newOrders.push({ routeId, subRoutes: [] });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
model.nav.orders = newOrders;
|
|
73
|
+
|
|
74
|
+
this.log({
|
|
75
|
+
message: `Reordered pages: ${pageOrder.join(', ')}`,
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
return { request: this.request, model };
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -80,7 +80,7 @@ const mergeImageItems = (
|
|
|
80
80
|
...(existing || {}),
|
|
81
81
|
imageUrl: isValidUrl(item.image_url)
|
|
82
82
|
? item.image_url!
|
|
83
|
-
: existing?.imageUrl ?? '',
|
|
83
|
+
: (existing?.imageUrl ?? ''),
|
|
84
84
|
imageTitle: existing?.imageTitle ?? '',
|
|
85
85
|
width: existing?.width ?? 0,
|
|
86
86
|
height: existing?.height ?? 0,
|
|
@@ -128,7 +128,7 @@ const mergeTextItems = (
|
|
|
128
128
|
) as TextStyleDeclaration;
|
|
129
129
|
|
|
130
130
|
const resolved = item.text !== undefined ? resolveText(item.text) : null;
|
|
131
|
-
const text = resolved ? resolved.html : existing?.text ?? '';
|
|
131
|
+
const text = resolved ? resolved.html : (existing?.text ?? '');
|
|
132
132
|
|
|
133
133
|
return {
|
|
134
134
|
text,
|
|
@@ -68,8 +68,8 @@ export const applyColorThemeToReplacements = (
|
|
|
68
68
|
replacementColor:
|
|
69
69
|
replacements.length === 1
|
|
70
70
|
? colorTheme
|
|
71
|
-
: getNewColorBasedOnTargetColorTheme(
|
|
71
|
+
: (getNewColorBasedOnTargetColorTheme(
|
|
72
72
|
r.originalColor,
|
|
73
73
|
colorTheme,
|
|
74
|
-
)?.toString() ?? colorTheme,
|
|
74
|
+
)?.toString() ?? colorTheme),
|
|
75
75
|
}));
|