@designcrowd/library.brand-page 6.1.6 → 6.1.7

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.
Files changed (55) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-COw1kYDh.js → CreatedOnBrandCrowd-de-de-Dh3Paq4X.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-JRm1p0it.js → CreatedOnBrandCrowd-en-us-DLWYV4xe.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-D-G9uI6b.js → CreatedOnBrandCrowd-es-es-CcjzRbm_.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-DQCScohj.js → CreatedOnBrandCrowd-fr-ca-UuUNeB_L.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-DQCScohj.js → CreatedOnBrandCrowd-fr-fr-UuUNeB_L.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-4RazAfO7.js → CreatedOnBrandCrowd-pt-br-ZVYZ5AnV.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-4RazAfO7.js → CreatedOnBrandCrowd-pt-pt-ZVYZ5AnV.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-DqvLTbhq.js → CreatedOnDcom-de-de-BPVyqOPL.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-DG1X0ero.js → CreatedOnDcom-en-us-BUSRV01e.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-BxHAIikP.js → CreatedOnDcom-es-es-BuABJnvQ.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-BGXoViAC.js → CreatedOnDcom-fr-ca-sjHceLRY.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-CsvmeK2T.js → CreatedOnDcom-fr-fr-D_qGXL3E.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-DvWm7MjO.js → CreatedOnDcom-pt-br-D3Sb_YEi.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-Bhz2YEVP.js → CreatedOnDcom-pt-pt-BI47Hv58.js} +1 -1
  15. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +0 -1
  16. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +1 -4
  17. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.js +9 -6
  18. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.js +7 -9
  19. package/lib/src/brand-page-maker/constants/sidebar-constant.d.ts +1 -0
  20. package/lib/src/brand-page-maker/constants/sidebar-constant.js +10 -1
  21. package/lib/src/css/library.brand-page-brandCrowd.min.css +27 -27
  22. package/lib/src/css/library.brand-page-brandPage.min.css +27 -27
  23. package/lib/src/css/library.brand-page-designCom.min.css +27 -27
  24. package/lib/src/css/library.brand-page-preview.min.css +27 -27
  25. package/lib/src/index.mjs +1 -1
  26. package/lib/src/{lib-Bg2K2ze6.js → lib-BBX3eBci.js} +13006 -13027
  27. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +10 -177
  28. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.js +8 -15
  29. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +1 -1
  30. package/lib/src/shared/content-settings/store/content-settings-store.d.ts +0 -1
  31. package/lib/src/shared/content-settings/store/content-settings-store.js +0 -1
  32. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +1 -12
  33. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.js +9 -24
  34. package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +1 -1
  35. package/lib/src/shared/side-bar/components/SideBar.mixin.js +6 -6
  36. package/lib/src/shared/side-bar/store/side-bar-store.js +15 -2
  37. package/package.json +1 -1
  38. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +1 -4
  39. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.ts +9 -10
  40. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.vue +2 -0
  41. package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.ts +8 -12
  42. package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.pages-tab.test.ts +78 -0
  43. package/src/brand-page-maker/constants/sidebar-constant.ts +10 -1
  44. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.test.ts +9 -4
  45. package/src/shared/content-settings/components/content-settings/ContentSettings.mixin.ts +7 -19
  46. package/src/shared/content-settings/components/content-settings/ContentSettings.pages-tab.test.ts +20 -0
  47. package/src/shared/content-settings/components/content-settings/ContentSettings.vue +1 -8
  48. package/src/shared/content-settings/store/content-settings-store.ts +0 -1
  49. package/src/shared/page-settings/components/page-settings/PageSettings.image-replace.test.ts +100 -0
  50. package/src/shared/page-settings/components/page-settings/PageSettings.mixin.ts +14 -31
  51. package/src/shared/page-settings/components/page-settings/PageSettings.vue +11 -7
  52. package/src/shared/side-bar/components/SideBar.landing-tab.test.ts +67 -0
  53. package/src/shared/side-bar/components/SideBar.mixin.ts +6 -6
  54. package/src/shared/side-bar/store/side-bar-store.test.ts +124 -0
  55. package/src/shared/side-bar/store/side-bar-store.ts +17 -2
@@ -6,186 +6,12 @@ interface CategoryTab {
6
6
  label: string;
7
7
  }
