@designcrowd/library.brand-page 6.1.6 → 6.1.7-ast-preview-test

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 (140) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-COw1kYDh.js → CreatedOnBrandCrowd-de-de-s5PgrS4k.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-JRm1p0it.js → CreatedOnBrandCrowd-en-us-DialvDTn.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-D-G9uI6b.js → CreatedOnBrandCrowd-es-es-CkWPaELu.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-DQCScohj.js → CreatedOnBrandCrowd-fr-ca-DKsU-7B3.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-DQCScohj.js → CreatedOnBrandCrowd-fr-fr-DKsU-7B3.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-4RazAfO7.js → CreatedOnBrandCrowd-pt-br-_nFRiTF7.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-4RazAfO7.js → CreatedOnBrandCrowd-pt-pt-_nFRiTF7.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-DqvLTbhq.js → CreatedOnDcom-de-de-E3RR9E-W.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-DG1X0ero.js → CreatedOnDcom-en-us-BaKpfZyU.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-BxHAIikP.js → CreatedOnDcom-es-es-DAKlDkym.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-BGXoViAC.js → CreatedOnDcom-fr-ca-COcb6S6R.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-CsvmeK2T.js → CreatedOnDcom-fr-fr-kIujhHbs.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-DvWm7MjO.js → CreatedOnDcom-pt-br-q7aggQB7.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-Bhz2YEVP.js → CreatedOnDcom-pt-pt-CWA39oCo.js} +1 -1
  15. package/lib/src/brand-page/components/page-footer/PageFooter.mixin.d.ts +0 -1
  16. package/lib/src/brand-page/components/page-footer/PageFooter.mixin.js +1 -4
  17. package/lib/src/brand-page/utils/route.util.d.ts +12 -0
  18. package/lib/src/brand-page/utils/route.util.js +56 -0
  19. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +0 -1
  20. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +1 -4
  21. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.js +9 -6
  22. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.js +7 -9
  23. package/lib/src/brand-page-maker/components/index.d.ts +1 -0
  24. package/lib/src/brand-page-maker/components/index.js +1 -0
  25. package/lib/src/brand-page-maker/constants/sidebar-constant.d.ts +1 -0
  26. package/lib/src/brand-page-maker/constants/sidebar-constant.js +10 -1
  27. package/lib/src/bundled-translations-B4__t_42.js +179 -0
  28. package/lib/src/bundled-translations.de-DE-DZm_F46B.js +179 -0
  29. package/lib/src/bundled-translations.es-ES-DiOMEwZz.js +179 -0
  30. package/lib/src/bundled-translations.fr-CA-BPBNxV69.js +179 -0
  31. package/lib/src/bundled-translations.fr-FR-bCNdWkJW.js +179 -0
  32. package/lib/src/bundled-translations.pt-BR-CC6okekB.js +179 -0
  33. package/lib/src/bundled-translations.pt-PT-CSgMSLFn.js +179 -0
  34. package/lib/src/bundles/bundled-translations.de-DE.json +5 -4
  35. package/lib/src/bundles/bundled-translations.es-ES.json +5 -4
  36. package/lib/src/bundles/bundled-translations.fr-CA.json +5 -4
  37. package/lib/src/bundles/bundled-translations.fr-FR.json +5 -4
  38. package/lib/src/bundles/bundled-translations.json +5 -4
  39. package/lib/src/bundles/bundled-translations.pt-BR.json +5 -4
  40. package/lib/src/bundles/bundled-translations.pt-PT.json +5 -4
  41. package/lib/src/css/library.brand-page-brandCrowd.min.css +169 -241
  42. package/lib/src/css/library.brand-page-brandPage.min.css +169 -241
  43. package/lib/src/css/library.brand-page-designCom.min.css +169 -241
  44. package/lib/src/css/library.brand-page-preview.min.css +169 -241
  45. package/lib/src/index.d.ts +1 -1
  46. package/lib/src/index.mjs +110 -109
  47. package/lib/src/{lib-Bg2K2ze6.js → lib-21Llh7GA.js} +20911 -20894
  48. package/lib/src/lib.js +1 -1
  49. package/lib/src/shared/components/live-preview-modal/live-preview-modal.utils.d.ts +4 -0
  50. package/lib/src/shared/components/live-preview-modal/live-preview-modal.utils.js +3 -0
  51. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +10 -177
  52. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.js +8 -15
  53. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +1 -1
  54. package/lib/src/shared/content-settings/store/content-settings-store.d.ts +0 -1
  55. package/lib/src/shared/content-settings/store/content-settings-store.js +0 -1
  56. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +1 -12
  57. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.js +9 -24
  58. package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +1 -1
  59. package/lib/src/shared/side-bar/components/SideBar.mixin.js +6 -6
  60. package/lib/src/shared/side-bar/store/side-bar-store.js +15 -2
  61. package/package.json +1 -1
  62. package/src/brand-page/components/button/Button.vue +41 -18
  63. package/src/brand-page/components/button/Button.vue.test.ts +211 -0
  64. package/src/brand-page/components/images-section/ImagesSection.test.ts +91 -0
  65. package/src/brand-page/components/images-section/ImagesSection.vue +29 -10
  66. package/src/brand-page/components/page-footer/PageFooter.mixin.ts +1 -4
  67. package/src/brand-page/components/page-footer/PageFooter.vue +0 -1
  68. package/src/brand-page/components/payment/Payment.vue +0 -3
  69. package/src/brand-page/components/payment/request-payment/RequestPayment.vue +0 -1
  70. package/src/brand-page/components/payment/support-me/SupportMe.vue +0 -3
  71. package/src/brand-page/components/save-contact/SaveContactWidget.vue +1 -0
  72. package/src/brand-page/components/save-contact/popup-card/PopupCard.vue +1 -0
  73. package/src/brand-page/components/shop/CartModal.test.ts +51 -0
  74. package/src/brand-page/components/shop/CartModal.vue +1 -0
  75. package/src/brand-page/components/shop/FeaturedDisplay.vue +8 -3
  76. package/src/brand-page/components/shop/Shop.vue +5 -5
  77. package/src/brand-page/components/shop/Shop.vue.test.ts +104 -2
  78. package/src/brand-page/components/social-links/SocialLinks.vue +1 -9
  79. package/src/brand-page/components/social-links/SocialLinks.vue.test.ts +28 -8
  80. package/src/brand-page/components/social-links/SocialLinksItems.vue +6 -2
  81. package/src/brand-page/components/testimonial-section/TestimonialSection.vue +2 -2
  82. package/src/brand-page/components/video/Video.vue +0 -3
  83. package/src/brand-page/utils/route.util.test.ts +116 -0
  84. package/src/brand-page/utils/route.util.ts +82 -0
  85. package/src/brand-page-maker/components/action-bar/ActionBarNavigation.test.ts +23 -0
  86. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +1 -4
  87. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.preview-gate.test.ts +68 -3
  88. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.ts +9 -10
  89. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.vue +3 -0
  90. package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.ts +8 -12
  91. package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.pages-tab.test.ts +78 -0
  92. package/src/brand-page-maker/components/index.ts +1 -0
  93. package/src/brand-page-maker/components/preview-modal/PreviewModalWithState.test.ts +61 -41
  94. package/src/brand-page-maker/components/preview-modal/PreviewModalWithState.vue +37 -42
  95. package/src/brand-page-maker/constants/sidebar-constant.ts +10 -1
  96. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.test.ts +9 -4
  97. package/src/bundles/bundled-translations.de-DE.json +5 -4
  98. package/src/bundles/bundled-translations.es-ES.json +5 -4
  99. package/src/bundles/bundled-translations.fr-CA.json +5 -4
  100. package/src/bundles/bundled-translations.fr-FR.json +5 -4
  101. package/src/bundles/bundled-translations.json +5 -4
  102. package/src/bundles/bundled-translations.pt-BR.json +5 -4
  103. package/src/bundles/bundled-translations.pt-PT.json +5 -4
  104. package/src/lib.ts +1 -0
  105. package/src/{brand-page-maker/components/preview-modal/PreviewModal.test.ts → shared/components/live-preview-modal/LivePreviewModal.test.ts} +96 -3
  106. package/src/{brand-page-maker/components/preview-modal/PreviewModal.vue → shared/components/live-preview-modal/LivePreviewModal.vue} +103 -89
  107. package/src/shared/components/live-preview-modal/i18n/preview-modal.de-DE.json +7 -0
  108. package/src/shared/components/live-preview-modal/i18n/preview-modal.es-ES.json +7 -0
  109. package/src/shared/components/live-preview-modal/i18n/preview-modal.fr-CA.json +7 -0
  110. package/src/shared/components/live-preview-modal/i18n/preview-modal.fr-FR.json +7 -0
  111. package/src/shared/components/live-preview-modal/i18n/preview-modal.json +7 -0
  112. package/src/shared/components/live-preview-modal/i18n/preview-modal.pt-BR.json +7 -0
  113. package/src/shared/components/live-preview-modal/i18n/preview-modal.pt-PT.json +7 -0
  114. package/src/shared/components/live-preview-modal/live-preview-modal.utils.ts +11 -0
  115. package/src/shared/content-settings/components/content-settings/ContentSettings.mixin.ts +7 -19
  116. package/src/shared/content-settings/components/content-settings/ContentSettings.pages-tab.test.ts +20 -0
  117. package/src/shared/content-settings/components/content-settings/ContentSettings.vue +1 -8
  118. package/src/shared/content-settings/store/content-settings-store.ts +0 -1
  119. package/src/shared/ecommerce-settings/store/cart-store.test.ts +38 -0
  120. package/src/shared/page-settings/components/page-settings/PageSettings.image-replace.test.ts +100 -0
  121. package/src/shared/page-settings/components/page-settings/PageSettings.mixin.ts +14 -31
  122. package/src/shared/page-settings/components/page-settings/PageSettings.vue +11 -7
  123. package/src/shared/side-bar/components/SideBar.landing-tab.test.ts +67 -0
  124. package/src/shared/side-bar/components/SideBar.mixin.ts +6 -6
  125. package/src/shared/side-bar/store/side-bar-store.test.ts +124 -0
  126. package/src/shared/side-bar/store/side-bar-store.ts +17 -2
  127. package/lib/src/bundled-translations-D42tE0D2.js +0 -179
  128. package/lib/src/bundled-translations.de-DE-D9aWGgFt.js +0 -179
  129. package/lib/src/bundled-translations.es-ES-lk4B0xQ7.js +0 -179
  130. package/lib/src/bundled-translations.fr-CA-DhOBNt6q.js +0 -179
  131. package/lib/src/bundled-translations.fr-FR-CnpafQeG.js +0 -179
  132. package/lib/src/bundled-translations.pt-BR-C4PnKrd9.js +0 -179
  133. package/lib/src/bundled-translations.pt-PT-CfKDVQC-.js +0 -179
  134. package/src/brand-page-maker/components/preview-modal/i18n/preview-modal.de-DE.json +0 -6
  135. package/src/brand-page-maker/components/preview-modal/i18n/preview-modal.es-ES.json +0 -6
  136. package/src/brand-page-maker/components/preview-modal/i18n/preview-modal.fr-CA.json +0 -6
  137. package/src/brand-page-maker/components/preview-modal/i18n/preview-modal.fr-FR.json +0 -6
  138. package/src/brand-page-maker/components/preview-modal/i18n/preview-modal.json +0 -6
  139. package/src/brand-page-maker/components/preview-modal/i18n/preview-modal.pt-BR.json +0 -6
  140. package/src/brand-page-maker/components/preview-modal/i18n/preview-modal.pt-PT.json +0 -6
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-Bg2K2ze6.js";
2
+ import { _ as t } from "./lib-21Llh7GA.js";
3
3
  const i = {}, h = {
4
4
  width: "275",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-Bg2K2ze6.js";
2
+ import { _ as t } from "./lib-21Llh7GA.js";
3
3
  const i = {}, h = {
4
4
  width: "251",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-Bg2K2ze6.js";
2
+ import { _ as t } from "./lib-21Llh7GA.js";
3
3
  const i = {}, h = {
4
4
  width: "250",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-Bg2K2ze6.js";
2
+ import { _ as t } from "./lib-21Llh7GA.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-Bg2K2ze6.js";
2
+ import { _ as t } from "./lib-21Llh7GA.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-Bg2K2ze6.js";
2
+ import { _ as t } from "./lib-21Llh7GA.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-Bg2K2ze6.js";
2
+ import { _ as t } from "./lib-21Llh7GA.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-Bg2K2ze6.js";
2
+ import { _ as e } from "./lib-21Llh7GA.js";
3
3
  const M = {}, Z = {
4
4
  width: "242",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-Bg2K2ze6.js";
2
+ import { _ as e } from "./lib-21Llh7GA.js";
3
3
  const i = {}, M = {
4
4
  width: "231",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-Bg2K2ze6.js";
2
+ import { _ as e } from "./lib-21Llh7GA.js";
3
3
  const M = {}, Z = {
4
4
  width: "230",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-Bg2K2ze6.js";
2
+ import { _ as e } from "./lib-21Llh7GA.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-Bg2K2ze6.js";
2
+ import { _ as e } from "./lib-21Llh7GA.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-Bg2K2ze6.js";
2
+ import { _ as M } from "./lib-21Llh7GA.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-Bg2K2ze6.js";
2
+ import { _ as M } from "./lib-21Llh7GA.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -20,7 +20,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
20
20
  default: boolean;
21
21
  };
22
22
  }>, {}, {}, {
23
- isInPreviewMode(): boolean;
24
23
  containerStyle(): BrandPageCssStyle;
25
24
  socialLinksIconStyle(): BrandPageCssStyle;
26
25
  isDisplayStyleCentered(): boolean;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent } from 'vue';
2
- import { getRenderText, isPreviewMode } from '@brand-page/utils';
2
+ import { getRenderText } from '@brand-page/utils';
3
3
  import { FOOTER_DISPLAY } from '../../constants';
4
4
  export default defineComponent({
5
5
  props: {
@@ -23,9 +23,6 @@ export default defineComponent({
23
23
  },
24
24
  emits: ['on-logo-click', 'footer-container-click'],
25
25
  computed: {
26
- isInPreviewMode() {
27
- return isPreviewMode(this.context);
28
- },
29
26
  containerStyle() {
30
27
  return this.viewModel.backgroundStyle;
31
28
  },
@@ -1,3 +1,4 @@
1
+ import type { BrandPageType } from '../models/brand-page-context.model';
1
2
  import type { NavItemViewModel } from '../view-models';
2
3
  export declare const buildRelativePathFromParams: (params: {
3
4
  pageSlug?: string;
@@ -19,5 +20,16 @@ export declare const getRouteParamsByPage: (isCustomDomain: boolean, brandPageSl
19
20
  };
20
21
  export declare const getRouteNameByPageIndex: (isCustomDomain: boolean, pageIndex?: number, isSubPage?: boolean) => string;
21
22
  export declare const findNavItemByPageId: (navItems: NavItemViewModel[], pageId: string) => NavItemViewModel | undefined;
23
+ export declare const findNavItemByOwnSiteUrl: ({ url, navItems, brandPageType, brandPageSlug, customDomain, }: {
24
+ url: string | undefined;
25
+ navItems: NavItemViewModel[];
26
+ brandPageType: BrandPageType;
27
+ brandPageSlug: string;
28
+ customDomain?: string;
29
+ }) => NavItemViewModel | undefined;
30
+ export declare const toRouteLocation: (navItem?: NavItemViewModel) => {
31
+ name: string;
32
+ params: {};
33
+ };
22
34
  export declare const findNavItemByRelativePath: (navItems: NavItemViewModel[], relativePath: string) => NavItemViewModel | undefined;
23
35
  export declare const findNavItemByPageSlug: (navItems: NavItemViewModel[], pageSlug: string) => NavItemViewModel | undefined;
@@ -53,6 +53,62 @@ export const findNavItemByPageId = (navItems, pageId) => {
53
53
  }
54
54
  return undefined;
55
55
  };
56
+ // Keep in sync with web-renderer's `constants/host.constant` + `getProductHostForType`.
57
+ const PRODUCT_HOST_BY_BRAND_PAGE_TYPE = {
58
+ default: 'brand.page',
59
+ brandSite: 'brand.site',
60
+ brandContact: 'brand.contact',
61
+ };
62
+ const bareHost = (hostname) => hostname.replace(/^www\./i, '').toLowerCase();
63
+ // A typed URL can still address a page of THIS site: whole-host on the site's own
64
+ // custom domain, or under its slug on the multi-tenant product domain.
65
+ export const findNavItemByOwnSiteUrl = ({ url, navItems, brandPageType, brandPageSlug, customDomain, }) => {
66
+ if (!url) {
67
+ return undefined;
68
+ }
69
+ let parsed;
70
+ try {
71
+ parsed = new URL(url);
72
+ }
73
+ catch {
74
+ return undefined;
75
+ }
76
+ // A route location carries neither, so converting would silently drop them — leave
77
+ // the author's exact URL to the plain anchor instead.
78
+ if (parsed.search || parsed.hash) {
79
+ return undefined;
80
+ }
81
+ const host = bareHost(parsed.hostname);
82
+ const segments = parsed.pathname.split('/').filter(Boolean);
83
+ const productHost = PRODUCT_HOST_BY_BRAND_PAGE_TYPE[brandPageType];
84
+ // Required by type and always set by in-repo callers, but this now runs on the
85
+ // published-site render path (Button.vue) — degrade gracefully rather than throw
86
+ // if a cross-repo caller ever omits it.
87
+ const slug = brandPageSlug?.trim() ?? '';
88
+ let pagePath;
89
+ if (customDomain && host === bareHost(customDomain)) {
90
+ pagePath = segments.join('/');
91
+ }
92
+ else if (productHost &&
93
+ (host === productHost || host.endsWith(`.${productHost}`)) &&
94
+ slug &&
95
+ segments[0]?.toLowerCase() === slug.toLowerCase()) {
96
+ pagePath = segments.slice(1).join('/');
97
+ }
98
+ if (pagePath === undefined) {
99
+ return undefined;
100
+ }
101
+ return pagePath
102
+ ? findNavItemByRelativePath(navItems, pagePath)
103
+ : navItems.find((item) => item.isRoot);
104
+ };
105
+ // Shared by every caller that resolves a nav item then navigates to it
106
+ // (Button.vue, ImagesSection.vue) — one place to turn "which page" into "where to
107
+ // route", so a resolved nav item is never hand-unpacked into a route object twice.
108
+ export const toRouteLocation = (navItem) => ({
109
+ name: navItem?.routeName || '',
110
+ params: navItem?.routeParams || {},
111
+ });
56
112
  export const findNavItemByRelativePath = (navItems, relativePath) => {
57
113
  for (const item of navItems) {
58
114
  if (item.relativePath === relativePath ||
@@ -59,7 +59,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
59
59
  selectedTabName: import("vue").ComputedRef<string>;
60
60
  isAdminMaker: import("vue").ComputedRef<boolean>;
61
61
  contentErrorCount: import("vue").ComputedRef<number>;
62
- mode: import("vue").ComputedRef<"images" | "add" | "pages" | "edit" | "focusedContentItem">;
63
62
  brandPageMakerStore: import("pinia").Store<"brandPageMaker", import("@brand-page-maker/stores").BrandPageMakerState, {
64
63
  contentErrorCount(): number;
65
64
  brandPageBaseUrl(): string;
@@ -86,7 +86,6 @@ export default defineComponent({
86
86
  selectedTabName: computed(() => sideBarStore.selectedTabName),
87
87
  isAdminMaker: computed(() => containerStore.isAdminMaker),
88
88
  contentErrorCount: computed(() => contentSettingsStore.contentErrorCount),
89
- mode: computed(() => contentSettingsStore.mode),
90
89
  brandPageMakerStore,
91
90
  uiSideBarStore: sideBarStore,
92
91
  userStore,
@@ -179,9 +178,7 @@ export default defineComponent({
179
178
  }, 0);
180
179
  this.debounceOnResize = debounce(this.onResize, RESIZE_DEBOUNCE_WAIT_IN_MS);
181
180
  this.router.afterEach(((to) => {
182
- if (this.mode !== 'pages') {
183
- this.contentSettingsStore.resetMode();
184
- }
181
+ this.contentSettingsStore.resetMode();
185
182
  const associatedNavItem = findNavItemByRelativePath(this.brandPageViewModel.nav.navItems, buildRelativePathFromParams(to.params));
186
183
  this.pageNavigationStore.setCurrentActivePage({
187
184
  pageId: associatedNavItem?.pageId,
@@ -16,7 +16,8 @@ import { availableButtonStyleConfigs, createInitialBannerSectionContent, createI
16
16
  import { TEMPLATE_CATEGORIES } from '../../../__fixtures__';
17
17
  import { useBrandPageMakerStore } from '@brand-page-maker/stores';
18
18
  import { generalLink, profileContent, textContent, } from './__fixtures__/content-settings-items.fixture';
19
- import { CONTENT_SETTINGS_MODES, useUiContentSettingsStore, } from '@shared/content-settings/store';
19
+ import { useUiContentSettingsStore } from '@shared/content-settings/store';
20
+ import { useUiSideBarStore } from '@shared/side-bar/store';
20
21
  import { createPinia } from 'pinia';
21
22
  import { useUiStore, useBrandPageContainerStore, UNLIMITED_MAX_NUM_OF_PAGES, useBrandPageMakerUserStore, useLogoStore, } from '@brand-page-maker/stores';
22
23
  import { brandPageContentsSampleData } from './__fixtures__/page-content-items';
@@ -242,12 +243,8 @@ Sample.story = {
242
243
  export const SampleDesktopManagePages = () => {
243
244
  const pinia = setupStoryPinia();
244
245
  InitialiseMakerStores({});
245
- const contentSettingsStore = useUiContentSettingsStore();
246
246
  const brandPageMakerStore = useBrandPageMakerStore();
247
247
  const userStore = useBrandPageMakerUserStore();
248
- contentSettingsStore.pushMode({
249
- mode: CONTENT_SETTINGS_MODES.pages,
250
- });
251
248
  brandPageMakerStore.setViewport({
252
249
  viewport: VIEWPORTS.desktop,
253
250
  });
@@ -307,7 +304,13 @@ export const SampleDesktopManagePages = () => {
307
304
  },
308
305
  };
309
306
  },
310
- mounted() { },
307
+ mounted() {
308
+ // Set after mount — SideBar's mounted() picks the default tab, so a
309
+ // pre-mount selection would be overwritten.
310
+ useUiSideBarStore().setSelectedTabName({
311
+ tabName: SIDE_BAR_TAB_NAMES.PAGE_SETTINGS,
312
+ });
313
+ },
311
314
  template: `
312
315
  <BrandPageMaker :view-model="viewModel"/>
313
316
  `,
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, computed } from 'vue';
2
2
  import PageMixin from '@brand-page/components/page/Page.mixin';
3
3
  import { UI_DEVICE_MODES, UI_EVENT_SOURCES } from '@shared/models';
4
- import { CONTENT_SETTINGS_MODES, useUiContentSettingsStore, } from '@shared/content-settings/store';
4
+ import { useUiContentSettingsStore } from '@shared/content-settings/store';
5
5
  import { useBrandPageContainerStore, useBrandPageMakerStore, useUiStore, useBrandPageMakerUserStore, } from '@brand-page-maker/stores';
6
6
  import { getContentSettingsFields, getContentSettingsTemplate, } from '@shared/content-settings/utils';
7
7
  import { useUiNavigationStyleSettingsStore } from '@shared/navigation-style-settings/store';
@@ -255,15 +255,13 @@ export default defineComponent({
255
255
  return;
256
256
  }
257
257
  this.sideBarStore.setSelectedTabName({
258
- tabName: SIDE_BAR_TAB_NAMES.CONTENT_SETTINGS,
258
+ tabName: SIDE_BAR_TAB_NAMES.PAGE_SETTINGS,
259
259
  });
260
+ this.contentSettingsStore.resetMode();
260
261
  this.contentSettingsStore._setSelectedItemId({
261
262
  id: null,
262
263
  eventSource: 'pageSettings',
263
264
  });
264
- this.contentSettingsStore.pushMode({
265
- mode: CONTENT_SETTINGS_MODES.pages,
266
- });
267
265
  this.pageSettingsStore.setSelectedSectionName({
268
266
  sectionName: PAGE_SECTIONS.header,
269
267
  });
@@ -276,15 +274,15 @@ export default defineComponent({
276
274
  return;
277
275
  }
278
276
  this.sideBarStore.setSelectedTabName({
279
- tabName: SIDE_BAR_TAB_NAMES.CONTENT_SETTINGS,
277
+ tabName: SIDE_BAR_TAB_NAMES.PAGE_SETTINGS,
280
278
  });
279
+ // See onPageHeaderContainerClick — same-tab reselection doesn't reset mode
280
+ // in setSelectedTabName, but this click is still a real navigation intent.
281
+ this.contentSettingsStore.resetMode();
281
282
  this.contentSettingsStore._setSelectedItemId({
282
283
  id: null,
283
284
  eventSource: 'pageSettings',
284
285
  });
285
- this.contentSettingsStore.pushMode({
286
- mode: CONTENT_SETTINGS_MODES.pages,
287
- });
288
286
  this.pageSettingsStore.setSelectedSectionName({
289
287
  sectionName: PAGE_SECTIONS.footer,
290
288
  });
@@ -5,3 +5,4 @@ export { default as SensitiveContent } from './sensitive-content/SensitiveConten
5
5
  export { default as SeoPageSettings } from './seo-settings/SeoPageSettings.vue';
6
6
  export { default as GoogleAnalytics } from './google-analytics/GoogleAnalytics.vue';
7
7
  export { default as PublishBrandPageModalWithState } from '@shared/publish-brand-page-with-state/PublishBrandPageModalWithState.vue';
8
+ export { default as PreviewModalWithState } from './preview-modal/PreviewModalWithState.vue';
@@ -5,3 +5,4 @@ export { default as SensitiveContent } from './sensitive-content/SensitiveConten
5
5
  export { default as SeoPageSettings } from './seo-settings/SeoPageSettings.vue';
6
6
  export { default as GoogleAnalytics } from './google-analytics/GoogleAnalytics.vue';
7
7
  export { default as PublishBrandPageModalWithState } from '@shared/publish-brand-page-with-state/PublishBrandPageModalWithState.vue';
8
+ export { default as PreviewModalWithState } from './preview-modal/PreviewModalWithState.vue';
@@ -2,6 +2,7 @@ import type { SideBarTab } from '@shared/side-bar/models';
2
2
  export declare const SIDE_BAR_TAB_NAMES: {
3
3
  PREVIEW: string;
4
4
  TEMPLATE_SETTINGS: string;
5
+ PAGE_SETTINGS: string;
5
6
  CONTENT_SETTINGS: string;
6
7
  BACKGROUND_SETTINGS: string;
7
8
  ADMIN_BACKGROUND_SETTINGS: string;
@@ -1,7 +1,8 @@
1
- import { constantsTr } from '@src/composables/useTranslate';
1
+ import { constantsTr, pageSettingsTr } from '@src/composables/useTranslate';
2
2
  export const SIDE_BAR_TAB_NAMES = {
3
3
  PREVIEW: 'Preview',
4
4
  TEMPLATE_SETTINGS: 'TemplatesSettings',
5
+ PAGE_SETTINGS: 'PageSettings',
5
6
  CONTENT_SETTINGS: 'ContentSettings',
6
7
  BACKGROUND_SETTINGS: 'BackgroundSettings',
7
8
  ADMIN_BACKGROUND_SETTINGS: 'AdminBackgroundSettings',
@@ -28,6 +29,14 @@ export const DEFAULT_SIDE_BAR_TABS = () => [
28
29
  isDisabledForAdmin: false,
29
30
  isVisible: true,
30
31
  },
32
+ {
33
+ name: SIDE_BAR_TAB_NAMES.PAGE_SETTINGS,
34
+ displayName: pageSettingsTr(`pages`),
35
+ iconName: 'page-blank',
36
+ accessibleDisplayName: 'Pages',
37
+ isDisabledForAdmin: false,
38
+ isVisible: true,
39
+ },
31
40
  {
32
41
  name: SIDE_BAR_TAB_NAMES.CONTENT_SETTINGS,
33
42
  displayName: constantsTr(`contentDisplayName`),