@designcrowd/library.brand-page 5.17.25-undo-14 → 5.17.25-undo-15
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-D0AQ4h1Y.js → CreatedOnBrandCrowd-de-de-5QfzKqjC.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-Bz9D9FcQ.js → CreatedOnBrandCrowd-en-us-Dy3tcwiJ.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-B6EKNEDx.js → CreatedOnBrandCrowd-es-es-BJ8hjzNX.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-DvC5JIAW.js → CreatedOnBrandCrowd-fr-ca-Crc2IixX.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-DvC5JIAW.js → CreatedOnBrandCrowd-fr-fr-Crc2IixX.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-tckhI2rl.js → CreatedOnBrandCrowd-pt-br-wWrA-4hb.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-tckhI2rl.js → CreatedOnBrandCrowd-pt-pt-wWrA-4hb.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-BJAmW8nU.js → CreatedOnDcom-de-de-CeYxTDS_.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-0IxL5rtr.js → CreatedOnDcom-en-us-V7XXdsPr.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-j1tEaAuh.js → CreatedOnDcom-es-es-BIu7YLYP.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-BHD4nfCD.js → CreatedOnDcom-fr-ca-bFnkqoIY.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-D4b447yE.js → CreatedOnDcom-fr-fr-DVmgOG0x.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-6WIaKLxK.js → CreatedOnDcom-pt-br-CnKjkT-U.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-DSvzJLxn.js → CreatedOnDcom-pt-pt-D9bVqfon.js} +1 -1
- package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +2 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +10 -9
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.d.ts +2 -1
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +9 -8
- package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.d.ts +2 -1
- package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +3 -2
- package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +2 -1
- package/lib/src/brand-page-maker/components/social-share/SocialShare.mixin.d.ts +2 -1
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +2 -1
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.js +11 -0
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.d.ts +15 -1
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +39 -1
- package/lib/src/brand-page-maker/stores/history/history-store.d.ts +16 -1
- package/lib/src/brand-page-maker/stores/history/history-store.js +78 -7
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-3NPiNYNp.js → lib-CptQVW37.js} +5642 -5582
- package/lib/src/shared/content-settings/components/GenericTextInput.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +10 -9
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +10 -9
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +7 -7
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +9 -8
- package/lib/src/shared/content-settings/components/email-field/EmailField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +7 -7
- package/lib/src/shared/content-settings/components/radio-field/RadioField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/slider-field/SliderField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/tel-field/TelField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/text-field/TextField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/textarea-field/TextareaField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/url-field/UrlField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/youtube-video-field/YoutubeVideoField.mixin.d.ts +1 -1
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +2 -1
- package/lib/src/shared/page-settings/components/delete-page-modal/DeletePageModal.mixin.d.ts +1 -1
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +9 -8
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +9 -8
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +2 -1
- package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +1 -1
- package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +2 -1
- package/package.json +1 -1
- package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.ts +13 -0
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.test.ts +45 -0
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +48 -1
- package/src/brand-page-maker/stores/history/history-store.test.ts +183 -1
- package/src/brand-page-maker/stores/history/history-store.ts +107 -7
|
@@ -118,8 +118,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
118
118
|
content: TContent;
|
|
119
119
|
}>(payload: P): Promise<void>;
|
|
120
120
|
_captureTemplateSwitchIfEnabled(): void;
|
|
121
|
-
applyHistorySnapshot(snapshot: import("@brand-page/models").BrandPageModel): Promise<void>;
|
|
121
|
+
applyHistorySnapshot(snapshot: import("@brand-page/models").BrandPageModel, activePageId?: string | undefined): Promise<void>;
|
|
122
122
|
_syncLogoSettingsFromSnapshot(snapshot: import("@brand-page/models").BrandPageModel): void;
|
|
123
|
+
_navigateToActivePage(activePageId?: string | undefined): void;
|
|
123
124
|
_fallbackSidebarIfSelectedContentMissing(snapshot: import("@brand-page/models").BrandPageModel): void;
|
|
124
125
|
export(): import("@brand-page/models").BrandPageModel;
|
|
125
126
|
setBrandPageType({ brandPageType }: {
|
|
@@ -58,7 +58,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
58
58
|
selectedTabName: import("vue").ComputedRef<string>;
|
|
59
59
|
isAdmin: import("vue").ComputedRef<boolean>;
|
|
60
60
|
contentErrorCount: import("vue").ComputedRef<number>;
|
|
61
|
-
mode: import("vue").ComputedRef<"images" | "
|
|
61
|
+
mode: import("vue").ComputedRef<"images" | "add" | "pages" | "edit" | "focusedContentItem">;
|
|
62
62
|
brandPageMakerStore: import("pinia").Store<"brandPageMaker", import("@brand-page-maker/stores").BrandPageMakerState, {
|
|
63
63
|
contentErrorCount(): number;
|
|
64
64
|
brandPageBaseUrl(): string;
|
|
@@ -163,8 +163,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
163
163
|
content: TContent;
|
|
164
164
|
}>(payload: P): Promise<void>;
|
|
165
165
|
_captureTemplateSwitchIfEnabled(): void;
|
|
166
|
-
applyHistorySnapshot(snapshot: import("@brand-page").BrandPageModel): Promise<void>;
|
|
166
|
+
applyHistorySnapshot(snapshot: import("@brand-page").BrandPageModel, activePageId?: string | undefined): Promise<void>;
|
|
167
167
|
_syncLogoSettingsFromSnapshot(snapshot: import("@brand-page").BrandPageModel): void;
|
|
168
|
+
_navigateToActivePage(activePageId?: string | undefined): void;
|
|
168
169
|
_fallbackSidebarIfSelectedContentMissing(snapshot: import("@brand-page").BrandPageModel): void;
|
|
169
170
|
export(): import("@brand-page").BrandPageModel;
|
|
170
171
|
setBrandPageType({ brandPageType }: {
|
|
@@ -548,7 +549,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
548
549
|
}[];
|
|
549
550
|
itemStates: Record<string, import("@shared/content-settings/models").ContentSettingsItemState>;
|
|
550
551
|
modeStack: {
|
|
551
|
-
mode: "images" | "
|
|
552
|
+
mode: "images" | "add" | "pages" | "edit" | "focusedContentItem";
|
|
552
553
|
selectedItemId?: string | undefined;
|
|
553
554
|
selectedItemFieldName?: string | undefined;
|
|
554
555
|
selectedItemIndex?: number | undefined;
|
|
@@ -597,7 +598,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
597
598
|
}[];
|
|
598
599
|
itemStates: Record<string, import("@shared/content-settings/models").ContentSettingsItemState>;
|
|
599
600
|
modeStack: {
|
|
600
|
-
mode: "images" | "
|
|
601
|
+
mode: "images" | "add" | "pages" | "edit" | "focusedContentItem";
|
|
601
602
|
selectedItemId?: string | undefined;
|
|
602
603
|
selectedItemFieldName?: string | undefined;
|
|
603
604
|
selectedItemIndex?: number | undefined;
|
|
@@ -646,7 +647,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
646
647
|
}[];
|
|
647
648
|
itemStates: Record<string, import("@shared/content-settings/models").ContentSettingsItemState>;
|
|
648
649
|
modeStack: {
|
|
649
|
-
mode: "images" | "
|
|
650
|
+
mode: "images" | "add" | "pages" | "edit" | "focusedContentItem";
|
|
650
651
|
selectedItemId?: string | undefined;
|
|
651
652
|
selectedItemFieldName?: string | undefined;
|
|
652
653
|
selectedItemIndex?: number | undefined;
|
|
@@ -695,7 +696,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
695
696
|
}[];
|
|
696
697
|
itemStates: Record<string, import("@shared/content-settings/models").ContentSettingsItemState>;
|
|
697
698
|
modeStack: {
|
|
698
|
-
mode: "images" | "
|
|
699
|
+
mode: "images" | "add" | "pages" | "edit" | "focusedContentItem";
|
|
699
700
|
selectedItemId?: string | undefined;
|
|
700
701
|
selectedItemFieldName?: string | undefined;
|
|
701
702
|
selectedItemIndex?: number | undefined;
|
|
@@ -744,7 +745,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
744
745
|
}[];
|
|
745
746
|
itemStates: Record<string, import("@shared/content-settings/models").ContentSettingsItemState>;
|
|
746
747
|
modeStack: {
|
|
747
|
-
mode: "images" | "
|
|
748
|
+
mode: "images" | "add" | "pages" | "edit" | "focusedContentItem";
|
|
748
749
|
selectedItemId?: string | undefined;
|
|
749
750
|
selectedItemFieldName?: string | undefined;
|
|
750
751
|
selectedItemIndex?: number | undefined;
|
|
@@ -793,7 +794,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
793
794
|
}[];
|
|
794
795
|
itemStates: Record<string, import("@shared/content-settings/models").ContentSettingsItemState>;
|
|
795
796
|
modeStack: {
|
|
796
|
-
mode: "images" | "
|
|
797
|
+
mode: "images" | "add" | "pages" | "edit" | "focusedContentItem";
|
|
797
798
|
selectedItemId?: string | undefined;
|
|
798
799
|
selectedItemFieldName?: string | undefined;
|
|
799
800
|
selectedItemIndex?: number | undefined;
|
|
@@ -805,7 +806,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
805
806
|
selectedItemIndex: number | null;
|
|
806
807
|
activeCategoryTab: string;
|
|
807
808
|
} & import("pinia").PiniaCustomStateProperties<import("@shared/content-settings/store").ContentSettingsState>): (id: string, groupId: string) => import("@shared/content-settings/models").ContentSettingsItemGroupState;
|
|
808
|
-
mode(): "images" | "
|
|
809
|
+
mode(): "images" | "add" | "pages" | "edit" | "focusedContentItem";
|
|
809
810
|
selectedItem(): import("@shared/content-settings/models").ContentItem<any> | undefined;
|
|
810
811
|
selectedItemTemplate(): import("@brand-page-maker/models").ContentSettingsConfig<any, {}> | undefined;
|
|
811
812
|
}, {
|
|
@@ -107,8 +107,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
107
107
|
content: TContent;
|
|
108
108
|
}>(payload: P): Promise<void>;
|
|
109
109
|
_captureTemplateSwitchIfEnabled(): void;
|
|
110
|
-
applyHistorySnapshot(snapshot: import("../../../lib").BrandPageModel): Promise<void>;
|
|
110
|
+
applyHistorySnapshot(snapshot: import("../../../lib").BrandPageModel, activePageId?: string | undefined): Promise<void>;
|
|
111
111
|
_syncLogoSettingsFromSnapshot(snapshot: import("../../../lib").BrandPageModel): void;
|
|
112
|
+
_navigateToActivePage(activePageId?: string | undefined): void;
|
|
112
113
|
_fallbackSidebarIfSelectedContentMissing(snapshot: import("../../../lib").BrandPageModel): void;
|
|
113
114
|
export(): import("../../../lib").BrandPageModel;
|
|
114
115
|
setBrandPageType({ brandPageType }: {
|
package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts
CHANGED
|
@@ -108,7 +108,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
108
108
|
}[];
|
|
109
109
|
itemStates: Record<string, import("@shared/content-settings/models").ContentSettingsItemState>;
|
|
110
110
|
modeStack: {
|
|
111
|
-
mode: "images" | "
|
|
111
|
+
mode: "images" | "add" | "pages" | "edit" | "focusedContentItem";
|
|
112
112
|
selectedItemId?: string | undefined;
|
|
113
113
|
selectedItemFieldName?: string | undefined;
|
|
114
114
|
selectedItemIndex?: number | undefined;
|
|
@@ -157,7 +157,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
157
157
|
}[];
|
|
158
158
|
itemStates: Record<string, import("@shared/content-settings/models").ContentSettingsItemState>;
|
|
159
159
|
modeStack: {
|
|
160
|
-
mode: "images" | "
|
|
160
|
+
mode: "images" | "add" | "pages" | "edit" | "focusedContentItem";
|
|
161
161
|
selectedItemId?: string | undefined;
|
|
162
162
|
selectedItemFieldName?: string | undefined;
|
|
163
163
|
selectedItemIndex?: number | undefined;
|
|
@@ -206,7 +206,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
206
206
|
}[];
|
|
207
207
|
itemStates: Record<string, import("@shared/content-settings/models").ContentSettingsItemState>;
|
|
208
208
|
modeStack: {
|
|
209
|
-
mode: "images" | "
|
|
209
|
+
mode: "images" | "add" | "pages" | "edit" | "focusedContentItem";
|
|
210
210
|
selectedItemId?: string | undefined;
|
|
211
211
|
selectedItemFieldName?: string | undefined;
|
|
212
212
|
selectedItemIndex?: number | undefined;
|
|
@@ -255,7 +255,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
255
255
|
}[];
|
|
256
256
|
itemStates: Record<string, import("@shared/content-settings/models").ContentSettingsItemState>;
|
|
257
257
|
modeStack: {
|
|
258
|
-
mode: "images" | "
|
|
258
|
+
mode: "images" | "add" | "pages" | "edit" | "focusedContentItem";
|
|
259
259
|
selectedItemId?: string | undefined;
|
|
260
260
|
selectedItemFieldName?: string | undefined;
|
|
261
261
|
selectedItemIndex?: number | undefined;
|
|
@@ -304,7 +304,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
304
304
|
}[];
|
|
305
305
|
itemStates: Record<string, import("@shared/content-settings/models").ContentSettingsItemState>;
|
|
306
306
|
modeStack: {
|
|
307
|
-
mode: "images" | "
|
|
307
|
+
mode: "images" | "add" | "pages" | "edit" | "focusedContentItem";
|
|
308
308
|
selectedItemId?: string | undefined;
|
|
309
309
|
selectedItemFieldName?: string | undefined;
|
|
310
310
|
selectedItemIndex?: number | undefined;
|
|
@@ -353,7 +353,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
353
353
|
}[];
|
|
354
354
|
itemStates: Record<string, import("@shared/content-settings/models").ContentSettingsItemState>;
|
|
355
355
|
modeStack: {
|
|
356
|
-
mode: "images" | "
|
|
356
|
+
mode: "images" | "add" | "pages" | "edit" | "focusedContentItem";
|
|
357
357
|
selectedItemId?: string | undefined;
|
|
358
358
|
selectedItemFieldName?: string | undefined;
|
|
359
359
|
selectedItemIndex?: number | undefined;
|
|
@@ -365,7 +365,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
365
365
|
selectedItemIndex: number | null;
|
|
366
366
|
activeCategoryTab: string;
|
|
367
367
|
} & import("pinia").PiniaCustomStateProperties<import("@shared/content-settings/store").ContentSettingsState>): (id: string, groupId: string) => import("@shared/content-settings/models").ContentSettingsItemGroupState;
|
|
368
|
-
mode(): "images" | "
|
|
368
|
+
mode(): "images" | "add" | "pages" | "edit" | "focusedContentItem";
|
|
369
369
|
selectedItem(): ContentItem<any> | undefined;
|
|
370
370
|
selectedItemTemplate(): import("../../models").ContentSettingsConfig<any, {}> | undefined;
|
|
371
371
|
}, {
|
|
@@ -613,8 +613,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
613
613
|
content: TContent;
|
|
614
614
|
}>(payload: P): Promise<void>;
|
|
615
615
|
_captureTemplateSwitchIfEnabled(): void;
|
|
616
|
-
applyHistorySnapshot(snapshot: import("@brand-page").BrandPageModel): Promise<void>;
|
|
616
|
+
applyHistorySnapshot(snapshot: import("@brand-page").BrandPageModel, activePageId?: string | undefined): Promise<void>;
|
|
617
617
|
_syncLogoSettingsFromSnapshot(snapshot: import("@brand-page").BrandPageModel): void;
|
|
618
|
+
_navigateToActivePage(activePageId?: string | undefined): void;
|
|
618
619
|
_fallbackSidebarIfSelectedContentMissing(snapshot: import("@brand-page").BrandPageModel): void;
|
|
619
620
|
export(): import("@brand-page").BrandPageModel;
|
|
620
621
|
setBrandPageType({ brandPageType }: {
|
|
@@ -113,8 +113,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
113
113
|
content: TContent;
|
|
114
114
|
}>(payload: P): Promise<void>;
|
|
115
115
|
_captureTemplateSwitchIfEnabled(): void;
|
|
116
|
-
applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel): Promise<void>;
|
|
116
|
+
applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel, activePageId?: string | undefined): Promise<void>;
|
|
117
117
|
_syncLogoSettingsFromSnapshot(snapshot: import("../../../brand-page").BrandPageModel): void;
|
|
118
|
+
_navigateToActivePage(activePageId?: string | undefined): void;
|
|
118
119
|
_fallbackSidebarIfSelectedContentMissing(snapshot: import("../../../brand-page").BrandPageModel): void;
|
|
119
120
|
export(): import("../../../brand-page").BrandPageModel;
|
|
120
121
|
setBrandPageType({ brandPageType }: {
|
|
@@ -419,8 +419,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
419
419
|
content: TContent;
|
|
420
420
|
}>(payload: P): Promise<void>;
|
|
421
421
|
_captureTemplateSwitchIfEnabled(): void;
|
|
422
|
-
applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel): Promise<void>;
|
|
422
|
+
applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel, activePageId?: string | undefined): Promise<void>;
|
|
423
423
|
_syncLogoSettingsFromSnapshot(snapshot: import("../../../brand-page").BrandPageModel): void;
|
|
424
|
+
_navigateToActivePage(activePageId?: string | undefined): void;
|
|
424
425
|
_fallbackSidebarIfSelectedContentMissing(snapshot: import("../../../brand-page").BrandPageModel): void;
|
|
425
426
|
export(): import("../../../brand-page").BrandPageModel;
|
|
426
427
|
setBrandPageType({ brandPageType }: {
|
|
@@ -506,8 +507,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
506
507
|
};
|
|
507
508
|
}>> & Readonly<{}>, {
|
|
508
509
|
pageTitle: string;
|
|
509
|
-
brandPageType: string;
|
|
510
510
|
designDraftToken: string;
|
|
511
|
+
brandPageType: string;
|
|
511
512
|
pageDescription: string;
|
|
512
513
|
isMaker: boolean;
|
|
513
514
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -420,8 +420,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
420
420
|
content: TContent;
|
|
421
421
|
}>(payload: P): Promise<void>;
|
|
422
422
|
_captureTemplateSwitchIfEnabled(): void;
|
|
423
|
-
applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel): Promise<void>;
|
|
423
|
+
applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel, activePageId?: string | undefined): Promise<void>;
|
|
424
424
|
_syncLogoSettingsFromSnapshot(snapshot: import("../../../brand-page").BrandPageModel): void;
|
|
425
|
+
_navigateToActivePage(activePageId?: string | undefined): void;
|
|
425
426
|
_fallbackSidebarIfSelectedContentMissing(snapshot: import("../../../brand-page").BrandPageModel): void;
|
|
426
427
|
export(): import("../../../brand-page").BrandPageModel;
|
|
427
428
|
setBrandPageType({ brandPageType }: {
|
|
@@ -123,8 +123,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
123
123
|
content: TContent;
|
|
124
124
|
}>(payload: P): Promise<void>;
|
|
125
125
|
_captureTemplateSwitchIfEnabled(): void;
|
|
126
|
-
applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel): Promise<void>;
|
|
126
|
+
applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel, activePageId?: string | undefined): Promise<void>;
|
|
127
127
|
_syncLogoSettingsFromSnapshot(snapshot: import("../../../brand-page").BrandPageModel): void;
|
|
128
|
+
_navigateToActivePage(activePageId?: string | undefined): void;
|
|
128
129
|
_fallbackSidebarIfSelectedContentMissing(snapshot: import("../../../brand-page").BrandPageModel): void;
|
|
129
130
|
export(): import("../../../brand-page").BrandPageModel;
|
|
130
131
|
setBrandPageType({ brandPageType }: {
|
|
@@ -471,8 +471,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
471
471
|
content: TContent;
|
|
472
472
|
}>(payload: P): Promise<void>;
|
|
473
473
|
_captureTemplateSwitchIfEnabled(): void;
|
|
474
|
-
applyHistorySnapshot(snapshot: import("@brand-page").BrandPageModel): Promise<void>;
|
|
474
|
+
applyHistorySnapshot(snapshot: import("@brand-page").BrandPageModel, activePageId?: string | undefined): Promise<void>;
|
|
475
475
|
_syncLogoSettingsFromSnapshot(snapshot: import("@brand-page").BrandPageModel): void;
|
|
476
|
+
_navigateToActivePage(activePageId?: string | undefined): void;
|
|
476
477
|
_fallbackSidebarIfSelectedContentMissing(snapshot: import("@brand-page").BrandPageModel): void;
|
|
477
478
|
export(): import("@brand-page").BrandPageModel;
|
|
478
479
|
setBrandPageType({ brandPageType }: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineStore } from 'pinia';
|
|
2
2
|
import brandPageClient, {} from '../../../clients/brand-page-client';
|
|
3
3
|
import { useBrandPageMakerStore, useBrandPageMakerUserStore, useLocalisedRouteStore, useLogoStore, useUiStore, useVideoStore, } from '@brand-page-maker/stores';
|
|
4
|
+
import { useHistoryStore } from '@brand-page-maker/stores/history/history-store';
|
|
4
5
|
import { SIDE_BAR_TAB_NAMES } from '@brand-page-maker/constants';
|
|
5
6
|
import { BRAND_PAGE_TYPES, SENSITIVE_CONTENT_TYPES, getAbTestResults, getValueType, } from '@brand-page';
|
|
6
7
|
import { isLogoContent } from '@brand-page/utils';
|
|
@@ -636,6 +637,16 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
636
637
|
await this.showSaveSuccessMessage();
|
|
637
638
|
await brandPageMakerStore.showNextNotificationMessage();
|
|
638
639
|
}
|
|
640
|
+
// PRD §3 Non-Goals: undo history resets on save/publish so the
|
|
641
|
+
// saved state becomes the new clean baseline. Gate on
|
|
642
|
+
// `baselineCaptured` so non-undo-redo sessions are no-ops (the
|
|
643
|
+
// baseline is only captured when the feature flag is on — see
|
|
644
|
+
// BrandPageMaker.mixin.ts). Both Save Progress and Publish funnel
|
|
645
|
+
// here (publish via `saveAndPublishBrandPage` → `saveBrandPage`).
|
|
646
|
+
const historyStore = useHistoryStore();
|
|
647
|
+
if (historyStore.baselineCaptured) {
|
|
648
|
+
historyStore.reset();
|
|
649
|
+
}
|
|
639
650
|
return {
|
|
640
651
|
saved: true,
|
|
641
652
|
canPublish: response.canPublish,
|
|
@@ -209,8 +209,22 @@ export declare const useBrandPageMakerStore: import("pinia").StoreDefinition<"br
|
|
|
209
209
|
* feature flag is on — see `BrandPageMaker.mixin.ts`).
|
|
210
210
|
*/
|
|
211
211
|
_captureTemplateSwitchIfEnabled(): void;
|
|
212
|
-
applyHistorySnapshot(snapshot: BrandPageModel): Promise<void>;
|
|
212
|
+
applyHistorySnapshot(snapshot: BrandPageModel, activePageId?: string): Promise<void>;
|
|
213
213
|
_syncLogoSettingsFromSnapshot(snapshot: BrandPageModel): void;
|
|
214
|
+
/**
|
|
215
|
+
* Restore the active page after a history apply. The id passed in is
|
|
216
|
+
* already validated against the restored nav by the history store; if
|
|
217
|
+
* it's undefined (no entry walking back had a viable page), fall back
|
|
218
|
+
* to the first/default route so the URL, `routeStore.currentRoute.params`,
|
|
219
|
+
* `pageNavigation.activePageId`, and the page-tab highlight all line up.
|
|
220
|
+
*
|
|
221
|
+
* `setCurrentActivePage` is called explicitly in addition to
|
|
222
|
+
* `navigateToPageByPageId` because `navigateToPageByPageId` is a no-op
|
|
223
|
+
* when the router instance is undefined (e.g. SSR / unit tests), but the
|
|
224
|
+
* Pinia state must still be updated so the sidebar's `currentPage`
|
|
225
|
+
* getter returns the right page.
|
|
226
|
+
*/
|
|
227
|
+
_navigateToActivePage(activePageId?: string): void;
|
|
214
228
|
_fallbackSidebarIfSelectedContentMissing(snapshot: BrandPageModel): void;
|
|
215
229
|
export(): BrandPageModel;
|
|
216
230
|
setBrandPageType({ brandPageType }: {
|
|
@@ -483,7 +483,7 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
483
483
|
return;
|
|
484
484
|
historyStore.captureTemplateSwitch();
|
|
485
485
|
},
|
|
486
|
-
async applyHistorySnapshot(snapshot) {
|
|
486
|
+
async applyHistorySnapshot(snapshot, activePageId) {
|
|
487
487
|
const styleSettingsStore = useUiStyleSettingsStore();
|
|
488
488
|
const navigationStyleSettingsStore = useUiNavigationStyleSettingsStore();
|
|
489
489
|
const backgroundSettingsStore = useUiBackgroundSettingsStore();
|
|
@@ -575,6 +575,17 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
575
575
|
// the restored page, fall back to the Content tab so the user doesn't
|
|
576
576
|
// stare at a blank settings panel.
|
|
577
577
|
this._fallbackSidebarIfSelectedContentMissing(snapshot);
|
|
578
|
+
// 10. Switch to the page the user was viewing when this entry was
|
|
579
|
+
// captured (or the closest still-existing page if the captured
|
|
580
|
+
// page was the one being undone-away). The history store does the
|
|
581
|
+
// walk-back resolution and passes us a pageId that's guaranteed to
|
|
582
|
+
// exist in the restored nav — or undefined if no entry walking
|
|
583
|
+
// back has a viable id, in which case we fall through to the
|
|
584
|
+
// first/default route. Without this, the page-tabs carousel keeps
|
|
585
|
+
// highlighting whatever page slug is in the URL (which can no
|
|
586
|
+
// longer match any nav item after a page-add undo) and the
|
|
587
|
+
// sidebar's `currentPage` getter silently falls back to page 0.
|
|
588
|
+
this._navigateToActivePage(activePageId);
|
|
578
589
|
},
|
|
579
590
|
_syncLogoSettingsFromSnapshot(snapshot) {
|
|
580
591
|
const logoSettingsStore = useUiLogoSettingsStore();
|
|
@@ -609,6 +620,33 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
609
620
|
editableLogoStore.setLogoDraftToken(draftToken);
|
|
610
621
|
editableLogoStore.restoreVariationsForDraftToken(draftToken);
|
|
611
622
|
},
|
|
623
|
+
/**
|
|
624
|
+
* Restore the active page after a history apply. The id passed in is
|
|
625
|
+
* already validated against the restored nav by the history store; if
|
|
626
|
+
* it's undefined (no entry walking back had a viable page), fall back
|
|
627
|
+
* to the first/default route so the URL, `routeStore.currentRoute.params`,
|
|
628
|
+
* `pageNavigation.activePageId`, and the page-tab highlight all line up.
|
|
629
|
+
*
|
|
630
|
+
* `setCurrentActivePage` is called explicitly in addition to
|
|
631
|
+
* `navigateToPageByPageId` because `navigateToPageByPageId` is a no-op
|
|
632
|
+
* when the router instance is undefined (e.g. SSR / unit tests), but the
|
|
633
|
+
* Pinia state must still be updated so the sidebar's `currentPage`
|
|
634
|
+
* getter returns the right page.
|
|
635
|
+
*/
|
|
636
|
+
_navigateToActivePage(activePageId) {
|
|
637
|
+
const pageNavigationStore = usePageNavigationStore();
|
|
638
|
+
let targetPageId = activePageId;
|
|
639
|
+
if (!targetPageId) {
|
|
640
|
+
const fallbackRoute = pageNavigationStore.routes.length
|
|
641
|
+
? pageNavigationStore.getFirstOrDefaultRoute()
|
|
642
|
+
: undefined;
|
|
643
|
+
targetPageId = fallbackRoute?.pageId;
|
|
644
|
+
}
|
|
645
|
+
if (!targetPageId)
|
|
646
|
+
return;
|
|
647
|
+
pageNavigationStore.setCurrentActivePage({ pageId: targetPageId });
|
|
648
|
+
navigateToPageByPageId(targetPageId);
|
|
649
|
+
},
|
|
612
650
|
_fallbackSidebarIfSelectedContentMissing(snapshot) {
|
|
613
651
|
const contentSettingsStore = useUiContentSettingsStore();
|
|
614
652
|
const sideBarStore = useUiSideBarStore();
|
|
@@ -28,6 +28,18 @@ export interface HistoryEntry {
|
|
|
28
28
|
label?: string;
|
|
29
29
|
/** Serialized size in bytes (= snapshot.length in JS string semantics). */
|
|
30
30
|
sizeBytes: number;
|
|
31
|
+
/**
|
|
32
|
+
* The page the user was viewing when this entry was captured. Sidecar to the
|
|
33
|
+
* `BrandPageModel` snapshot — page-tab "selected" styling and the sidebar's
|
|
34
|
+
* `currentPage` getter both key off this id (via the route URL → routeStore →
|
|
35
|
+
* `pageNavigation.activePageId`). Snapshots only contain the document model,
|
|
36
|
+
* so without this we can't restore the URL/active-page on undo and the
|
|
37
|
+
* carousel highlight bleeds through to the page that no longer exists.
|
|
38
|
+
*
|
|
39
|
+
* Empty string when no page is active yet (e.g. earliest baseline before
|
|
40
|
+
* first router push). Always a real id once the editor has settled.
|
|
41
|
+
*/
|
|
42
|
+
activePageId: string;
|
|
31
43
|
}
|
|
32
44
|
export declare const useHistoryStore: import("pinia").StoreDefinition<"history", Pick<{
|
|
33
45
|
entries: import("vue").ShallowRef<HistoryEntry[], HistoryEntry[]>;
|
|
@@ -46,6 +58,7 @@ export declare const useHistoryStore: import("pinia").StoreDefinition<"history",
|
|
|
46
58
|
captureAiChangeset: (label?: string) => 'committed' | 'oversized' | 'noop' | 'skipped';
|
|
47
59
|
undo: () => Promise<void>;
|
|
48
60
|
redo: () => Promise<void>;
|
|
61
|
+
reset: () => void;
|
|
49
62
|
getCurrentSizeBytes: () => number;
|
|
50
63
|
getCurrentEntryCount: () => number;
|
|
51
64
|
}, "entries" | "currentIndex" | "isApplyingSnapshot" | "baselineCaptured">, Pick<{
|
|
@@ -65,6 +78,7 @@ export declare const useHistoryStore: import("pinia").StoreDefinition<"history",
|
|
|
65
78
|
captureAiChangeset: (label?: string) => 'committed' | 'oversized' | 'noop' | 'skipped';
|
|
66
79
|
undo: () => Promise<void>;
|
|
67
80
|
redo: () => Promise<void>;
|
|
81
|
+
reset: () => void;
|
|
68
82
|
getCurrentSizeBytes: () => number;
|
|
69
83
|
getCurrentEntryCount: () => number;
|
|
70
84
|
}, "canUndo" | "canRedo">, Pick<{
|
|
@@ -84,6 +98,7 @@ export declare const useHistoryStore: import("pinia").StoreDefinition<"history",
|
|
|
84
98
|
captureAiChangeset: (label?: string) => 'committed' | 'oversized' | 'noop' | 'skipped';
|
|
85
99
|
undo: () => Promise<void>;
|
|
86
100
|
redo: () => Promise<void>;
|
|
101
|
+
reset: () => void;
|
|
87
102
|
getCurrentSizeBytes: () => number;
|
|
88
103
|
getCurrentEntryCount: () => number;
|
|
89
|
-
}, "undo" | "redo" | "captureBaseline" | "capture" | "captureTemplateSwitch" | "captureAiChangeset" | "getCurrentSizeBytes" | "getCurrentEntryCount">>;
|
|
104
|
+
}, "reset" | "undo" | "redo" | "captureBaseline" | "capture" | "captureTemplateSwitch" | "captureAiChangeset" | "getCurrentSizeBytes" | "getCurrentEntryCount">>;
|