@designcrowd/library.brand-page 5.18.6 → 5.18.7-ast-padding-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-DlYq1LAT.js → CreatedOnBrandCrowd-de-de-Cn8zNuGM.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-BssRIQqn.js → CreatedOnBrandCrowd-en-us-CP8xAFc-.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-BGF9pptH.js → CreatedOnBrandCrowd-es-es-Ds8NijwP.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-Caupqu2Z.js → CreatedOnBrandCrowd-fr-ca-BiVV_7lj.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-Caupqu2Z.js → CreatedOnBrandCrowd-fr-fr-BiVV_7lj.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-s9q4uJ4u.js → CreatedOnBrandCrowd-pt-br-CjjrYojo.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-s9q4uJ4u.js → CreatedOnBrandCrowd-pt-pt-CjjrYojo.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-UnYnZbA7.js → CreatedOnDcom-de-de-ChR5jvlP.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-rDv6H12L.js → CreatedOnDcom-en-us-C4rO1BMA.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-DKPLaT6o.js → CreatedOnDcom-es-es-DxGMS6JK.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-DAv34bG7.js → CreatedOnDcom-fr-ca-n31u4t7u.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-DsOHnS8q.js → CreatedOnDcom-fr-fr-gwdsX7YV.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-DpjDBCLj.js → CreatedOnDcom-pt-br-iZjFp--s.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-rFG0unf1.js → CreatedOnDcom-pt-pt-B3Z3-RLC.js} +1 -1
- package/lib/src/brand-page/components/contact-form/ContactForm.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/contact-form/ContactForm.mixin.js +8 -4
- package/lib/src/brand-page/components/image-gallery/ImageGallery.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/image-gallery/ImageGallery.mixin.js +4 -0
- package/lib/src/brand-page/components/mailing-list/MailingList.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/mailing-list/MailingList.mixin.js +4 -1
- package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.js +4 -0
- package/lib/src/brand-page/components/payment/support-me/SupportMe.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/payment/support-me/SupportMe.mixin.js +4 -1
- package/lib/src/brand-page/components/video/Video.mixin.d.ts +4 -0
- package/lib/src/brand-page/components/video/Video.mixin.js +4 -0
- package/lib/src/brand-page/constants/misc.constants.d.ts +26 -0
- package/lib/src/brand-page/constants/misc.constants.js +42 -0
- package/lib/src/brand-page/models/content.model.d.ts +2 -0
- package/lib/src/brand-page/utils/content-padding.util.d.ts +13 -0
- package/lib/src/brand-page/utils/content-padding.util.js +10 -0
- package/lib/src/brand-page/utils/index.d.ts +1 -0
- package/lib/src/brand-page/utils/index.js +1 -0
- package/lib/src/brand-page/utils/migration/migration-17.d.ts +2 -0
- package/lib/src/brand-page/utils/migration/migration-17.js +48 -0
- package/lib/src/brand-page/utils/migration.util.js +10 -0
- package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +7 -2
- package/lib/src/brand-page-maker/components/admin-logo-settings/AdminLogoSettings.mixin.d.ts +2 -0
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +19 -2
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +8 -0
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.d.ts +7 -2
- package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.js +1 -0
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +104 -2
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.js +5 -0
- package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.d.ts +7 -2
- package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.d.ts +3 -0
- package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.js +11 -0
- package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +7 -2
- package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +7 -2
- package/lib/src/brand-page-maker/components/social-share/SocialShare.mixin.d.ts +7 -2
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +7 -2
- package/lib/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.js +9 -0
- package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.js +21 -1
- package/lib/src/brand-page-maker/composables/useEventTracker.d.ts +20 -0
- package/lib/src/brand-page-maker/composables/useEventTracker.js +17 -0
- package/lib/src/brand-page-maker/composables/useUndoRedoFlag.d.ts +17 -0
- package/lib/src/brand-page-maker/composables/useUndoRedoFlag.js +25 -0
- package/lib/src/brand-page-maker/constants/config-settings-constant.js +38 -0
- package/lib/src/brand-page-maker/convertors/about-display-style.convertor.js +9 -1
- package/lib/src/brand-page-maker/convertors/banner-align-display-style.convertor.js +7 -1
- package/lib/src/brand-page-maker/convertors/contact-layout-style.convertor.js +6 -1
- package/lib/src/brand-page-maker/models/content-settings.js +36 -2
- package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +12 -0
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.d.ts +41 -2
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +307 -5
- package/lib/src/brand-page-maker/stores/history/history-store.d.ts +86 -0
- package/lib/src/brand-page-maker/stores/history/history-store.js +501 -0
- package/lib/src/brand-page-maker/stores/logo-store/logo-store.d.ts +1 -0
- package/lib/src/brand-page-maker/stores/user/user-store.js +1 -0
- package/lib/src/bundled-translations-BUyt4scr.js +175 -0
- package/lib/src/bundled-translations.de-DE-DEw_OVai.js +175 -0
- package/lib/src/bundled-translations.es-ES-CFKWmkgY.js +175 -0
- package/lib/src/bundled-translations.fr-CA-DCl5LJS4.js +175 -0
- package/lib/src/bundled-translations.fr-FR-B5BjgllA.js +175 -0
- package/lib/src/bundled-translations.pt-BR-5PWpMPuM.js +175 -0
- package/lib/src/bundled-translations.pt-PT-B9_wN0HR.js +175 -0
- package/lib/src/bundles/bundled-translations.de-DE.json +5 -1
- package/lib/src/bundles/bundled-translations.es-ES.json +5 -1
- package/lib/src/bundles/bundled-translations.fr-CA.json +5 -1
- package/lib/src/bundles/bundled-translations.fr-FR.json +5 -1
- package/lib/src/bundles/bundled-translations.json +5 -1
- package/lib/src/bundles/bundled-translations.pt-BR.json +5 -1
- package/lib/src/bundles/bundled-translations.pt-PT.json +5 -1
- package/lib/src/constants/ui.d.ts +1 -0
- package/lib/src/css/library.brand-page-brandCrowd.min.css +128 -131
- package/lib/src/css/library.brand-page-brandPage.min.css +128 -132
- package/lib/src/css/library.brand-page-designCom.min.css +128 -131
- package/lib/src/css/library.brand-page-preview.min.css +128 -131
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-ngdDRkSL.js → lib-CIj_C38s.js} +36378 -35591
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +104 -2
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.js +5 -0
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.stories.js +1 -0
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +37 -2
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +28 -0
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +19 -2
- package/lib/src/shared/content-settings/components/draggable-item-list/DraggableItemList.mixin.d.ts +3 -0
- package/lib/src/shared/content-settings/components/draggable-item-list/DraggableItemList.mixin.js +19 -2
- package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +12 -0
- package/lib/src/shared/content-settings/components/form-fields-field/FormFieldsField.mixin.js +18 -8
- package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +67 -0
- package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.js +6 -0
- package/lib/src/shared/content-settings/components/slider-field/SliderField.mixin.js +9 -0
- package/lib/src/shared/content-settings/store/content-settings-store.d.ts +12 -0
- package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.d.ts +19 -0
- package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.js +11 -0
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +10 -2
- package/lib/src/shared/logo-settings/store/editable-logo-store.d.ts +5 -1
- package/lib/src/shared/logo-settings/store/editable-logo-store.js +31 -0
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +40 -2
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +24 -2
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +23 -2
- package/lib/src/shared/side-bar/components/SideBarTabButton.mixin.d.ts +16 -0
- package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +23 -2
- package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.d.ts +16 -0
- package/lib/src/utils/minify-brand-page-metadata.js +11 -1
- package/package.json +1 -1
- package/src/brand-page/components/about-section/AboutSection.vue +10 -4
- package/src/brand-page/components/banner-section/BannerSection.vue +11 -4
- package/src/brand-page/components/booking-section/BookingSection.vue +11 -3
- package/src/brand-page/components/contact-form/ContactForm.mixin.ts +12 -6
- package/src/brand-page/components/contact-form/ContactForm.vue +105 -104
- package/src/brand-page/components/image-gallery/ImageGallery.mixin.ts +5 -0
- package/src/brand-page/components/image-gallery/ImageGallery.vue +1 -1
- package/src/brand-page/components/mailing-list/MailingList.mixin.ts +8 -1
- package/src/brand-page/components/mailing-list/MailingList.vue +1 -1
- package/src/brand-page/components/map/Map.vue +5 -1
- package/src/brand-page/components/payment/request-payment/RequestPayment.mixin.ts +5 -0
- package/src/brand-page/components/payment/request-payment/RequestPayment.vue +1 -0
- package/src/brand-page/components/payment/support-me/SupportMe.mixin.ts +8 -1
- package/src/brand-page/components/payment/support-me/SupportMe.vue +1 -0
- package/src/brand-page/components/shop/Shop.vue +7 -2
- package/src/brand-page/components/social-links/SocialLinks.vue +7 -3
- package/src/brand-page/components/text/Text.vue +12 -5
- package/src/brand-page/components/text-media-section/TextMediaSection.vue +11 -3
- package/src/brand-page/components/video/Video.mixin.ts +5 -0
- package/src/brand-page/components/video/Video.vue +1 -1
- package/src/brand-page/constants/misc.constants.ts +48 -0
- package/src/brand-page/models/content.model.ts +2 -0
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +9 -3
- package/src/brand-page/utils/content-padding.util.test.ts +29 -0
- package/src/brand-page/utils/content-padding.util.ts +13 -0
- package/src/brand-page/utils/index.ts +1 -0
- package/src/brand-page/utils/migration/migration-17.ts +65 -0
- package/src/brand-page/utils/migration.util.test.ts +195 -0
- package/src/brand-page/utils/migration.util.ts +11 -0
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +9 -0
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.vue +2 -3
- package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.ts +1 -0
- package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.ts +5 -0
- package/src/brand-page-maker/components/cookie-collection/CookieSettings.vue +18 -17
- package/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.ts +13 -0
- package/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.vue +26 -3
- package/src/brand-page-maker/components/quick-link-bar/RedoButton.vue +66 -0
- package/src/brand-page-maker/components/quick-link-bar/UndoButton.vue +66 -0
- package/src/brand-page-maker/components/quick-link-bar/i18n/quick-link-bar.de-DE.json +6 -4
- package/src/brand-page-maker/components/quick-link-bar/i18n/quick-link-bar.es-ES.json +6 -4
- package/src/brand-page-maker/components/quick-link-bar/i18n/quick-link-bar.fr-CA.json +6 -4
- package/src/brand-page-maker/components/quick-link-bar/i18n/quick-link-bar.fr-FR.json +6 -4
- package/src/brand-page-maker/components/quick-link-bar/i18n/quick-link-bar.json +3 -1
- package/src/brand-page-maker/components/quick-link-bar/i18n/quick-link-bar.pt-BR.json +6 -4
- package/src/brand-page-maker/components/quick-link-bar/i18n/quick-link-bar.pt-PT.json +6 -4
- package/src/brand-page-maker/components/quick-link-bar/undo-redo-buttons.test.ts +116 -0
- package/src/brand-page-maker/components/save-contact/SaveContact.vue +12 -19
- package/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.ts +10 -0
- package/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.ts +28 -1
- package/src/brand-page-maker/composables/useEventTracker.ts +29 -0
- package/src/brand-page-maker/composables/useUndoRedoFlag.ts +30 -0
- package/src/brand-page-maker/constants/config-settings-constant.ts +44 -0
- package/src/brand-page-maker/convertors/about-display-style.convertor.ts +10 -0
- package/src/brand-page-maker/convertors/banner-align-display-style.convertor.ts +8 -0
- package/src/brand-page-maker/convertors/contact-layout-style.convertor.test.ts +50 -0
- package/src/brand-page-maker/convertors/contact-layout-style.convertor.ts +8 -0
- package/src/brand-page-maker/models/content-settings.ts +38 -2
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.test.ts +334 -0
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +371 -4
- package/src/brand-page-maker/stores/history/history-store.test.ts +1120 -0
- package/src/brand-page-maker/stores/history/history-store.ts +666 -0
- package/src/brand-page-maker/stores/logo-store/logo-store.ts +5 -0
- package/src/brand-page-maker/stores/user/user-store.ts +1 -0
- package/src/bundles/bundled-translations.de-DE.json +5 -1
- package/src/bundles/bundled-translations.es-ES.json +5 -1
- package/src/bundles/bundled-translations.fr-CA.json +5 -1
- package/src/bundles/bundled-translations.fr-FR.json +5 -1
- package/src/bundles/bundled-translations.json +5 -1
- package/src/bundles/bundled-translations.pt-BR.json +5 -1
- package/src/bundles/bundled-translations.pt-PT.json +5 -1
- package/src/constants/ui.ts +1 -0
- package/src/shared/content-settings/components/content-settings/ContentSettings.mixin.ts +5 -0
- package/src/shared/content-settings/components/content-settings/ContentSettings.stories.ts +1 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.de-DE.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.es-ES.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-CA.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-FR.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-BR.json +2 -0
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-PT.json +2 -0
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.vue +1 -1
- package/src/shared/content-settings/components/draggable-item-list/DraggableItemList.mixin.ts +19 -2
- package/src/shared/content-settings/components/draggable-item-list/DraggableItemList.vue +1 -1
- package/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.vue +2 -2
- package/src/shared/content-settings/components/form-fields-field/FormFieldsField.mixin.ts +26 -10
- package/src/shared/content-settings/components/logo-selection-field/LogoSelection.vue +63 -48
- package/src/shared/content-settings/components/page-dropdown-field/PageDropdownField.vue +4 -0
- package/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.ts +7 -0
- package/src/shared/content-settings/components/slider-field/SliderField.mixin.ts +9 -0
- package/src/shared/content-settings/components/text-field/TextField.vue +1 -0
- package/src/shared/content-settings/components/text-image-field/TextImageField.vue +33 -4
- package/src/shared/logo-settings/components/EditLogoSettings.mixin.ts +11 -0
- package/src/shared/logo-settings/store/editable-logo-store.ts +42 -1
- package/src/utils/minify-brand-page-metadata.ts +11 -1
- package/lib/src/bundled-translations-B5Fkt3qd.js +0 -175
- package/lib/src/bundled-translations.de-DE-DpdVePM9.js +0 -175
- package/lib/src/bundled-translations.es-ES-BsIcrzZF.js +0 -175
- package/lib/src/bundled-translations.fr-CA-G1XCp2Qh.js +0 -175
- package/lib/src/bundled-translations.fr-FR-BdwLXOnB.js +0 -175
- package/lib/src/bundled-translations.pt-BR-Bvn5ePe7.js +0 -175
- package/lib/src/bundled-translations.pt-PT-CDtkb2k1.js +0 -175
|
@@ -152,16 +152,21 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
152
152
|
hideChangeTemplateConfirmModal(): void;
|
|
153
153
|
onBackgroundChanged(): void;
|
|
154
154
|
onChangeTemplateConfirmModalCancel(): void;
|
|
155
|
-
onChangeTemplateConfirmModalConfirm(): void
|
|
155
|
+
onChangeTemplateConfirmModalConfirm(): Promise<void>;
|
|
156
156
|
onContentChanged(): void;
|
|
157
157
|
onStyleChanged(): void;
|
|
158
|
-
onTemplateSelected(payload: import("@brand-page-maker/stores").OnTemplateSelectedPayload): void
|
|
158
|
+
onTemplateSelected(payload: import("@brand-page-maker/stores").OnTemplateSelectedPayload): Promise<void>;
|
|
159
159
|
setSelectedTabName(payload: any): void;
|
|
160
160
|
showNextNotificationMessage(): Promise<void>;
|
|
161
161
|
updateContent<TContent extends import("@brand-page").Content, P extends {
|
|
162
162
|
id: string;
|
|
163
163
|
content: TContent;
|
|
164
164
|
}>(payload: P): Promise<void>;
|
|
165
|
+
_captureTemplateSwitchIfEnabled(): void;
|
|
166
|
+
applyHistorySnapshot(snapshot: import("@brand-page").BrandPageModel, activePageId?: string | undefined, logoEditsStr?: string | undefined): Promise<void>;
|
|
167
|
+
_syncLogoSettingsFromSnapshot(snapshot: import("@brand-page").BrandPageModel, logoEditsStr?: string | undefined): Promise<void>;
|
|
168
|
+
_navigateToActivePage(activePageId?: string | undefined): void;
|
|
169
|
+
_fallbackSidebarIfSelectedContentMissing(snapshot: import("@brand-page").BrandPageModel): void;
|
|
165
170
|
export(): import("@brand-page").BrandPageModel;
|
|
166
171
|
setBrandPageType({ brandPageType }: {
|
|
167
172
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
@@ -496,6 +501,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
496
501
|
id: string;
|
|
497
502
|
type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
|
|
498
503
|
personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
|
|
504
|
+
topPadding?: number | undefined;
|
|
505
|
+
bottomPadding?: number | undefined;
|
|
499
506
|
imageUrlOverride?: string | undefined;
|
|
500
507
|
imageUrlsOverride?: string | undefined;
|
|
501
508
|
avatarImageUrlOverride?: string | undefined;
|
|
@@ -545,6 +552,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
545
552
|
id: string;
|
|
546
553
|
type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
|
|
547
554
|
personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
|
|
555
|
+
topPadding?: number | undefined;
|
|
556
|
+
bottomPadding?: number | undefined;
|
|
548
557
|
imageUrlOverride?: string | undefined;
|
|
549
558
|
imageUrlsOverride?: string | undefined;
|
|
550
559
|
avatarImageUrlOverride?: string | undefined;
|
|
@@ -594,6 +603,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
594
603
|
id: string;
|
|
595
604
|
type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
|
|
596
605
|
personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
|
|
606
|
+
topPadding?: number | undefined;
|
|
607
|
+
bottomPadding?: number | undefined;
|
|
597
608
|
imageUrlOverride?: string | undefined;
|
|
598
609
|
imageUrlsOverride?: string | undefined;
|
|
599
610
|
avatarImageUrlOverride?: string | undefined;
|
|
@@ -643,6 +654,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
643
654
|
id: string;
|
|
644
655
|
type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
|
|
645
656
|
personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
|
|
657
|
+
topPadding?: number | undefined;
|
|
658
|
+
bottomPadding?: number | undefined;
|
|
646
659
|
imageUrlOverride?: string | undefined;
|
|
647
660
|
imageUrlsOverride?: string | undefined;
|
|
648
661
|
avatarImageUrlOverride?: string | undefined;
|
|
@@ -692,6 +705,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
692
705
|
id: string;
|
|
693
706
|
type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
|
|
694
707
|
personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
|
|
708
|
+
topPadding?: number | undefined;
|
|
709
|
+
bottomPadding?: number | undefined;
|
|
695
710
|
imageUrlOverride?: string | undefined;
|
|
696
711
|
imageUrlsOverride?: string | undefined;
|
|
697
712
|
avatarImageUrlOverride?: string | undefined;
|
|
@@ -741,6 +756,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
741
756
|
id: string;
|
|
742
757
|
type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
|
|
743
758
|
personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
|
|
759
|
+
topPadding?: number | undefined;
|
|
760
|
+
bottomPadding?: number | undefined;
|
|
744
761
|
imageUrlOverride?: string | undefined;
|
|
745
762
|
imageUrlsOverride?: string | undefined;
|
|
746
763
|
avatarImageUrlOverride?: string | undefined;
|
|
@@ -11,6 +11,8 @@ import { navigateToPageByPageId } from '../../routing';
|
|
|
11
11
|
import { useBrandPageContainerStore } from '@brand-page-maker/stores';
|
|
12
12
|
import { UI_DEVICE_MODES, UI_SCREENSIZE_MODES, } from '@shared/models';
|
|
13
13
|
import { useBrandPageMakerStore, useBrandPageMakerUserStore, useLocalisedRouteStore, useUiStore, useSnapshotStore, useVideoStore, } from '@brand-page-maker/stores';
|
|
14
|
+
import { useHistoryStore } from '@brand-page-maker/stores/history/history-store';
|
|
15
|
+
import { useUndoRedoFlag } from '@brand-page-maker/composables/useUndoRedoFlag';
|
|
14
16
|
import { useUiContentSettingsStore } from '@shared/content-settings/store';
|
|
15
17
|
import { useUiTemplateSettingsStore } from '@shared/template-settings/store';
|
|
16
18
|
import { useUiPageSettingsStore } from '@shared/page-settings/store';
|
|
@@ -189,6 +191,12 @@ export default defineComponent({
|
|
|
189
191
|
}
|
|
190
192
|
// Mark brand page as fully loaded
|
|
191
193
|
this.brandPageMakerStore.setIsBrandPageLoaded(true);
|
|
194
|
+
// Capture baseline for undo/redo when the feature is active for this
|
|
195
|
+
// session — see useUndoRedoFlag.ts for the gate (LaunchDarkly flag +
|
|
196
|
+
// brand-site + non-admin maker).
|
|
197
|
+
if (useUndoRedoFlag().value) {
|
|
198
|
+
useHistoryStore().captureBaseline();
|
|
199
|
+
}
|
|
192
200
|
this.$emit(EVENTS.Initialised);
|
|
193
201
|
},
|
|
194
202
|
mounted() {
|
|
@@ -96,16 +96,21 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
96
96
|
hideChangeTemplateConfirmModal(): void;
|
|
97
97
|
onBackgroundChanged(): void;
|
|
98
98
|
onChangeTemplateConfirmModalCancel(): void;
|
|
99
|
-
onChangeTemplateConfirmModalConfirm(): void
|
|
99
|
+
onChangeTemplateConfirmModalConfirm(): Promise<void>;
|
|
100
100
|
onContentChanged(): void;
|
|
101
101
|
onStyleChanged(): void;
|
|
102
|
-
onTemplateSelected(payload: import("../../stores").OnTemplateSelectedPayload): void
|
|
102
|
+
onTemplateSelected(payload: import("../../stores").OnTemplateSelectedPayload): Promise<void>;
|
|
103
103
|
setSelectedTabName(payload: any): void;
|
|
104
104
|
showNextNotificationMessage(): Promise<void>;
|
|
105
105
|
updateContent<TContent extends import("../../../lib").Content, P extends {
|
|
106
106
|
id: string;
|
|
107
107
|
content: TContent;
|
|
108
108
|
}>(payload: P): Promise<void>;
|
|
109
|
+
_captureTemplateSwitchIfEnabled(): void;
|
|
110
|
+
applyHistorySnapshot(snapshot: import("../../../lib").BrandPageModel, activePageId?: string | undefined, logoEditsStr?: string | undefined): Promise<void>;
|
|
111
|
+
_syncLogoSettingsFromSnapshot(snapshot: import("../../../lib").BrandPageModel, logoEditsStr?: string | undefined): Promise<void>;
|
|
112
|
+
_navigateToActivePage(activePageId?: string | undefined): void;
|
|
113
|
+
_fallbackSidebarIfSelectedContentMissing(snapshot: import("../../../lib").BrandPageModel): void;
|
|
109
114
|
export(): import("../../../lib").BrandPageModel;
|
|
110
115
|
setBrandPageType({ brandPageType }: {
|
|
111
116
|
brandPageType: "default" | "brandSite" | "brandContact";
|
package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
11
11
|
id: string;
|
|
12
12
|
type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
|
|
13
13
|
personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
|
|
14
|
+
topPadding?: number | undefined;
|
|
15
|
+
bottomPadding?: number | undefined;
|
|
14
16
|
imageUrlOverride?: string | undefined;
|
|
15
17
|
imageUrlsOverride?: string | undefined;
|
|
16
18
|
avatarImageUrlOverride?: string | undefined;
|
|
@@ -90,6 +92,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
90
92
|
id: string;
|
|
91
93
|
type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
|
|
92
94
|
personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
|
|
95
|
+
topPadding?: number | undefined;
|
|
96
|
+
bottomPadding?: number | undefined;
|
|
93
97
|
imageUrlOverride?: string | undefined;
|
|
94
98
|
imageUrlsOverride?: string | undefined;
|
|
95
99
|
avatarImageUrlOverride?: string | undefined;
|
|
@@ -139,6 +143,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
139
143
|
id: string;
|
|
140
144
|
type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
|
|
141
145
|
personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
|
|
146
|
+
topPadding?: number | undefined;
|
|
147
|
+
bottomPadding?: number | undefined;
|
|
142
148
|
imageUrlOverride?: string | undefined;
|
|
143
149
|
imageUrlsOverride?: string | undefined;
|
|
144
150
|
avatarImageUrlOverride?: string | undefined;
|
|
@@ -188,6 +194,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
188
194
|
id: string;
|
|
189
195
|
type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
|
|
190
196
|
personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
|
|
197
|
+
topPadding?: number | undefined;
|
|
198
|
+
bottomPadding?: number | undefined;
|
|
191
199
|
imageUrlOverride?: string | undefined;
|
|
192
200
|
imageUrlsOverride?: string | undefined;
|
|
193
201
|
avatarImageUrlOverride?: string | undefined;
|
|
@@ -237,6 +245,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
237
245
|
id: string;
|
|
238
246
|
type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
|
|
239
247
|
personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
|
|
248
|
+
topPadding?: number | undefined;
|
|
249
|
+
bottomPadding?: number | undefined;
|
|
240
250
|
imageUrlOverride?: string | undefined;
|
|
241
251
|
imageUrlsOverride?: string | undefined;
|
|
242
252
|
avatarImageUrlOverride?: string | undefined;
|
|
@@ -286,6 +296,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
286
296
|
id: string;
|
|
287
297
|
type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
|
|
288
298
|
personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
|
|
299
|
+
topPadding?: number | undefined;
|
|
300
|
+
bottomPadding?: number | undefined;
|
|
289
301
|
imageUrlOverride?: string | undefined;
|
|
290
302
|
imageUrlsOverride?: string | undefined;
|
|
291
303
|
avatarImageUrlOverride?: string | undefined;
|
|
@@ -335,6 +347,8 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
335
347
|
id: string;
|
|
336
348
|
type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
|
|
337
349
|
personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
|
|
350
|
+
topPadding?: number | undefined;
|
|
351
|
+
bottomPadding?: number | undefined;
|
|
338
352
|
imageUrlOverride?: string | undefined;
|
|
339
353
|
imageUrlsOverride?: string | undefined;
|
|
340
354
|
avatarImageUrlOverride?: string | undefined;
|
|
@@ -602,16 +616,21 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
602
616
|
hideChangeTemplateConfirmModal(): void;
|
|
603
617
|
onBackgroundChanged(): void;
|
|
604
618
|
onChangeTemplateConfirmModalCancel(): void;
|
|
605
|
-
onChangeTemplateConfirmModalConfirm(): void
|
|
619
|
+
onChangeTemplateConfirmModalConfirm(): Promise<void>;
|
|
606
620
|
onContentChanged(): void;
|
|
607
621
|
onStyleChanged(): void;
|
|
608
|
-
onTemplateSelected(payload: import("@brand-page-maker/stores").OnTemplateSelectedPayload): void
|
|
622
|
+
onTemplateSelected(payload: import("@brand-page-maker/stores").OnTemplateSelectedPayload): Promise<void>;
|
|
609
623
|
setSelectedTabName(payload: any): void;
|
|
610
624
|
showNextNotificationMessage(): Promise<void>;
|
|
611
625
|
updateContent<TContent extends Content, P extends {
|
|
612
626
|
id: string;
|
|
613
627
|
content: TContent;
|
|
614
628
|
}>(payload: P): Promise<void>;
|
|
629
|
+
_captureTemplateSwitchIfEnabled(): void;
|
|
630
|
+
applyHistorySnapshot(snapshot: import("@brand-page").BrandPageModel, activePageId?: string | undefined, logoEditsStr?: string | undefined): Promise<void>;
|
|
631
|
+
_syncLogoSettingsFromSnapshot(snapshot: import("@brand-page").BrandPageModel, logoEditsStr?: string | undefined): Promise<void>;
|
|
632
|
+
_navigateToActivePage(activePageId?: string | undefined): void;
|
|
633
|
+
_fallbackSidebarIfSelectedContentMissing(snapshot: import("@brand-page").BrandPageModel): void;
|
|
615
634
|
export(): import("@brand-page").BrandPageModel;
|
|
616
635
|
setBrandPageType({ brandPageType }: {
|
|
617
636
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
@@ -1046,6 +1065,22 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
1046
1065
|
}>;
|
|
1047
1066
|
eventTracker: {
|
|
1048
1067
|
sendShippingToggleEvent: (isEnabled: boolean) => void;
|
|
1068
|
+
sendUndoEvent: (props: {
|
|
1069
|
+
entries_count: number;
|
|
1070
|
+
actor: string | undefined;
|
|
1071
|
+
}) => void;
|
|
1072
|
+
sendRedoEvent: (props: {
|
|
1073
|
+
entries_count: number;
|
|
1074
|
+
actor: string | undefined;
|
|
1075
|
+
}) => void;
|
|
1076
|
+
sendHistoryCappedEvent: (props: {
|
|
1077
|
+
entries_count: number;
|
|
1078
|
+
size_bytes: number;
|
|
1079
|
+
}) => void;
|
|
1080
|
+
sendHistoryOversizedEvent: (props: {
|
|
1081
|
+
attempted_bytes: number;
|
|
1082
|
+
source: string;
|
|
1083
|
+
}) => void;
|
|
1049
1084
|
sendSaveContactEvent: () => void;
|
|
1050
1085
|
sendStartForFreeEvent: () => void;
|
|
1051
1086
|
sendFooterLinkClickEvent: (linkType: "watermark_logo" | "create_your_website") => void;
|
|
@@ -1150,6 +1185,73 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
1150
1185
|
}): Promise<void>;
|
|
1151
1186
|
toggleLogoBackground(): Promise<any>;
|
|
1152
1187
|
}>;
|
|
1188
|
+
historyStore: import("pinia").Store<"history", Pick<{
|
|
1189
|
+
entries: import("vue").ShallowRef<import("@brand-page-maker/stores/history/history-store").HistoryEntry[], import("@brand-page-maker/stores/history/history-store").HistoryEntry[]>;
|
|
1190
|
+
currentIndex: import("vue").Ref<number, number>;
|
|
1191
|
+
isApplyingSnapshot: import("vue").Ref<boolean, boolean>;
|
|
1192
|
+
snapshotAppliedToken: import("vue").Ref<number, number>;
|
|
1193
|
+
baselineCaptured: import("vue").Ref<boolean, boolean>;
|
|
1194
|
+
canUndo: import("vue").ComputedRef<boolean>;
|
|
1195
|
+
canRedo: import("vue").ComputedRef<boolean>;
|
|
1196
|
+
captureBaseline: () => void;
|
|
1197
|
+
capture: (args: {
|
|
1198
|
+
source: "manual_edit" | "template_switch" | "ai_changeset" | "rich_text";
|
|
1199
|
+
actor: "user" | "ai_builder";
|
|
1200
|
+
label?: string | undefined;
|
|
1201
|
+
}) => "committed" | "oversized" | "noop" | "skipped";
|
|
1202
|
+
captureTemplateSwitch: (label?: string | undefined) => "committed" | "oversized" | "noop" | "skipped";
|
|
1203
|
+
captureAiChangeset: (label?: string | undefined) => "committed" | "oversized" | "noop" | "skipped";
|
|
1204
|
+
mergeNextMutation: () => void;
|
|
1205
|
+
undo: () => Promise<void>;
|
|
1206
|
+
redo: () => Promise<void>;
|
|
1207
|
+
reset: () => void;
|
|
1208
|
+
getCurrentSizeBytes: () => number;
|
|
1209
|
+
getCurrentEntryCount: () => number;
|
|
1210
|
+
}, "entries" | "currentIndex" | "isApplyingSnapshot" | "snapshotAppliedToken" | "baselineCaptured">, Pick<{
|
|
1211
|
+
entries: import("vue").ShallowRef<import("@brand-page-maker/stores/history/history-store").HistoryEntry[], import("@brand-page-maker/stores/history/history-store").HistoryEntry[]>;
|
|
1212
|
+
currentIndex: import("vue").Ref<number, number>;
|
|
1213
|
+
isApplyingSnapshot: import("vue").Ref<boolean, boolean>;
|
|
1214
|
+
snapshotAppliedToken: import("vue").Ref<number, number>;
|
|
1215
|
+
baselineCaptured: import("vue").Ref<boolean, boolean>;
|
|
1216
|
+
canUndo: import("vue").ComputedRef<boolean>;
|
|
1217
|
+
canRedo: import("vue").ComputedRef<boolean>;
|
|
1218
|
+
captureBaseline: () => void;
|
|
1219
|
+
capture: (args: {
|
|
1220
|
+
source: "manual_edit" | "template_switch" | "ai_changeset" | "rich_text";
|
|
1221
|
+
actor: "user" | "ai_builder";
|
|
1222
|
+
label?: string | undefined;
|
|
1223
|
+
}) => "committed" | "oversized" | "noop" | "skipped";
|
|
1224
|
+
captureTemplateSwitch: (label?: string | undefined) => "committed" | "oversized" | "noop" | "skipped";
|
|
1225
|
+
captureAiChangeset: (label?: string | undefined) => "committed" | "oversized" | "noop" | "skipped";
|
|
1226
|
+
mergeNextMutation: () => void;
|
|
1227
|
+
undo: () => Promise<void>;
|
|
1228
|
+
redo: () => Promise<void>;
|
|
1229
|
+
reset: () => void;
|
|
1230
|
+
getCurrentSizeBytes: () => number;
|
|
1231
|
+
getCurrentEntryCount: () => number;
|
|
1232
|
+
}, "canUndo" | "canRedo">, Pick<{
|
|
1233
|
+
entries: import("vue").ShallowRef<import("@brand-page-maker/stores/history/history-store").HistoryEntry[], import("@brand-page-maker/stores/history/history-store").HistoryEntry[]>;
|
|
1234
|
+
currentIndex: import("vue").Ref<number, number>;
|
|
1235
|
+
isApplyingSnapshot: import("vue").Ref<boolean, boolean>;
|
|
1236
|
+
snapshotAppliedToken: import("vue").Ref<number, number>;
|
|
1237
|
+
baselineCaptured: import("vue").Ref<boolean, boolean>;
|
|
1238
|
+
canUndo: import("vue").ComputedRef<boolean>;
|
|
1239
|
+
canRedo: import("vue").ComputedRef<boolean>;
|
|
1240
|
+
captureBaseline: () => void;
|
|
1241
|
+
capture: (args: {
|
|
1242
|
+
source: "manual_edit" | "template_switch" | "ai_changeset" | "rich_text";
|
|
1243
|
+
actor: "user" | "ai_builder";
|
|
1244
|
+
label?: string | undefined;
|
|
1245
|
+
}) => "committed" | "oversized" | "noop" | "skipped";
|
|
1246
|
+
captureTemplateSwitch: (label?: string | undefined) => "committed" | "oversized" | "noop" | "skipped";
|
|
1247
|
+
captureAiChangeset: (label?: string | undefined) => "committed" | "oversized" | "noop" | "skipped";
|
|
1248
|
+
mergeNextMutation: () => void;
|
|
1249
|
+
undo: () => Promise<void>;
|
|
1250
|
+
redo: () => Promise<void>;
|
|
1251
|
+
reset: () => void;
|
|
1252
|
+
getCurrentSizeBytes: () => number;
|
|
1253
|
+
getCurrentEntryCount: () => number;
|
|
1254
|
+
}, "reset" | "undo" | "redo" | "captureBaseline" | "capture" | "captureTemplateSwitch" | "captureAiChangeset" | "mergeNextMutation" | "getCurrentSizeBytes" | "getCurrentEntryCount">>;
|
|
1153
1255
|
}, {
|
|
1154
1256
|
isDraggingContent: boolean;
|
|
1155
1257
|
isContentSelected: boolean;
|
package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.js
CHANGED
|
@@ -15,6 +15,7 @@ import { transformToRTE, RTE_ALLOWED_SECTION_TYPES, } from '@brand-page-maker/ut
|
|
|
15
15
|
import { useExternalRichTextEditor } from '@brand-page-maker/composables/rich-text-editor/useRichTextEditor';
|
|
16
16
|
import { useUiStyleSettingsStore } from '@shared/style-settings/store';
|
|
17
17
|
import { STYLE_THEME_KEYS } from '@brand-page/constants';
|
|
18
|
+
import { useHistoryStore } from '@brand-page-maker/stores/history/history-store';
|
|
18
19
|
export default defineComponent({
|
|
19
20
|
mixins: [PageMixin],
|
|
20
21
|
setup() {
|
|
@@ -29,6 +30,7 @@ export default defineComponent({
|
|
|
29
30
|
const eventTracker = useEventTracker();
|
|
30
31
|
const { externalEditor } = useExternalRichTextEditor();
|
|
31
32
|
const styleSettingsStore = useUiStyleSettingsStore();
|
|
33
|
+
const historyStore = useHistoryStore();
|
|
32
34
|
return {
|
|
33
35
|
items: computed(() => contentSettingsStore.items),
|
|
34
36
|
selectedItemId: computed(() => contentSettingsStore.selectedItemId),
|
|
@@ -51,6 +53,7 @@ export default defineComponent({
|
|
|
51
53
|
eventTracker,
|
|
52
54
|
externalEditor,
|
|
53
55
|
styleSettingsStore,
|
|
56
|
+
historyStore,
|
|
54
57
|
};
|
|
55
58
|
},
|
|
56
59
|
data() {
|
|
@@ -214,6 +217,8 @@ export default defineComponent({
|
|
|
214
217
|
selectedItem = currentItem.settings.content;
|
|
215
218
|
}
|
|
216
219
|
}
|
|
220
|
+
// RTE rewrap on section selection — fold into current head.
|
|
221
|
+
this.historyStore.mergeNextMutation();
|
|
217
222
|
transformToRTE(this.pageSettingsStore, this.externalEditor, this.styleSettingsStore, selectedItem);
|
|
218
223
|
}
|
|
219
224
|
if (this.selectEventDebounceHandler) {
|
|
@@ -102,16 +102,21 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
102
102
|
hideChangeTemplateConfirmModal(): void;
|
|
103
103
|
onBackgroundChanged(): void;
|
|
104
104
|
onChangeTemplateConfirmModalCancel(): void;
|
|
105
|
-
onChangeTemplateConfirmModalConfirm(): void
|
|
105
|
+
onChangeTemplateConfirmModalConfirm(): Promise<void>;
|
|
106
106
|
onContentChanged(): void;
|
|
107
107
|
onStyleChanged(): void;
|
|
108
|
-
onTemplateSelected(payload: import("@brand-page-maker/stores").OnTemplateSelectedPayload): void
|
|
108
|
+
onTemplateSelected(payload: import("@brand-page-maker/stores").OnTemplateSelectedPayload): Promise<void>;
|
|
109
109
|
setSelectedTabName(payload: any): void;
|
|
110
110
|
showNextNotificationMessage(): Promise<void>;
|
|
111
111
|
updateContent<TContent extends import("../../../brand-page").Content, P extends {
|
|
112
112
|
id: string;
|
|
113
113
|
content: TContent;
|
|
114
114
|
}>(payload: P): Promise<void>;
|
|
115
|
+
_captureTemplateSwitchIfEnabled(): void;
|
|
116
|
+
applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel, activePageId?: string | undefined, logoEditsStr?: string | undefined): Promise<void>;
|
|
117
|
+
_syncLogoSettingsFromSnapshot(snapshot: import("../../../brand-page").BrandPageModel, logoEditsStr?: string | undefined): Promise<void>;
|
|
118
|
+
_navigateToActivePage(activePageId?: string | undefined): void;
|
|
119
|
+
_fallbackSidebarIfSelectedContentMissing(snapshot: import("../../../brand-page").BrandPageModel): void;
|
|
115
120
|
export(): import("../../../brand-page").BrandPageModel;
|
|
116
121
|
setBrandPageType({ brandPageType }: {
|
|
117
122
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
@@ -291,9 +291,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
291
291
|
pushManageWebPageUpdateSensitiveContentClickEvent(): Promise<void>;
|
|
292
292
|
pushManageWebPageUnpublishClickEvent(): Promise<void>;
|
|
293
293
|
}>;
|
|
294
|
+
undoRedoEnabled: import("vue").ComputedRef<boolean>;
|
|
294
295
|
}, {
|
|
295
296
|
copied: boolean;
|
|
296
297
|
}, {
|
|
298
|
+
isPublished(): boolean;
|
|
299
|
+
shouldShowBar(): boolean;
|
|
297
300
|
brandPageUrl(): string;
|
|
298
301
|
copyButtonLabel(): string;
|
|
299
302
|
}, {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineComponent } from 'vue';
|
|
2
2
|
import { CUSTOM_DOMAIN_STATUSES } from '@brand-page-maker/constants';
|
|
3
3
|
import { useBrandPageContainerStore, useEventManagerStore, } from '@brand-page-maker/stores';
|
|
4
|
+
import { useUndoRedoFlag } from '@brand-page-maker/composables/useUndoRedoFlag';
|
|
4
5
|
import { quickLinkBarTr } from '@src/composables/useTranslate';
|
|
5
6
|
export default defineComponent({
|
|
6
7
|
props: {
|
|
@@ -17,6 +18,7 @@ export default defineComponent({
|
|
|
17
18
|
return {
|
|
18
19
|
brandPageContainerStore: useBrandPageContainerStore(),
|
|
19
20
|
eventManagerStore: useEventManagerStore(),
|
|
21
|
+
undoRedoEnabled: useUndoRedoFlag(),
|
|
20
22
|
};
|
|
21
23
|
},
|
|
22
24
|
data() {
|
|
@@ -25,6 +27,15 @@ export default defineComponent({
|
|
|
25
27
|
};
|
|
26
28
|
},
|
|
27
29
|
computed: {
|
|
30
|
+
isPublished() {
|
|
31
|
+
return this.brandPageContainerStore.isPublished;
|
|
32
|
+
},
|
|
33
|
+
// Only render the bar when at least one inner cluster has something to
|
|
34
|
+
// show. Otherwise we'd render an empty white strip — e.g. on an
|
|
35
|
+
// unpublished page with the undo flag off.
|
|
36
|
+
shouldShowBar() {
|
|
37
|
+
return Boolean(this.undoRedoEnabled) || this.isPublished;
|
|
38
|
+
},
|
|
28
39
|
brandPageUrl() {
|
|
29
40
|
if (this.brandPageContainerStore.isCustomDomainEnabled &&
|
|
30
41
|
this.brandPageContainerStore.customDomain &&
|
|
@@ -380,16 +380,21 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
380
380
|
hideChangeTemplateConfirmModal(): void;
|
|
381
381
|
onBackgroundChanged(): void;
|
|
382
382
|
onChangeTemplateConfirmModalCancel(): void;
|
|
383
|
-
onChangeTemplateConfirmModalConfirm(): void
|
|
383
|
+
onChangeTemplateConfirmModalConfirm(): Promise<void>;
|
|
384
384
|
onContentChanged(): void;
|
|
385
385
|
onStyleChanged(): void;
|
|
386
|
-
onTemplateSelected(payload: import("@brand-page-maker/stores").OnTemplateSelectedPayload): void
|
|
386
|
+
onTemplateSelected(payload: import("@brand-page-maker/stores").OnTemplateSelectedPayload): Promise<void>;
|
|
387
387
|
setSelectedTabName(payload: any): void;
|
|
388
388
|
showNextNotificationMessage(): Promise<void>;
|
|
389
389
|
updateContent<TContent extends import("../../../brand-page").Content, P extends {
|
|
390
390
|
id: string;
|
|
391
391
|
content: TContent;
|
|
392
392
|
}>(payload: P): Promise<void>;
|
|
393
|
+
_captureTemplateSwitchIfEnabled(): void;
|
|
394
|
+
applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel, activePageId?: string | undefined, logoEditsStr?: string | undefined): Promise<void>;
|
|
395
|
+
_syncLogoSettingsFromSnapshot(snapshot: import("../../../brand-page").BrandPageModel, logoEditsStr?: string | undefined): Promise<void>;
|
|
396
|
+
_navigateToActivePage(activePageId?: string | undefined): void;
|
|
397
|
+
_fallbackSidebarIfSelectedContentMissing(snapshot: import("../../../brand-page").BrandPageModel): void;
|
|
393
398
|
export(): import("../../../brand-page").BrandPageModel;
|
|
394
399
|
setBrandPageType({ brandPageType }: {
|
|
395
400
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
@@ -381,16 +381,21 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
381
381
|
hideChangeTemplateConfirmModal(): void;
|
|
382
382
|
onBackgroundChanged(): void;
|
|
383
383
|
onChangeTemplateConfirmModalCancel(): void;
|
|
384
|
-
onChangeTemplateConfirmModalConfirm(): void
|
|
384
|
+
onChangeTemplateConfirmModalConfirm(): Promise<void>;
|
|
385
385
|
onContentChanged(): void;
|
|
386
386
|
onStyleChanged(): void;
|
|
387
|
-
onTemplateSelected(payload: import("@brand-page-maker/stores").OnTemplateSelectedPayload): void
|
|
387
|
+
onTemplateSelected(payload: import("@brand-page-maker/stores").OnTemplateSelectedPayload): Promise<void>;
|
|
388
388
|
setSelectedTabName(payload: any): void;
|
|
389
389
|
showNextNotificationMessage(): Promise<void>;
|
|
390
390
|
updateContent<TContent extends import("../../../brand-page").Content, P extends {
|
|
391
391
|
id: string;
|
|
392
392
|
content: TContent;
|
|
393
393
|
}>(payload: P): Promise<void>;
|
|
394
|
+
_captureTemplateSwitchIfEnabled(): void;
|
|
395
|
+
applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel, activePageId?: string | undefined, logoEditsStr?: string | undefined): Promise<void>;
|
|
396
|
+
_syncLogoSettingsFromSnapshot(snapshot: import("../../../brand-page").BrandPageModel, logoEditsStr?: string | undefined): Promise<void>;
|
|
397
|
+
_navigateToActivePage(activePageId?: string | undefined): void;
|
|
398
|
+
_fallbackSidebarIfSelectedContentMissing(snapshot: import("../../../brand-page").BrandPageModel): void;
|
|
394
399
|
export(): import("../../../brand-page").BrandPageModel;
|
|
395
400
|
setBrandPageType({ brandPageType }: {
|
|
396
401
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
@@ -112,16 +112,21 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
112
112
|
hideChangeTemplateConfirmModal(): void;
|
|
113
113
|
onBackgroundChanged(): void;
|
|
114
114
|
onChangeTemplateConfirmModalCancel(): void;
|
|
115
|
-
onChangeTemplateConfirmModalConfirm(): void
|
|
115
|
+
onChangeTemplateConfirmModalConfirm(): Promise<void>;
|
|
116
116
|
onContentChanged(): void;
|
|
117
117
|
onStyleChanged(): void;
|
|
118
|
-
onTemplateSelected(payload: import("@brand-page-maker/stores").OnTemplateSelectedPayload): void
|
|
118
|
+
onTemplateSelected(payload: import("@brand-page-maker/stores").OnTemplateSelectedPayload): Promise<void>;
|
|
119
119
|
setSelectedTabName(payload: any): void;
|
|
120
120
|
showNextNotificationMessage(): Promise<void>;
|
|
121
121
|
updateContent<TContent extends import("../../../brand-page").Content, P extends {
|
|
122
122
|
id: string;
|
|
123
123
|
content: TContent;
|
|
124
124
|
}>(payload: P): Promise<void>;
|
|
125
|
+
_captureTemplateSwitchIfEnabled(): void;
|
|
126
|
+
applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel, activePageId?: string | undefined, logoEditsStr?: string | undefined): Promise<void>;
|
|
127
|
+
_syncLogoSettingsFromSnapshot(snapshot: import("../../../brand-page").BrandPageModel, logoEditsStr?: string | undefined): Promise<void>;
|
|
128
|
+
_navigateToActivePage(activePageId?: string | undefined): void;
|
|
129
|
+
_fallbackSidebarIfSelectedContentMissing(snapshot: import("../../../brand-page").BrandPageModel): void;
|
|
125
130
|
export(): import("../../../brand-page").BrandPageModel;
|
|
126
131
|
setBrandPageType({ brandPageType }: {
|
|
127
132
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
@@ -432,16 +432,21 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
432
432
|
hideChangeTemplateConfirmModal(): void;
|
|
433
433
|
onBackgroundChanged(): void;
|
|
434
434
|
onChangeTemplateConfirmModalCancel(): void;
|
|
435
|
-
onChangeTemplateConfirmModalConfirm(): void
|
|
435
|
+
onChangeTemplateConfirmModalConfirm(): Promise<void>;
|
|
436
436
|
onContentChanged(): void;
|
|
437
437
|
onStyleChanged(): void;
|
|
438
|
-
onTemplateSelected(payload: import("@brand-page-maker/stores").OnTemplateSelectedPayload): void
|
|
438
|
+
onTemplateSelected(payload: import("@brand-page-maker/stores").OnTemplateSelectedPayload): Promise<void>;
|
|
439
439
|
setSelectedTabName(payload: any): void;
|
|
440
440
|
showNextNotificationMessage(): Promise<void>;
|
|
441
441
|
updateContent<TContent extends import("@brand-page").Content, P extends {
|
|
442
442
|
id: string;
|
|
443
443
|
content: TContent;
|
|
444
444
|
}>(payload: P): Promise<void>;
|
|
445
|
+
_captureTemplateSwitchIfEnabled(): void;
|
|
446
|
+
applyHistorySnapshot(snapshot: import("@brand-page").BrandPageModel, activePageId?: string | undefined, logoEditsStr?: string | undefined): Promise<void>;
|
|
447
|
+
_syncLogoSettingsFromSnapshot(snapshot: import("@brand-page").BrandPageModel, logoEditsStr?: string | undefined): Promise<void>;
|
|
448
|
+
_navigateToActivePage(activePageId?: string | undefined): void;
|
|
449
|
+
_fallbackSidebarIfSelectedContentMissing(snapshot: import("@brand-page").BrandPageModel): void;
|
|
445
450
|
export(): import("@brand-page").BrandPageModel;
|
|
446
451
|
setBrandPageType({ brandPageType }: {
|
|
447
452
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
@@ -10,6 +10,8 @@ import { usePageNavigationStore } from '../../../shared/page-navigation/store/pa
|
|
|
10
10
|
import { navigateToPageByPageId } from '../../routing';
|
|
11
11
|
import { useSnapshotStore, useAiWebsiteBuilderThreadStore, useAiCheckpointStore, useBrandPageContainerStore, useUiStore, } from '../../stores';
|
|
12
12
|
import { useBrandPageMakerStore } from '../../stores';
|
|
13
|
+
import { useHistoryStore } from '../../stores/history/history-store';
|
|
14
|
+
import { useUndoRedoFlag } from '../useUndoRedoFlag';
|
|
13
15
|
import { useBrandPageMakerUserStore } from '../../stores/user/user-store';
|
|
14
16
|
import { useAiMetadataBuilder } from './useAiMetadataBuilder';
|
|
15
17
|
import { pickErrorMessage, pickWsErrorMessage, buildSubmitErrorReport, } from './aiErrorCopy';
|
|
@@ -23,6 +25,8 @@ export function useAiWebsiteBuilderChat() {
|
|
|
23
25
|
const aiThreadStore = useAiWebsiteBuilderThreadStore();
|
|
24
26
|
const snapshotStore = useSnapshotStore();
|
|
25
27
|
const brandPageMakerStore = useBrandPageMakerStore();
|
|
28
|
+
const historyStore = useHistoryStore();
|
|
29
|
+
const undoRedoEnabled = useUndoRedoFlag();
|
|
26
30
|
const containerStore = useBrandPageContainerStore();
|
|
27
31
|
const userStore = useBrandPageMakerUserStore();
|
|
28
32
|
const uiStore = useUiStore();
|
|
@@ -298,6 +302,11 @@ export function useAiWebsiteBuilderChat() {
|
|
|
298
302
|
navigateToPageByPageId(pageNavigationStore.activePageId);
|
|
299
303
|
}
|
|
300
304
|
await nextTick();
|
|
305
|
+
// One history entry per AI prompt (US-E1). `captureAiChangeset` cancels
|
|
306
|
+
// the auto-watcher's pending flush so the apply doesn't double-capture.
|
|
307
|
+
if (undoRedoEnabled.value) {
|
|
308
|
+
historyStore.captureAiChangeset();
|
|
309
|
+
}
|
|
301
310
|
// Re-capture snapshot so subsequent messages reflect the updated page
|
|
302
311
|
await snapshotStore.refreshSnapshotAsync();
|
|
303
312
|
return {
|
|
@@ -21,6 +21,7 @@ import { buildInitialMarks, emToPx, isStyleChanged, pxToEm, sanitiseClientSideRT
|
|
|
21
21
|
import { HYPERLINK_TYPE, } from '@brand-page';
|
|
22
22
|
import { letterSpacingValueConvertor, colorConvertor, backgroundColorConvertor, } from '@brand-page-maker/convertors';
|
|
23
23
|
import { useUiContentSettingsStore } from '@shared/content-settings/store';
|
|
24
|
+
import { useHistoryStore } from '@brand-page-maker/stores/history/history-store';
|
|
24
25
|
import { AllSelection } from 'prosemirror-state';
|
|
25
26
|
import { MaxLength } from './extensions/MaxLength';
|
|
26
27
|
import { AutoLink } from './extensions/AutoLink';
|
|
@@ -72,6 +73,10 @@ export const useExternalRichTextEditor = () => {
|
|
|
72
73
|
};
|
|
73
74
|
};
|
|
74
75
|
export const useRichTextEditor = (model, props, emit, fontSettings, fontStyleDropdownRef, selectedGlobalTextStyles, onSelectTextStyleType, updateRichTextEditor, textStyleTypeOptions, markedText, isHyperlinkPopupOpen, selectedLinkTypeValue) => {
|
|
76
|
+
const historyStore = useHistoryStore();
|
|
77
|
+
// TipTap rehydrates and writes back canonical HTML on mount — fold
|
|
78
|
+
// that into the current head instead of pushing a phantom entry.
|
|
79
|
+
historyStore.mergeNextMutation();
|
|
75
80
|
const editor = new Editor({
|
|
76
81
|
content: model.value ?? '',
|
|
77
82
|
editable: !props.readOnly,
|
|
@@ -228,8 +233,16 @@ export const useRichTextEditor = (model, props, emit, fontSettings, fontStyleDro
|
|
|
228
233
|
skipStyleDetection(editor.chain().selectAll().setTextAlign(newAlignment)).run();
|
|
229
234
|
}
|
|
230
235
|
});
|
|
236
|
+
let lastAppliedToken = historyStore.snapshotAppliedToken;
|
|
231
237
|
watch(() => model.value, (newValue) => {
|
|
232
|
-
|
|
238
|
+
// Re-seed only on external mutations: an undo/redo apply (detected via
|
|
239
|
+
// the history token) or an explicit override (reorder/template). Never
|
|
240
|
+
// on the editor's own edits — re-running setContent would reset the
|
|
241
|
+
// styles the user just applied (e.g. font size).
|
|
242
|
+
const appliedSinceLast = historyStore.snapshotAppliedToken !== lastAppliedToken;
|
|
243
|
+
lastAppliedToken = historyStore.snapshotAppliedToken;
|
|
244
|
+
const isExternalMutation = updateRichTextEditor.value || appliedSinceLast;
|
|
245
|
+
if (isExternalMutation && editor.getHTML() !== newValue) {
|
|
233
246
|
editor.commands.setContent(newValue, false);
|
|
234
247
|
updateRichTextEditor.value = false;
|
|
235
248
|
//text style type is not switching when reordering
|
|
@@ -256,6 +269,13 @@ export const useRichTextEditor = (model, props, emit, fontSettings, fontStyleDro
|
|
|
256
269
|
emit('update:modelValue', sanitizedData.sanitizedHtml);
|
|
257
270
|
});
|
|
258
271
|
editor.on('selectionUpdate', () => {
|
|
272
|
+
// Skip while a history snapshot is being applied — `setContent` fires
|
|
273
|
+
// selectionUpdate before the editor has fully rehydrated, which causes
|
|
274
|
+
// toolbar buttons (alignment, letter-spacing) to flash through bogus
|
|
275
|
+
// active states before settling. The editor emits a final selectionUpdate
|
|
276
|
+
// after apply completes, which lands the correct values (BP-5506).
|
|
277
|
+
if (historyStore.isApplyingSnapshot)
|
|
278
|
+
return;
|
|
259
279
|
const textStyleAttributes = editor.getAttributes('textStyle');
|
|
260
280
|
const highlightAttributes = editor.getAttributes('highlight');
|
|
261
281
|
const focusedAlignment = editor.getAttributes(editor.state.selection.$anchor.node().type.name);
|