8
8
  declare const _default: import("vue").DefineComponent<{}, {
9
- mode: import("vue").ComputedRef<"images" | "add" | "pages" | "edit" | "focusedContentItem">;
10
- pages: import("vue").ComputedRef<{
11
- id: string;
12
- title: string;
13
- contents: {
14
- id: string;
15
- type: import("@brand-page").ContentType;
16
- settings: {
17
- content: {
18
- id: string;
19
- type: import("@brand-page").ContentType;
20
- personalisationRole?: import("@brand-page").PersonalisationRole | undefined;
21
- topPadding?: number | undefined;
22
- bottomPadding?: number | undefined;
23
- imageUrlOverride?: string | undefined;
24
- imageUrlsOverride?: string | undefined;
25
- avatarImageUrlOverride?: string | undefined;
26
- backgroundImageUrlOverride?: string | undefined;
27
- nameOverride?: string | undefined;
28
- titleOverride?: string | undefined;
29
- descriptionOverride?: string | undefined;
30
- buttonTextOverride?: string | undefined;
31
- ctaTitleOverride?: string | undefined;
32
- urlOverride?: string | undefined;
33
- textOverride?: string | undefined;
34
- paragraphOverride?: string | undefined;
35
- };
36
- fields: Record<string, import("../../models").ContentItemFieldSettings>;
37
- };
38
- }[];
39
- }[]>;
9
+ mode: import("vue").ComputedRef<"images" | "add" | "edit" | "focusedContentItem">;
40
10
  activePageId: import("vue").ComputedRef<string>;
41
11
  activeCategoryTab: import("vue").ComputedRef<string>;
42
- isBrandSite: import("vue").ComputedRef<boolean>;
43
12
  contentSettingsSelectedItemId: import("vue").ComputedRef<string | null>;
44
13
  isAdminMaker: import("vue").ComputedRef<boolean>;
45
14
  canUseRichTextEditor: import("vue").ComputedRef<boolean>;
46
- brandPageMakerStore: import("pinia").Store<"brandPageMaker", import("@brand-page-maker/stores").BrandPageMakerState, {
47
- contentErrorCount(): number;
48
- brandPageBaseUrl(): string;
49
- brandPageContentTypes(): string[];
50
- brandPageData(): import("@brand-page").BrandPageModel;
51
- brandPageToken(): string | undefined;
52
- brandPageDescription(): string;
53
- brandPageSlug(): string;
54
- brandPageTemplate(): import("@brand-page").BrandPageData;
55
- brandPageTitle(): string;
56
- brandPageViewModel(): import("@brand-page").BrandPageViewModel;
57
- gettyVideoIds(): string[];
58
- isInteractivePreviewEnabled(): boolean;
59
- isProduction(): boolean;
60
- isPublishButtonEnabled(): boolean;
61
- isPublished(): boolean;
62
- isPublishing(): boolean;
63
- isSaving(): boolean;
64
- isUserDraft(): boolean;
65
- runtimeEnvironment(): string;
66
- showBrandCrowdLogo(): boolean;
67
- }, {
68
- setMode(payload: {
69
- mode: import("@brand-page-maker/stores").BrandPageSettingsMode;
70
- }): void;
71
- setFaviconUrl(payload: {
72
- faviconUrl: string | undefined;
73
- }): void;
74
- setOgImageUrl(payload: {
75
- ogImageUrl: string | undefined;
76
- }): void;
77
- setMeasurementID(payload: {
78
- measurementID: string | undefined;
79
- }): void;
80
- setAdsenseID(payload: {
81
- adsenseID: string | undefined;
82
- }): void;
83
- setOgTitle(payload: {
84
- ogTitle: string | undefined;
85
- }): void;
86
- setOgDescription(payload: {
87
- ogDescription: string | undefined;
88
- }): void;
89
- setCookieEnabled(payload: {
90
- isCookieEnabled: boolean;
91
- }): void;
92
- setSavingEnabled(payload: {
93
- isSavingEnabled: boolean;
94
- }): void;
95
- setHideBranding(payload: {
96
- hideBranding: boolean;
97
- }): void;
98
- setSensitiveContent(payload: {
99
- sensitiveContent: string;
100
- }): void;
101
- setCookiePreviewEnabled(payload: {
102
- isCookiePreviewEnabled: boolean;
103
- }): void;
104
- setFieldSettings(payload: {
105
- settings: import("../../models").FieldSettingsBase;
106
- }): void;
107
- enqueueNotificationMessage({ message, }: {
108
- message: import("@brand-page-maker/stores").NotificationMessage;
109
- }): void;
110
- enqueueContentErrorMessage(): void;
111
- dequeueNotificationMessageQueue(): void;
112
- setCurrentNotificationMessage(payload: {
113
- message: import("@brand-page-maker/stores").NotificationMessage | false;
114
- }): void;
115
- setIsApplyingTemplate(payload: import("@brand-page-maker/stores").IsApplyingTemplatePayload): void;
116
- setIsPageNavigating(isPageNavigating: boolean): void;
117
- setIsChangeTemplateConfirmModalVisible(payload: {
118
- isVisible: boolean;
119
- }): void;
120
- setIsInitialising(payload: {
121
- isInitialising: boolean;
122
- }): void;
123
- setIsBrandPageLoaded(isLoaded: boolean): void;
124
- setIsModifiedAfterTemplateApplied({ isModified, }?: import("@brand-page-maker/stores").SetIsModifiedPayload): void;
125
- setSelectedTemplateId(payload: {
126
- templateId: string | false;
127
- }): void;
128
- recalculateLogoSizes(forceRecalculate?: boolean): Promise<void>;
129
- applySelectedTemplate(): Promise<void>;
130
- enqueueErrorMessage(): Promise<void>;
131
- enqueueSaveSuccessMessage(payload?: {
132
- description?: string;
133
- isPublished?: boolean;
134
- noDescription?: boolean;
135
- }): Promise<void>;
136
- hideChangeTemplateConfirmModal(): void;
137
- onBackgroundChanged(): void;
138
- onChangeTemplateConfirmModalCancel(): void;
139
- onChangeTemplateConfirmModalConfirm(): Promise<void>;
140
- onContentChanged(): void;
141
- onStyleChanged(): void;
142
- onTemplateSelected(payload: import("@brand-page-maker/stores").OnTemplateSelectedPayload): Promise<void>;
143
- setSelectedTabName(payload: any): void;
144
- showNextNotificationMessage(): Promise<void>;
145
- updateContent<TContent extends Content, P extends {
146
- id: string;
147
- content: TContent;
148
- }>(payload: P): Promise<void>;
149
- _captureTemplateSwitchIfEnabled(): void;
150
- applyHistorySnapshot(snapshot: import("@brand-page").BrandPageModel, activePageId?: string, logoEditsStr?: string, selectedTemplateId?: string | false): Promise<void>;
151
- _syncLogoSettingsFromSnapshot(snapshot: import("@brand-page").BrandPageModel, logoEditsStr?: string): Promise<void>;
152
- _navigateToActivePage(activePageId?: string): void;
153
- _fallbackSidebarIfSelectedContentMissing(snapshot: import("@brand-page").BrandPageModel): void;
154
- export(): import("@brand-page").BrandPageModel;
155
- setBrandPageType({ brandPageType }: {
156
- brandPageType: import("@brand-page").BrandPageType;
157
- }): void;
158
- initialiseStoresByBrandPageModelAsync(brandPageModel: import("@brand-page").BrandPageModel): Promise<void>;
159
- initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, userPromptContentKey, showAiTemplatesTab, businessName, industry, layout, logoVariationImageUrls, shopConfigData: _shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
160
- initialisePages({ pages, sections, }: {
161
- pages: import("@brand-page").PageModel[];
162
- sections: import("../../../page-settings/store").PageSettingsStateSections;
163
- }): void;
164
- initialisePagesForCurrentPage({ pages, sections, }: {
165
- pages: import("@brand-page").PageModel[];
166
- sections: import("../../../page-settings/store").PageSettingsStateSections;
167
- }): void;
168
- initialiseAdminMaker(payload: {
169
- models: import("../../../../brand-page-maker/stores/admin-logo-settings").AdminPreviewLogoTemplateModel[];
170
- }): void;
171
- setIsSaving(payload: import("@brand-page-maker/stores").SetIsSavingPayload): Promise<void>;
172
- showBrandPageSlugEditModal(): Promise<void>;
173
- updateBrandPageSettings(payload: import("@brand-page-maker/stores").UpdateBrandPageSettingsPayload): Promise<void>;
174
- updateSensitiveContentSettings(payload: import("@brand-page-maker/stores").UpdateSensitiveContentPayload): Promise<void>;
175
- updateAndSaveMeasurementID(payload: {
176
- measurementID: string | undefined;
177
- }): Promise<void>;
178
- updateAndSaveAdsenseID(payload: {
179
- adsenseID: string | undefined;
180
- }): Promise<void>;
181
- validateContentItems(): Promise<void>;
182
- validateBrandPageData(): Promise<void>;
183
- setViewport(payload: {
184
- viewport: import("@brand-page").ViewportsType;
185
- }): void;
186
- showStripeOnboardingModal(): Promise<void>;
187
- selectInitialCategories(payload: import("@brand-page-maker/stores").SelectedCategoryPayload): void;
188
- }>;
189
15
  contentSettingsStore: import("pinia").Store<"uiContentSettings", import("../../store").ContentSettingsState, {
190
16
  contentErrorCount(): number;
191
17
  getContent(state: {
@@ -737,6 +563,15 @@ declare const _default: import("vue").DefineComponent<{}, {
737
563
  collapseAllSections(): void;
738
564
  setPreviousSelectedDisplayStyle(viewport: string, displayStyle: string): void;
739
565
  }>;
566
+ sideBarStore: import("pinia").Store<"uiSideBar", import("../../../side-bar/store").SideBarState, {}, {
567
+ setBrandPageSettingsTabVisibility(payload: {
568
+ isVisible: boolean;
569
+ }): void;
570
+ setSelectedTabName(payload: import("../../../side-bar/models").SetSelectedTabNamePayload): void;
571
+ setSelectedSettingsSection(payload: {
572
+ sectionName?: string;
573
+ }): void;
574
+ }>;
740
575
  styleSettingsStore: import("pinia").Store<"uiStyleSettings", import("../../../style-settings/store").StyleSettingsState, {
741
576
  availableTextFontFamilyOptions(): import("../../../style-settings/models").StyleTextFontFamilyOption[];
742
577
  buttonBorderColor(): string | undefined;
@@ -928,10 +763,8 @@ declare const _default: import("vue").DefineComponent<{}, {
928
763
  externalEditor: import("@tiptap/vue-3").Editor;
929
764
  }, {
930
765
  categoryTabs: CategoryTab[];
931
- isAddPageModalVisible: boolean;
932
766
  }, {
933
767
  showPageControls(): boolean;
934
- isManagePagesButtonVisible(): boolean;
935
768
  visibleCategoryTabs(): CategoryTab[];
936
769
  visibleContentOptions(): AddContentOption<any>[];
937
770
  contentListItems(): ContentItem<Content>[];
@@ -1,10 +1,12 @@
1
1
  import { defineComponent, computed } from 'vue';
2
2
  import { ITEM_CATEGORIES, ITEM_CATEGORY_NAMES } from '@brand-page-maker/models';
3
3
  import { UI_EVENT_SOURCES } from '../../../models';
4
- import { PAGE_SETTINGS_SECTIONS, useUiPageSettingsStore, } from '../../../page-settings/store';
4
+ import { useUiPageSettingsStore } from '../../../page-settings/store';
5
+ import { useUiSideBarStore } from '../../../side-bar/store';
6
+ import { SIDE_BAR_TAB_NAMES } from '@brand-page-maker/constants';
5
7
  import { useUiContentSettingsStore } from '../../store';
6
8
  import { CONTENT_SETTINGS_MODES } from '../../store';
7
- import { useBrandPageMakerStore, useBrandPageMakerUserStore, useBrandPageContainerStore, } from '@brand-page-maker/stores';
9
+ import { useBrandPageMakerUserStore, useBrandPageContainerStore, } from '@brand-page-maker/stores';
8
10
  import { SIDE_BAR_CONTENT_ID } from '../../constants';
9
11
  import { SELECT_LOCATIONS, useEventTracker, } from '@brand-page-maker/composables/useEventTracker';
10
12
  import { useExternalRichTextEditor } from '@brand-page-maker/composables/rich-text-editor/useRichTextEditor';
@@ -15,11 +17,11 @@ import { useHistoryStore } from '@brand-page-maker/stores/history/history-store'
15
17
  export default defineComponent({
16
18
  emits: ['capture-preview-snapshot'],
17
19
  setup() {
18
- const brandPageMakerStore = useBrandPageMakerStore();
19
20
  const contentSettingsStore = useUiContentSettingsStore();
20
21
  const pageSettingsStore = useUiPageSettingsStore();
21
22
  const pageNavigationStore = usePageNavigationStore();
22
23
  const styleSettingsStore = useUiStyleSettingsStore();
24
+ const sideBarStore = useUiSideBarStore();
23
25
  const userStore = useBrandPageMakerUserStore();
24
26
  const containerStore = useBrandPageContainerStore();
25
27
  const eventTracker = useEventTracker();
@@ -27,17 +29,15 @@ export default defineComponent({
27
29
  const { externalEditor } = useExternalRichTextEditor();
28
30
  return {
29
31
  mode: computed(() => contentSettingsStore.mode),
30
- pages: computed(() => pageSettingsStore.pages),
31
32
  activePageId: computed(() => pageNavigationStore.activePageId),
32
33
  activeCategoryTab: computed(() => contentSettingsStore.activeCategoryTab),
33
- isBrandSite: computed(() => brandPageMakerStore.isBrandSite),
34
34
  contentSettingsSelectedItemId: computed(() => contentSettingsStore.selectedItemId),
35
35
  isAdminMaker: computed(() => containerStore.isAdminMaker),
36
36
  canUseRichTextEditor: computed(() => userStore.features.canUseRichTextEditor),
37
- brandPageMakerStore,
38
37
  contentSettingsStore,
39
38
  pageNavigationStore,
40
39
  pageSettingsStore,
40
+ sideBarStore,
41
41
  styleSettingsStore,
42
42
  eventTracker,
43
43
  historyStore,
@@ -52,7 +52,6 @@ export default defineComponent({
52
52
  label: ITEM_CATEGORY_NAMES()[c].displayName,
53
53
  })),
54
54
  ],
55
- isAddPageModalVisible: false,
56
55
  };
57
56
  },
58
57
  mounted() {
@@ -66,9 +65,6 @@ export default defineComponent({
66
65
  showPageControls() {
67
66
  return true;
68
67
  },
69
- isManagePagesButtonVisible() {
70
- return this.isBrandSite || this.pageSettingsStore.pages.length > 1;
71
- },
72
68
  visibleCategoryTabs() {
73
69
  return this.categoryTabs.filter((t) => t.category === ITEM_CATEGORY_NAMES().all.key ||
74
70
  this.contentSettingsStore.addContentOptions.some((o) => o.category === t.category && o.isEnabled));
@@ -152,11 +148,8 @@ export default defineComponent({
152
148
  this.eventTracker.sendRemoveContentEvent(type, SELECT_LOCATIONS.SIDEBAR, this.contentSettingsStore.getContentCategory(type));
153
149
  },
154
150
  onManagePageButtonClick() {
155
- this.contentSettingsStore.pushMode({
156
- mode: CONTENT_SETTINGS_MODES.pages,
157
- });
158
- this.pageSettingsStore.setSelectedSectionName({
159
- sectionName: PAGE_SETTINGS_SECTIONS.pages,
151
+ this.sideBarStore.setSelectedTabName({
152
+ tabName: SIDE_BAR_TAB_NAMES.PAGE_SETTINGS,
160
153
  });
161
154
  },
162
155
  onAddPageButtonClick() {
@@ -34,7 +34,7 @@ declare const _default: import("vue").DefineComponent<{}, {
34
34
  selectedItemIndex: import("vue").ComputedRef<number | null>;
35
35
  selectedItemValue: import("vue").ComputedRef<string | null>;
36
36
  contentType: import("vue").ComputedRef<"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" | undefined>;
37
- mode: import("vue").ComputedRef<"images" | "add" | "pages" | "edit" | "focusedContentItem">;
37
+ mode: import("vue").ComputedRef<"images" | "add" | "edit" | "focusedContentItem">;
38
38
  isAdminMaker: import("vue").ComputedRef<boolean>;
39
39
  contentSettingsStore: import("pinia").Store<"uiContentSettings", import("../../store").ContentSettingsState, {
40
40
  contentErrorCount(): number;
@@ -7,7 +7,6 @@ export declare const CONTENT_SETTINGS_MODES: {
7
7
  readonly edit: "edit";
8
8
  readonly add: "add";
9
9
  readonly images: "images";
10
- readonly pages: "pages";
11
10
  readonly focusedContentItem: "focusedContentItem";
12
11
  };
13
12
  export type ContentSettingsMode = keyof typeof CONTENT_SETTINGS_MODES;
@@ -44,7 +44,6 @@ export const CONTENT_SETTINGS_MODES = {
44
44
  edit: 'edit',
45
45
  add: 'add',
46
46
  images: 'images',
47
- pages: 'pages',
48
47
  focusedContentItem: 'focusedContentItem',
49
48
  };
50
49
  export const DEFAULT_CONSTANT_SETTINGS_MODE = CONTENT_SETTINGS_MODES.edit;
@@ -8,11 +8,6 @@ export interface PageField {
8
8
  pageTitleError: string | null;
9
9
  page: ContentPage;
10
10
  }
11
- declare const PAGE_SETTINGS_PAGES: {
12
- readonly page: "page";
13
- readonly logo: "logo";
14
- };
15
- type PageSettingsPage = keyof typeof PAGE_SETTINGS_PAGES;
16
11
  declare const _default: import("vue").DefineComponent<{}, {
17
12
  pageFields: import("vue").WritableComputedRef<{
18
13
  page: {
@@ -5017,11 +5012,6 @@ declare const _default: import("vue").DefineComponent<{}, {
5017
5012
  isDeleteModalVisible: boolean;
5018
5013
  deleteModalPageId: string | undefined;
5019
5014
  deleteModalPageTitle: string | undefined;
5020
- currentPageNo: PageSettingsPage;
5021
- PAGE_SETTINGS_PAGES: {
5022
- readonly page: "page";
5023
- readonly logo: "logo";
5024
- };
5025
5015
  PAGE_SETTINGS_SECTIONS: {
5026
5016
  readonly pages: "pages";
5027
5017
  readonly header: "header";
@@ -5039,6 +5029,7 @@ declare const _default: import("vue").DefineComponent<{}, {
5039
5029
  footerPageSectionStyleOptions(): PageSectionStyleOption[];
5040
5030
  footerFontSettingsOptions(): PageSettingsFontSettingsOption[];
5041
5031
  showFooterSettings(): boolean;
5032
+ isReplacingPageSettingsImage(): boolean;
5042
5033
  hideText(): any;
5043
5034
  }, {
5044
5035
  isRootPage(index: number): boolean;
@@ -5048,9 +5039,7 @@ declare const _default: import("vue").DefineComponent<{}, {
5048
5039
  onDeletePageSelected(pageId: string): void;
5049
5040
  onConfirmDeletePage(pageId: string): void;
5050
5041
  onCancelDeletePage(): void;
5051
- onLogoVariationSelected(value: string): void;
5052
5042
  onPageTitleInput(pageId: string, title: string): void;
5053
- onBackButtonClick(): void;
5054
5043
  scrollToPageSettingsSection(sectionName: PageSettingsSection): void;
5055
5044
  onHideBrandPageLogoClickFromFooter(): Promise<void>;
5056
5045
  }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -3,7 +3,8 @@ import {} from '../../models';
3
3
  import { getPageTitleError } from '../../utils';
4
4
  import { ALIGN_CENTERED, ALIGN_JUSTIFIED, ALIGN_LEFT_ALIGNED, } from '@brand-page';
5
5
  import { PAGE_SECTION_STYLE_OPTIONS, } from '@brand-page-maker/models/page-section-style.model';
6
- import { useUiContentSettingsStore } from '../../../content-settings/store';
6
+ import { CONTENT_SETTINGS_MODES, useUiContentSettingsStore, } from '../../../content-settings/store';
7
+ import { UI_EVENT_SOURCES } from '../../../models';
7
8
  import { PAGE_SETTINGS_SECTIONS, useUiPageSettingsStore, } from '../../store';
8
9
  import { useUiNavigationStyleSettingsStore } from '../../../navigation-style-settings/store';
9
10
  import { useBrandPageMakerStore, useBrandPageMakerUserStore, useUiStore, useBrandPageContainerStore, } from '@brand-page-maker/stores';
@@ -13,10 +14,6 @@ import { pageSettingTr, styleSettingsTr } from '@src/composables/useTranslate';
13
14
  import { WEBSITE_UPGRADE_CONTEXT_TYPES } from '@designcrowd/fe-shared-lib';
14
15
  import { usePageNavigationStore } from '../../../page-navigation/store/page-navigation-store';
15
16
  import { navigateToPageByPageId } from '@brand-page-maker/routing';
16
- const PAGE_SETTINGS_PAGES = {
17
- page: 'page',
18
- logo: 'logo',
19
- };
20
17
  const isRouteNestedInOrders = (orders, routeId) => {
21
18
  for (const order of orders) {
22
19
  if (order.subRoutes.some((subRoute) => subRoute.routeId === routeId)) {
@@ -170,8 +167,6 @@ export default defineComponent({
170
167
  isDeleteModalVisible: false,
171
168
  deleteModalPageId: undefined,
172
169
  deleteModalPageTitle: undefined,
173
- currentPageNo: PAGE_SETTINGS_PAGES.page,
174
- PAGE_SETTINGS_PAGES,
175
170
  PAGE_SETTINGS_SECTIONS,
176
171
  ALIGN_LEFT_ALIGNED,
177
172
  ALIGN_CENTERED,
@@ -227,6 +222,13 @@ export default defineComponent({
227
222
  showFooterSettings() {
228
223
  return this.isBrandSite;
229
224
  },
225
+ // Header/footer image-replace intents (e.g. a social link icon) route through the
226
+ // shared content-settings image picker rather than duplicating it here.
227
+ isReplacingPageSettingsImage() {
228
+ return (this.contentSettingsStore.mode === CONTENT_SETTINGS_MODES.images &&
229
+ this.contentSettingsStore.selectedItemEventSource ===
230
+ UI_EVENT_SOURCES.pageSettings);
231
+ },
230
232
  hideText() {
231
233
  return this.isDesignCom
232
234
  ? styleSettingsTr(`hideDesignLogo`)
@@ -321,29 +323,12 @@ export default defineComponent({
321
323
  onCancelDeletePage() {
322
324
  this.isDeleteModalVisible = false;
323
325
  },
324
- onLogoVariationSelected(value) {
325
- if (!this.selectedSectionName) {
326
- return;
327
- }
328
- const sectionName = this.selectedSectionName;
329
- this.pageSettingsStore.setPageSettingsSectionValue({
330
- sectionName,
331
- propName: 'logoImageUrl',
332
- value,
333
- viewport: this.viewport,
334
- });
335
- this.currentPageNo = PAGE_SETTINGS_PAGES.page;
336
- this.pageSettingsStore.setSelectedSectionName({ sectionName });
337
- },
338
326
  onPageTitleInput(pageId, title) {
339
327
  this.pageSettingsStore.setPageTitle({
340
328
  pageId,
341
329
  pageTitle: title,
342
330
  });
343
331
  },
344
- onBackButtonClick() {
345
- this.contentSettingsStore.popMode();
346
- },
347
332
  scrollToPageSettingsSection(sectionName) {
348
333
  this.$nextTick(() => {
349
334
  const $sideBarContent = document.querySelector(`#${SIDE_BAR_CONTENT_ID}`);
@@ -422,7 +422,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
422
422
  }[]>;
423
423
  selectedTabName: import("vue").ComputedRef<string>;
424
424
  isAdminMaker: import("vue").ComputedRef<boolean>;
425
- contentSettingsMode: import("vue").ComputedRef<"images" | "add" | "pages" | "edit" | "focusedContentItem">;
425
+ contentSettingsMode: import("vue").ComputedRef<"images" | "add" | "edit" | "focusedContentItem">;
426
426
  contentSettingsSelectedItemId: import("vue").ComputedRef<string | null>;
427
427
  sideBarStore: import("pinia").Store<"uiSideBar", import("../store").SideBarState, {}, {
428
428
  setBrandPageSettingsTabVisibility(payload: {
@@ -60,13 +60,13 @@ export default defineComponent({
60
60
  methods: {
61
61
  update() {
62
62
  if (this.isMobileScreenSize === false) {
63
- const index = this.brandPageContainerStore.isPublished ||
63
+ // Land on Content for returning editors, Templates for new sites.
64
+ // Select by name, not list position — the tab order is not fixed.
65
+ const tabName = this.brandPageContainerStore.isPublished ||
64
66
  this.brandPageContainerStore.isUserDraft
65
- ? 1
66
- : 0;
67
- this.sideBarStore.setSelectedTabName({
68
- tabName: this.tabs.filter((x) => !x.isMobileOnly)[index].name,
69
- });
67
+ ? SIDE_BAR_TAB_NAMES.CONTENT_SETTINGS
68
+ : SIDE_BAR_TAB_NAMES.TEMPLATE_SETTINGS;
69
+ this.sideBarStore.setSelectedTabName({ tabName });
70
70
  }
71
71
  else {
72
72
  this.sideBarStore.setSelectedTabName({ tabName: this.mobileTabName });
@@ -2,10 +2,11 @@ import { nextTick } from 'vue';
2
2
  import { defineStore } from 'pinia';
3
3
  import { DEFAULT_SIDE_BAR_TABS, SIDE_BAR_TAB_NAMES, } from '@brand-page-maker/constants';
4
4
  import { PAGE_SETTINGS_SECTIONS, useUiPageSettingsStore, } from '../../page-settings/store';
5
+ import { useUiContentSettingsStore } from '../../content-settings/store';
5
6
  export const useUiSideBarStore = defineStore('uiSideBar', {
6
7
  state: () => ({
7
8
  tabs: DEFAULT_SIDE_BAR_TABS(),
8
- selectedTabName: DEFAULT_SIDE_BAR_TABS()[1].name,
9
+ selectedTabName: SIDE_BAR_TAB_NAMES.TEMPLATE_SETTINGS,
9
10
  isSwitchingTab: false,
10
11
  selectedSettingsSection: undefined,
11
12
  }),
@@ -20,8 +21,20 @@ export const useUiSideBarStore = defineStore('uiSideBar', {
20
21
  setSelectedTabName(payload) {
21
22
  this.isSwitchingTab = true;
22
23
  try {
24
+ const isActualTabChange = this.selectedTabName !== payload.tabName;
23
25
  this.selectedTabName = payload.tabName;
24
- if (this.selectedTabName === SIDE_BAR_TAB_NAMES.CONTENT_SETTINGS) {
26
+ // Only one tab's component is ever mounted at a time (BrandPageMaker.vue
27
+ // `<component :is="selectedTabName">`), so a mode left on the shared
28
+ // content-settings store by the tab we're leaving (e.g. an in-flight image
29
+ // replace) has nowhere to render once we've switched — clear it so every
30
+ // *actual* tab switch is a clean slate (BP-5855). Gated on a real change:
31
+ // re-selecting the tab you're already on (e.g. clicking the active sidebar
32
+ // tab again) must NOT reset an in-progress, same-tab mode such as a focused
33
+ // content item (SideBarTabButton fires this unconditionally on every click).
34
+ if (isActualTabChange) {
35
+ useUiContentSettingsStore().resetMode();
36
+ }
37
+ if (this.selectedTabName === SIDE_BAR_TAB_NAMES.PAGE_SETTINGS) {
25
38
  const pageSettingsStore = useUiPageSettingsStore();
26
39
  pageSettingsStore.setSelectedSectionName({
27
40
  sectionName: PAGE_SETTINGS_SECTIONS.pages,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@designcrowd/library.brand-page",
3
3
  "description": "A collection of Maker/Designer applications",
4
- "version": "6.1.6",
4
+ "version": "6.1.7",
5
5
  "author": "Design.com Eng",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",
@@ -154,7 +154,6 @@ export default defineComponent({
154
154
  selectedTabName: computed(() => sideBarStore.selectedTabName),
155
155
  isAdminMaker: computed(() => containerStore.isAdminMaker),
156
156
  contentErrorCount: computed(() => contentSettingsStore.contentErrorCount),
157
- mode: computed(() => contentSettingsStore.mode),
158
157
  brandPageMakerStore,
159
158
  uiSideBarStore: sideBarStore,
160
159
  userStore,
@@ -262,9 +261,7 @@ export default defineComponent({
262
261
 
263
262
  this.router.afterEach(
264
263
  ((to) => {
265
- if (this.mode !== 'pages') {
266
- this.contentSettingsStore.resetMode();
267
- }
264
+ this.contentSettingsStore.resetMode();
268
265
 
269
266
  const associatedNavItem = findNavItemByRelativePath(
270
267
  this.brandPageViewModel.nav.navItems,
@@ -85,10 +85,8 @@ import {
85
85
  profileContent,
86
86
  textContent,
87
87
  } from './__fixtures__/content-settings-items.fixture';
88
- import {
89
- CONTENT_SETTINGS_MODES,
90
- useUiContentSettingsStore,
91
- } from '@shared/content-settings/store';
88
+ import { useUiContentSettingsStore } from '@shared/content-settings/store';
89
+ import { useUiSideBarStore } from '@shared/side-bar/store';
92
90
  import { createPinia } from 'pinia';
93
91
  import {
94
92
  useUiStore,
@@ -347,14 +345,9 @@ export const SampleDesktopManagePages = (): any => {
347
345
  const pinia = setupStoryPinia();
348
346
  InitialiseMakerStores({});
349
347
 
350
- const contentSettingsStore = useUiContentSettingsStore();
351
348
  const brandPageMakerStore = useBrandPageMakerStore();
352
349
  const userStore = useBrandPageMakerUserStore();
353
350
 
354
- contentSettingsStore.pushMode({
355
- mode: CONTENT_SETTINGS_MODES.pages,
356
- });
357
-
358
351
  brandPageMakerStore.setViewport({
359
352
  viewport: VIEWPORTS.desktop,
360
353
  });
@@ -416,7 +409,13 @@ export const SampleDesktopManagePages = (): any => {
416
409
  },
417
410
  };
418
411
  },
419
- mounted() {},
412
+ mounted() {
413
+ // Set after mount — SideBar's mounted() picks the default tab, so a
414
+ // pre-mount selection would be overwritten.
415
+ useUiSideBarStore().setSelectedTabName({
416
+ tabName: SIDE_BAR_TAB_NAMES.PAGE_SETTINGS,
417
+ });
418
+ },
420
419
  template: `
421
420
  <BrandPageMaker :view-model="viewModel"/>
422
421
  `,
@@ -167,6 +167,7 @@ import Device from '../device/Device.vue';
167
167
  import LayoutSwitcher from '../layout-switcher/LayoutSwitcher.vue';
168
168
  import LogoSettings from '@shared/logo-settings/components/LogoSettings.vue';
169
169
  import MakerNavigation from '../navigation/Navigation.vue';
170
+ import PageSettings from '@shared/page-settings/components/page-settings/PageSettings.vue';
170
171
  import PreviewWithState from '../preview-with-state/PreviewWithState.vue';
171
172
  import QuickLinkBar from '../quick-link-bar/QuickLinkBar.vue';
172
173
  import SideBar from '@shared/side-bar/components/SideBar.vue';
@@ -208,6 +209,7 @@ export default {
208
209
  LogoSettings,
209
210
  AdminLogoSettings,
210
211
  MakerNavigation,
212
+ PageSettings,
211
213
  PreviewWithState,
212
214
  QuickLinkBar,
213
215
  SideBar,
@@ -3,10 +3,7 @@ import PageMixin from '@brand-page/components/page/Page.mixin';
3
3
  import type { Content, ContentViewModel } from '@brand-page';
4
4
  import { UI_DEVICE_MODES, UI_EVENT_SOURCES } from '@shared/models';
5
5
  import type { ContentItem } from '@shared/content-settings/models';
6
- import {
7
- CONTENT_SETTINGS_MODES,
8
- useUiContentSettingsStore,
9
- } from '@shared/content-settings/store';
6
+ import { useUiContentSettingsStore } from '@shared/content-settings/store';
10
7
  import {
11
8
  useBrandPageContainerStore,
12
9
  useBrandPageMakerStore,
@@ -361,15 +358,14 @@ export default defineComponent({
361
358
  }
362
359
 
363
360
  this.sideBarStore.setSelectedTabName({
364
- tabName: SIDE_BAR_TAB_NAMES.CONTENT_SETTINGS,
361
+ tabName: SIDE_BAR_TAB_NAMES.PAGE_SETTINGS,
365
362
  });
363
+
364
+ this.contentSettingsStore.resetMode();
366
365
  this.contentSettingsStore._setSelectedItemId({
367
366
  id: null,
368
367
  eventSource: 'pageSettings',
369
368
  });
370
- this.contentSettingsStore.pushMode({
371
- mode: CONTENT_SETTINGS_MODES.pages,
372
- });
373
369
 
374
370
  this.pageSettingsStore.setSelectedSectionName({
375
371
  sectionName: PAGE_SECTIONS.header,
@@ -385,15 +381,15 @@ export default defineComponent({
385
381
  }
386
382
 
387
383
  this.sideBarStore.setSelectedTabName({
388
- tabName: SIDE_BAR_TAB_NAMES.CONTENT_SETTINGS,
384
+ tabName: SIDE_BAR_TAB_NAMES.PAGE_SETTINGS,
389
385
  });
386
+ // See onPageHeaderContainerClick — same-tab reselection doesn't reset mode
387
+ // in setSelectedTabName, but this click is still a real navigation intent.
388
+ this.contentSettingsStore.resetMode();
390
389
  this.contentSettingsStore._setSelectedItemId({
391
390
  id: null,
392
391
  eventSource: 'pageSettings',
393
392
  });
394
- this.contentSettingsStore.pushMode({
395
- mode: CONTENT_SETTINGS_MODES.pages,
396
- });
397
393
 
398
394
  this.pageSettingsStore.setSelectedSectionName({
399
395
  sectionName: PAGE_SECTIONS.footer,