@designcrowd/library.brand-page 6.1.17-ast-header-button-1 → 6.1.17-ast-header-button-2

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 (61) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-ClD0Z4Nf.js → CreatedOnBrandCrowd-de-de-CGQppEEP.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-x35bJCuy.js → CreatedOnBrandCrowd-en-us-Do8u4cNA.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-zm1tzSt2.js → CreatedOnBrandCrowd-es-es-Cw9i-wIi.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-B7XCRP8c.js → CreatedOnBrandCrowd-fr-ca-DK9cVARn.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-B7XCRP8c.js → CreatedOnBrandCrowd-fr-fr-DK9cVARn.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-7QHheNW1.js → CreatedOnBrandCrowd-pt-br-CKvle-Uo.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-7QHheNW1.js → CreatedOnBrandCrowd-pt-pt-CKvle-Uo.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-Yn0mPf9E.js → CreatedOnDcom-de-de-DZGQbS8x.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-BO8_HZ9Q.js → CreatedOnDcom-en-us-CAGyRg9Z.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-cZcgEsjB.js → CreatedOnDcom-es-es-B_Xbs4CX.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-CA-hvR-A.js → CreatedOnDcom-fr-ca-B_Af6mgX.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-CEWt2rrU.js → CreatedOnDcom-fr-fr-Dn8OKUFf.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-DYnOYrQv.js → CreatedOnDcom-pt-br-DFsESCzy.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-C7BpvRge.js → CreatedOnDcom-pt-pt-CjbOJw5o.js} +1 -1
  15. package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.d.ts +0 -11
  16. package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.js +6 -11
  17. package/lib/src/brand-page/components/page/Page.mixin.d.ts +2 -1
  18. package/lib/src/brand-page/components/page/Page.mixin.js +11 -1
  19. package/lib/src/brand-page/components/page-header/HeaderLayout.stories.d.ts +1 -0
  20. package/lib/src/brand-page/components/page-header/HeaderLayout.stories.js +9 -0
  21. package/lib/src/brand-page/components/page-header/PageHeader.mixin.js +3 -3
  22. package/lib/src/brand-page/constants/sections/header-display.constants.d.ts +8 -0
  23. package/lib/src/brand-page/constants/sections/header-display.constants.js +11 -0
  24. package/lib/src/brand-page/models/index.d.ts +4 -1
  25. package/lib/src/brand-page/models/index.js +5 -3
  26. package/lib/src/brand-page/utils/view-model.util.d.ts +0 -1
  27. package/lib/src/brand-page/utils/view-model.util.js +5 -5
  28. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +1 -0
  29. package/lib/src/bundled-translations-Cs7jWCj8.js +181 -0
  30. package/lib/src/bundles/bundled-translations.json +3 -0
  31. package/lib/src/css/library.brand-page-brandCrowd.min.css +215 -158
  32. package/lib/src/css/library.brand-page-brandPage.min.css +215 -158
  33. package/lib/src/css/library.brand-page-designCom.min.css +215 -158
  34. package/lib/src/css/library.brand-page-preview.min.css +215 -158
  35. package/lib/src/index.mjs +1 -1
  36. package/lib/src/{lib-DnnaLgX8.js → lib-BFusPgV2.js} +10844 -10836
  37. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.js +4 -4
  38. package/package.json +1 -1
  39. package/src/brand-page/components/navigation/hamburger/HamburgerNavigation.vue +1 -0
  40. package/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.ts +6 -11
  41. package/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.vue +35 -3
  42. package/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.vue.test.ts +23 -17
  43. package/src/brand-page/components/page/Page.mixin.ts +17 -0
  44. package/src/brand-page/components/page/Page.vue +2 -6
  45. package/src/brand-page/components/page-header/HeaderLayout.stories.ts +10 -0
  46. package/src/brand-page/components/page-header/HeaderLayout.vue +35 -35
  47. package/src/brand-page/components/page-header/PageHeader.mixin.ts +3 -3
  48. package/src/brand-page/components/page-header/PageHeader.vue.test.ts +9 -3
  49. package/src/brand-page/components/page-header/i18n/page-header.json +5 -0
  50. package/src/brand-page/constants/sections/header-display.constants.test.ts +45 -0
  51. package/src/brand-page/constants/sections/header-display.constants.ts +19 -0
  52. package/src/brand-page/models/index.ts +10 -3
  53. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +0 -6
  54. package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +0 -2
  55. package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +0 -4
  56. package/src/brand-page/utils/view-model.util.test.ts +7 -2
  57. package/src/brand-page/utils/view-model.util.ts +6 -6
  58. package/src/bundles/bundled-translations.json +3 -0
  59. package/src/shared/page-settings/components/page-settings-section-styles/HeaderButtonSettings.vue +34 -9
  60. package/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.ts +4 -4
  61. package/lib/src/bundled-translations-B8fAEel0.js +0 -179
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-DnnaLgX8.js";
2
+ import { _ as t } from "./lib-BFusPgV2.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-DnnaLgX8.js";
2
+ import { _ as t } from "./lib-BFusPgV2.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-DnnaLgX8.js";
2
+ import { _ as t } from "./lib-BFusPgV2.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-DnnaLgX8.js";
2
+ import { _ as t } from "./lib-BFusPgV2.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-DnnaLgX8.js";
2
+ import { _ as t } from "./lib-BFusPgV2.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-DnnaLgX8.js";
2
+ import { _ as t } from "./lib-BFusPgV2.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-DnnaLgX8.js";
2
+ import { _ as t } from "./lib-BFusPgV2.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-DnnaLgX8.js";
2
+ import { _ as e } from "./lib-BFusPgV2.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-DnnaLgX8.js";
2
+ import { _ as e } from "./lib-BFusPgV2.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-DnnaLgX8.js";
2
+ import { _ as e } from "./lib-BFusPgV2.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-DnnaLgX8.js";
2
+ import { _ as e } from "./lib-BFusPgV2.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-DnnaLgX8.js";
2
+ import { _ as e } from "./lib-BFusPgV2.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-DnnaLgX8.js";
2
+ import { _ as M } from "./lib-BFusPgV2.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-DnnaLgX8.js";
2
+ import { _ as M } from "./lib-BFusPgV2.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -23,11 +23,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
23
23
  required: false;
24
24
  default: undefined;
25
25
  };
26
- isMobile: {
27
- type: BooleanConstructor;
28
- required: false;
29
- default: boolean;
30
- };
31
26
  }>, {}, {
32
27
  expandedItems: Record<string, boolean>;
33
28
  }, {
@@ -70,15 +65,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
70
65
  required: false;
71
66
  default: undefined;
72
67
  };
73
- isMobile: {
74
- type: BooleanConstructor;
75
- required: false;
76
- default: boolean;
77
- };
78
68
  }>> & Readonly<{
79
69
  "onClose-side-menu"?: ((...args: any[]) => any) | undefined;
80
70
  }>, {
81
- isMobile: boolean;
82
71
  headerButtonViewModel: ButtonViewModel;
83
72
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
84
73
  export default _default;
@@ -18,18 +18,13 @@ export default defineComponent({
18
18
  type: Object,
19
19
  required: true,
20
20
  },
21
+ // Provided only when the header row does not render the CTA (the caller
22
+ // decides via headerRowRendersCta) — absent means the drawer shows none.
21
23
  headerButtonViewModel: {
22
24
  type: Object,
23
25
  required: false,
24
26
  default: undefined,
25
27
  },
26
- // The desktop drawer suppresses the header CTA — the desktop header row already
27
- // renders it. Only the mobile drawer carries the button.
28
- isMobile: {
29
- type: Boolean,
30
- required: false,
31
- default: false,
32
- },
33
28
  },
34
29
  emits: ['close-side-menu'],
35
30
  data() {
@@ -63,7 +58,7 @@ export default defineComponent({
63
58
  return rest;
64
59
  },
65
60
  showHeaderButton() {
66
- return this.isMobile && Boolean(this.headerButtonViewModel);
61
+ return Boolean(this.headerButtonViewModel);
67
62
  },
68
63
  routes() {
69
64
  return this.visibleNavItems.map((navItem, _i) => {
@@ -100,9 +95,9 @@ export default defineComponent({
100
95
  closeSideMenu() {
101
96
  this.$emit('close-side-menu');
102
97
  },
103
- // In the maker preview the CTA is inert (BP-5852 decision): capture-phase so the
104
- // prevent lands before the inner anchor/router-link fires. On the published site
105
- // the click follows the link and the drawer closes behind it.
98
+ // In the maker preview the CTA is inert (see docs/decisions/0019): capture-phase
99
+ // so the prevent lands before the inner anchor/router-link fires. On the
100
+ // published site the click follows the link and the drawer closes behind it.
106
101
  onDrawerCtaClick(event) {
107
102
  if (this.context.isPreview) {
108
103
  event.preventDefault();
@@ -1,5 +1,5 @@
1
1
  import type { PropType } from 'vue';
2
- import type { BrandPageViewModel, ContentViewModel, PageViewModel } from '@brand-page/view-models';
2
+ import type { BrandPageViewModel, ButtonViewModel, ContentViewModel, PageViewModel } from '@brand-page/view-models';
3
3
  import type { BackgroundShape, BrandPageContext, ViewportsType } from '@brand-page/models';
4
4
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
5
  context: {
@@ -81,6 +81,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
81
81
  headerViewModelDesktop(): any;
82
82
  isNavigationEmbeddedInLogoMobile(): boolean;
83
83
  isNavigationEmbeddedInLogoDesktop(): boolean;
84
+ drawerHeaderButtonViewModel(): ButtonViewModel | undefined;
84
85
  shouldShowNavigation(): boolean;
85
86
  showNavigationAfterLogoMobile(): boolean;
86
87
  showNavigationAfterLogoDesktop(): boolean;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent } from 'vue';
2
- import { DEFAULT_FONT_FAMILY_KEY, FALLBACK_FONT_FAMILIES, FONT_FAMILY_CONFIGS, } from '../../constants';
2
+ import { DEFAULT_FONT_FAMILY_KEY, FALLBACK_FONT_FAMILIES, FONT_FAMILY_CONFIGS, headerRowRendersCta, } from '../../constants';
3
3
  import { getSlugFromContext, getPageHeadingText, buildPaletteRootCss, buildPaletteScopedCss, PAGE_SCOPE_ID_ATTRIBUTE, resolveColorReference, } from '@brand-page/utils';
4
4
  import { findNavItemByRelativePath } from '@brand-page/utils/route.util';
5
5
  import { BRAND_PAGE_TYPES } from '@brand-page/models';
@@ -276,6 +276,16 @@ export default defineComponent({
276
276
  this.contents[0]?.type === 'logo' &&
277
277
  this.viewModel.pages.length > 1);
278
278
  },
279
+ // The mobile drawer carries the header CTA exactly when the header row does
280
+ // not — one shared predicate so the two can never render it twice.
281
+ drawerHeaderButtonViewModel() {
282
+ const header = this.viewModel.headerViewModelMobile;
283
+ if (!header.headerButtonViewModel ||
284
+ headerRowRendersCta(header.displayStyle, this.shouldShowNavigation)) {
285
+ return undefined;
286
+ }
287
+ return header.headerButtonViewModel;
288
+ },
279
289
  shouldShowNavigation() {
280
290
  // Show navigation if more than 1 non-hidden page exists, or if there's 1 page with non-hidden subpages
281
291
  const visibleNavItems = this.context.nav.navItems.filter((item) => !item.isHidden);
@@ -3,3 +3,4 @@ import HeaderLayout from './HeaderLayout.vue';
3
3
  declare const meta: Meta<typeof HeaderLayout>;
4
4
  export default meta;
5
5
  export declare const Sample: StoryFn;
6
+ export declare const WithHeaderButton: StoryFn;
@@ -36,6 +36,7 @@ const Template = (args) => ({
36
36
  nav-id="nav-1"
37
37
  :show-nav="args.showNav"
38
38
  :display-style="args.displayStyle"
39
+ :has-cta="args.hasCta"
39
40
  logo-width="100px"
40
41
  >
41
42
  <template v-slot:logo>
@@ -44,6 +45,9 @@ const Template = (args) => ({
44
45
  <template v-slot:nav>
45
46
  <div style="border: 1px solid red; display: inline-block;">Nav | Nav | Nav | Nav | Nav | Nav | Nav | Nav</div>
46
47
  </template>
48
+ <template v-slot:cta>
49
+ <div style="border: 1px solid green; display: inline-block; padding: 8px 16px;">Contact Us</div>
50
+ </template>
47
51
  </HeaderLayout>
48
52
  </div>
49
53
  `,
@@ -52,3 +56,8 @@ export const Sample = Template.bind({});
52
56
  Sample.args = {
53
57
  displayStyle: HEADER_DISPLAY.DESKTOP_TAB_5,
54
58
  };
59
+ export const WithHeaderButton = Template.bind({});
60
+ WithHeaderButton.args = {
61
+ displayStyle: HEADER_DISPLAY.DESKTOP_TAB_1,
62
+ hasCta: true,
63
+ };
@@ -48,9 +48,9 @@ export default defineComponent({
48
48
  onHeaderContainerClick() {
49
49
  this.$emit('header-container-click');
50
50
  },
51
- // In the maker preview the CTA is inert (BP-5852 decision): capture-phase so the
52
- // prevent lands before the inner anchor/router-link fires, and the stop keeps the
53
- // click from selecting the header panel. On the published site it does nothing.
51
+ // In the maker preview the CTA is inert (see docs/decisions/0019): capture-phase
52
+ // so the prevent lands before the inner anchor/router-link fires, and the stop
53
+ // keeps the click from selecting the header panel. Published sites: no-op.
54
54
  onHeaderCtaClick(event) {
55
55
  if (this.context.isPreview) {
56
56
  event.preventDefault();
@@ -44,4 +44,12 @@ interface HeaderDisplayStyleConfig {
44
44
  option: ButtonGroupOption;
45
45
  }
46
46
  export declare const HEADER_DISPLAY_STYLE_CONFIGS: HeaderDisplayStyleConfig[];
47
+ /**
48
+ * Whether the header ROW renders the call-to-action button, as opposed to the
49
+ * mobile nav drawer. The compact mobile hamburger row hands the CTA to the
50
+ * drawer — unless the nav is hidden (single visible page), when there is no
51
+ * drawer and the row must carry it. Derived from the configs so a future
52
+ * style classifies itself by its own viewMode/navType.
53
+ */
54
+ export declare const headerRowRendersCta: (displayStyle: string, showNav: boolean) => boolean;
47
55
  export {};
@@ -416,3 +416,14 @@ export const HEADER_DISPLAY_STYLE_CONFIGS = [
416
416
  },
417
417
  },
418
418
  ];
419
+ /**
420
+ * Whether the header ROW renders the call-to-action button, as opposed to the
421
+ * mobile nav drawer. The compact mobile hamburger row hands the CTA to the
422
+ * drawer — unless the nav is hidden (single visible page), when there is no
423
+ * drawer and the row must carry it. Derived from the configs so a future
424
+ * style classifies itself by its own viewMode/navType.
425
+ */
426
+ export const headerRowRendersCta = (displayStyle, showNav) => !showNav ||
427
+ !HEADER_DISPLAY_STYLE_CONFIGS.some((config) => config.option.value === displayStyle &&
428
+ config.viewMode === 'mobile' &&
429
+ config.navType === 'hamburger');
@@ -535,7 +535,10 @@ export declare abstract class AbstractPageHeaderStyles {
535
535
  backgroundStyle: BackgroundColorStyle;
536
536
  style: BrandPageCssStyle;
537
537
  viewport: ViewportsType;
538
- /** Absent means no header call-to-action button — never seed a default. */
538
+ /** Absent means no header call-to-action button — never seed a default.
539
+ * `declare` keeps the class field type-only: a plain optional field is still
540
+ * DEFINED on every instance (an own `undefined` key), which would change the
541
+ * serialized shape released migrations receive. */
539
542
  headerButton?: HeaderButton;
540
543
  protected constructor(options?: AbstractPageHeaderStylesType);
541
544
  }
@@ -227,8 +227,6 @@ export class AbstractPageHeaderStyles {
227
227
  backgroundStyle;
228
228
  style;
229
229
  viewport;
230
- /** Absent means no header call-to-action button — never seed a default. */
231
- headerButton;
232
230
  constructor(options = {}) {
233
231
  if (typeof options.viewport === 'undefined') {
234
232
  throw new Error('"viewport" is required');
@@ -259,7 +257,11 @@ export class AbstractPageHeaderStyles {
259
257
  ...(options.backgroundStyle || {}),
260
258
  backgroundOpacity: options.backgroundStyle?.backgroundOpacity ?? 100,
261
259
  };
262
- this.headerButton = options.headerButton;
260
+ // Assign only when present: constructor output is part of released
261
+ // migrations' input contract, so an absent field must stay absent.
262
+ if (options.headerButton) {
263
+ this.headerButton = options.headerButton;
264
+ }
263
265
  }
264
266
  }
265
267
  export class PageHeaderDesktop extends AbstractPageHeaderStyles {
@@ -13,7 +13,6 @@ export declare const mapToImagesSectionViewModel: (content: ImagesSectionContent
13
13
  export declare const mapToBookingSectionViewModel: (content: BookingSectionContent, styles: PageStyles) => BookingSectionViewModel;
14
14
  export declare const mapToNavViewModel: (nav: NavModel, brandPageSlug?: string, isCustomDomain?: boolean) => NavViewModel;
15
15
  export declare const mapToPageStyleViewModel: (pageStyles: PageStyles, options: ViewModelMappingOptions) => PageStylesViewModel;
16
- export declare const HEADER_BUTTON_FALLBACK_TEXT = "Contact Us";
17
16
  export declare const mapToPageHeaderViewModel: (pageHeader: PageHeaderDesktop | PageHeaderMobile, pageStyles: PageStyles, pages: PageViewModel[], useOldLogoRenderSize?: boolean) => PageHeaderViewModel;
18
17
  export declare const mapToPageFooterViewModel: (pageFooter: PageFooterDesktop | PageFooterMobile, pageStyles: PageStyles, useOldLogoRenderSize?: boolean) => PageFooterViewModel;
19
18
  export declare const mapToViewModel: (styles: PageStyles, brandPageType: BrandPageType, options: ViewModelMappingOptions) => (content: Content) => ContentViewModel | undefined;
@@ -13,6 +13,7 @@ import { isLogoContent } from './model.util';
13
13
  import { resolveTextColor } from './text-style.util';
14
14
  import { getBoxShadowValue, sectionFrameStyle } from './button.util';
15
15
  import { findNavItemByPageId, getRouteNameByPageIndex, getRouteParamsByPage, } from './route.util';
16
+ import { tr } from '@src/composables/useTranslate';
16
17
  import { hasRTEContent, isTiptapDocument } from '../../brand-page-maker/utils';
17
18
  import { getPageIdFromHref, isHrefPageId, } from '../../brand-page-maker/composables/rich-text-editor/hyperlink';
18
19
  const BUTTON_BORDER_RADIUS = '9999px';
@@ -691,9 +692,6 @@ export const mapToPageStyleViewModel = (pageStyles, options) => {
691
692
  colors: pageStyles.colors ?? [],
692
693
  };
693
694
  };
694
- // Must stay in step with the maker's `pageSettingsSection.buttonLabelPlaceholder`
695
- // (page-settings-section.json) — the placeholder shows what an empty label publishes as.
696
- export const HEADER_BUTTON_FALLBACK_TEXT = 'Contact Us';
697
695
  /**
698
696
  * `Button.vue` reads the link kind off `role` for every non-section role, so the header
699
697
  * CTA's authored `buttonLinkType` is expressed as the role (+ `clickActionField` for a
@@ -714,11 +712,13 @@ const mapToHeaderButtonViewModel = (headerButton, styles) => {
714
712
  };
715
713
  const viewModel = mapToButtonViewModel({
716
714
  id: 'page-header-button',
717
- type: HEADER_BUTTON_LINK_ROLES[headerButton.buttonLinkType],
715
+ // Total: metadata outside the maker may omit buttonLinkType — treat as url.
716
+ type: HEADER_BUTTON_LINK_ROLES[headerButton.buttonLinkType] ??
717
+ HEADER_BUTTON_LINK_ROLES[BUTTON_LINK_TYPE.url],
718
718
  iconUrl: '',
719
719
  modalImageUrl: '',
720
720
  colorReplacements: [],
721
- title: headerButton.text?.trim() || HEADER_BUTTON_FALLBACK_TEXT,
721
+ title: headerButton.text?.trim() || tr('pageHeader.buttonFallbackLabel'),
722
722
  titleStyle,
723
723
  url: headerButton.url ?? '',
724
724
  page: headerButton.buttonPageId ?? '',
@@ -1435,6 +1435,7 @@ declare const _default: import("vue").DefineComponent<{}, {
1435
1435
  headerViewModelDesktop(): any;
1436
1436
  isNavigationEmbeddedInLogoMobile(): boolean;
1437
1437
  isNavigationEmbeddedInLogoDesktop(): boolean;
1438
+ drawerHeaderButtonViewModel(): import("@brand-page").ButtonViewModel | undefined;
1438
1439
  shouldShowNavigation(): boolean;
1439
1440
  showNavigationAfterLogoMobile(): boolean;
1440
1441
  showNavigationAfterLogoDesktop(): boolean;