@designcrowd/library.brand-page 5.17.22 → 5.17.23-ast-subnav

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 (117) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-CE3q_ouk.js → CreatedOnBrandCrowd-de-de-Ct9Aewoo.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-YmCINEd2.js → CreatedOnBrandCrowd-en-us-BsEzGp5K.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-po716FZh.js → CreatedOnBrandCrowd-es-es-UiIPmY0h.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-DgSeh7zq.js → CreatedOnBrandCrowd-fr-ca-CQmEXbU7.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-DgSeh7zq.js → CreatedOnBrandCrowd-fr-fr-CQmEXbU7.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-BY3I3OVc.js → CreatedOnBrandCrowd-pt-br-DoMI5QSQ.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-BY3I3OVc.js → CreatedOnBrandCrowd-pt-pt-DoMI5QSQ.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-VF__9AH9.js → CreatedOnDcom-de-de-gexV_wWX.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-B653tDEJ.js → CreatedOnDcom-en-us-C2sLHLjJ.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-Cc3g0BMj.js → CreatedOnDcom-es-es-CZFd666H.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-NzxsUZqx.js → CreatedOnDcom-fr-ca-CPaRB_io.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-DFuj0umw.js → CreatedOnDcom-fr-fr-BQo5D5gE.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-VxpFX1Jd.js → CreatedOnDcom-pt-br-CRr3CqOj.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-CG2qMIlw.js → CreatedOnDcom-pt-pt-DR6Vi-eZ.js} +1 -1
  15. package/lib/src/brand-page/components/banner-section/BannerSection.mixin.d.ts +1 -1
  16. package/lib/src/brand-page/components/contact-form/ContactForm.mixin.d.ts +1 -0
  17. package/lib/src/brand-page/components/contact-form/ContactForm.mixin.js +20 -2
  18. package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.js +6 -2
  19. package/lib/src/brand-page/models/index.d.ts +1 -1
  20. package/lib/src/brand-page/models/navigation-styles.model.d.ts +2 -0
  21. package/lib/src/brand-page/models/navigation-styles.model.js +20 -1
  22. package/lib/src/brand-page/utils/migration/migration-14.d.ts +2 -0
  23. package/lib/src/brand-page/utils/migration/migration-14.js +16 -0
  24. package/lib/src/brand-page/utils/migration/migration-15.d.ts +2 -0
  25. package/lib/src/brand-page/utils/migration/migration-15.js +37 -0
  26. package/lib/src/brand-page/utils/migration.util.js +12 -0
  27. package/lib/src/brand-page/utils/style.util.js +16 -2
  28. package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.d.ts +1 -1
  29. package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.js +1 -1
  30. package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-site-template.examples.js +1 -1
  31. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +7 -1
  32. package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.js +1 -1
  33. package/lib/src/brand-page-maker/constants/config-settings-constant.js +1 -10
  34. package/lib/src/brand-page-maker/models/content-settings-configs.d.ts +5 -0
  35. package/lib/src/brand-page-maker/models/content-settings.js +3 -0
  36. package/lib/src/brand-page-maker/models/navigation-style-configs.d.ts +1 -0
  37. package/lib/src/brand-page-maker/models/navigation-style-configs.js +5 -0
  38. package/lib/src/brand-page-maker/utils/rich-text-editor.util.js +170 -388
  39. package/lib/src/{bundled-translations-Bu_5FO26.js → bundled-translations-Cy6nun02.js} +1 -1
  40. package/lib/src/{bundled-translations.de-DE-CZTzknyj.js → bundled-translations.de-DE-BUZncCAM.js} +1 -1
  41. package/lib/src/{bundled-translations.es-ES-p86F-gOD.js → bundled-translations.es-ES-D4IPwZD-.js} +9 -9
  42. package/lib/src/{bundled-translations.fr-CA-CM5ZA8dQ.js → bundled-translations.fr-CA-BMgRrrwA.js} +9 -9
  43. package/lib/src/{bundled-translations.fr-FR-DV7sOgtb.js → bundled-translations.fr-FR-Ck7kYrK4.js} +1 -1
  44. package/lib/src/{bundled-translations.pt-BR-DkWWGrsz.js → bundled-translations.pt-BR--5_9viJ9.js} +1 -1
  45. package/lib/src/{bundled-translations.pt-PT-C5Td5lLs.js → bundled-translations.pt-PT-DAGUOQ7m.js} +13 -13
  46. package/lib/src/bundles/bundled-translations.de-DE.json +1 -0
  47. package/lib/src/bundles/bundled-translations.es-ES.json +1 -0
  48. package/lib/src/bundles/bundled-translations.fr-CA.json +1 -0
  49. package/lib/src/bundles/bundled-translations.fr-FR.json +1 -0
  50. package/lib/src/bundles/bundled-translations.json +1 -0
  51. package/lib/src/bundles/bundled-translations.pt-BR.json +1 -0
  52. package/lib/src/bundles/bundled-translations.pt-PT.json +1 -0
  53. package/lib/src/css/library.brand-page-brandCrowd.min.css +99 -97
  54. package/lib/src/css/library.brand-page-brandPage.min.css +99 -97
  55. package/lib/src/css/library.brand-page-designCom.min.css +99 -97
  56. package/lib/src/css/library.brand-page-preview.min.css +99 -97
  57. package/lib/src/index.mjs +1 -1
  58. package/lib/src/{lib-DO1Zk3d3.js → lib-wvy4koSU.js} +21539 -21668
  59. package/lib/src/metadata-builder/builders/section-field-maps.js +1 -0
  60. package/lib/src/metadata-builder/builders/section-field-utils.js +5 -0
  61. package/lib/src/metadata-builder/helpers/rte.helpers.js +3 -0
  62. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.js +2 -1
  63. package/lib/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.d.ts +4 -1
  64. package/lib/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.js +55 -2
  65. package/lib/src/shared/navigation-style-settings/store/index.d.ts +6 -0
  66. package/lib/src/shared/navigation-style-settings/store/index.js +15 -0
  67. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +27 -1
  68. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +25 -2
  69. package/package.json +1 -1
  70. package/src/brand-page/components/about-section/AboutSection.vue +63 -6
  71. package/src/brand-page/components/collapsible/Collapsible.vue +8 -2
  72. package/src/brand-page/components/contact-form/ContactForm.mixin.ts +21 -2
  73. package/src/brand-page/components/contact-form/ContactForm.vue +15 -15
  74. package/src/brand-page/components/navigation/navigation-carousel/NavigationCarousel.vue +19 -8
  75. package/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.ts +6 -2
  76. package/src/brand-page/components/text-wrapper/TextWrapper.vue +5 -1
  77. package/src/brand-page/models/index.ts +1 -1
  78. package/src/brand-page/models/navigation-styles.model.ts +31 -0
  79. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +15 -3
  80. package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +4 -0
  81. package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +8 -0
  82. package/src/brand-page/utils/migration/migration-14.ts +23 -0
  83. package/src/brand-page/utils/migration/migration-15.ts +62 -0
  84. package/src/brand-page/utils/migration.util.ts +14 -0
  85. package/src/brand-page/utils/style.util.ts +16 -2
  86. package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.ts +1 -1
  87. package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-site-template.examples.ts +1 -1
  88. package/src/brand-page-maker/components/rich-text-editor/RichTextEditor.vue +8 -1
  89. package/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.ts +1 -1
  90. package/src/brand-page-maker/constants/config-settings-constant.ts +1 -10
  91. package/src/brand-page-maker/models/content-settings-configs.ts +6 -0
  92. package/src/brand-page-maker/models/content-settings.ts +3 -0
  93. package/src/brand-page-maker/models/i18n/models.de-DE.json +1 -0
  94. package/src/brand-page-maker/models/i18n/models.es-ES.json +1 -0
  95. package/src/brand-page-maker/models/i18n/models.fr-CA.json +1 -0
  96. package/src/brand-page-maker/models/i18n/models.fr-FR.json +1 -0
  97. package/src/brand-page-maker/models/i18n/models.json +1 -0
  98. package/src/brand-page-maker/models/i18n/models.pt-BR.json +1 -0
  99. package/src/brand-page-maker/models/i18n/models.pt-PT.json +1 -0
  100. package/src/brand-page-maker/models/navigation-style-configs.ts +5 -0
  101. package/src/brand-page-maker/utils/rich-text-editor.util.ts +274 -684
  102. package/src/bundles/bundled-translations.de-DE.json +1 -0
  103. package/src/bundles/bundled-translations.es-ES.json +1 -0
  104. package/src/bundles/bundled-translations.fr-CA.json +1 -0
  105. package/src/bundles/bundled-translations.fr-FR.json +1 -0
  106. package/src/bundles/bundled-translations.json +1 -0
  107. package/src/bundles/bundled-translations.pt-BR.json +1 -0
  108. package/src/bundles/bundled-translations.pt-PT.json +1 -0
  109. package/src/metadata-builder/builders/section-field-maps.ts +1 -0
  110. package/src/metadata-builder/builders/section-field-utils.ts +5 -0
  111. package/src/metadata-builder/helpers/rte.helpers.ts +4 -0
  112. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.ts +2 -1
  113. package/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.ts +82 -4
  114. package/src/shared/navigation-style-settings/store/index.ts +30 -0
  115. package/lib/src/brand-page/components/about-section/AboutSection.mixin.d.ts +0 -83
  116. package/lib/src/brand-page/components/about-section/AboutSection.mixin.js +0 -65
  117. package/src/brand-page/components/about-section/AboutSection.mixin.ts +0 -78
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-DO1Zk3d3.js";
2
+ import { _ as t } from "./lib-wvy4koSU.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-DO1Zk3d3.js";
2
+ import { _ as t } from "./lib-wvy4koSU.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-DO1Zk3d3.js";
2
+ import { _ as t } from "./lib-wvy4koSU.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-DO1Zk3d3.js";
2
+ import { _ as t } from "./lib-wvy4koSU.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-DO1Zk3d3.js";
2
+ import { _ as t } from "./lib-wvy4koSU.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-DO1Zk3d3.js";
2
+ import { _ as t } from "./lib-wvy4koSU.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-DO1Zk3d3.js";
2
+ import { _ as t } from "./lib-wvy4koSU.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-DO1Zk3d3.js";
2
+ import { _ as e } from "./lib-wvy4koSU.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-DO1Zk3d3.js";
2
+ import { _ as e } from "./lib-wvy4koSU.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-DO1Zk3d3.js";
2
+ import { _ as e } from "./lib-wvy4koSU.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-DO1Zk3d3.js";
2
+ import { _ as e } from "./lib-wvy4koSU.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-DO1Zk3d3.js";
2
+ import { _ as e } from "./lib-wvy4koSU.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-DO1Zk3d3.js";
2
+ import { _ as M } from "./lib-wvy4koSU.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-DO1Zk3d3.js";
2
+ import { _ as M } from "./lib-wvy4koSU.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -96,8 +96,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
96
96
  default: undefined;
97
97
  };
98
98
  }>> & Readonly<{}>, {
99
- contentIndex: number;
100
99
  containerClientWidth: number | undefined;
101
100
  containerClientHeight: number | undefined;
101
+ contentIndex: number;
102
102
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
103
103
  export default _default;
@@ -60,6 +60,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
60
60
  title(): string;
61
61
  renderText(): string;
62
62
  renderSuccessText(): string;
63
+ successMessageColorStyle(): BrandPageCssStyle;
63
64
  }, {
64
65
  submitContactForm(): Promise<void>;
65
66
  validateFormValues(): void;
@@ -5,6 +5,7 @@ import brandPageClient from '../../clients/brand-page.client';
5
5
  import { isEmail } from '../../../utils/validator.util';
6
6
  import { ALIGN_CARD_CENTER, ALIGN_CARD_CENTER_IMAGE, ALIGN_CENTERED, ALIGN_LEFT_FULL_IMAGE, ALIGN_RIGHT_FULL_IMAGE, DISPLAY_STYLE_COLLAPSED, RECAPTCHA_ACTION_CONTACT_FORM, TEXT_ONLY, } from '../../constants';
7
7
  import { getRenderText } from '@brand-page/utils';
8
+ import { hasRTEContent } from '@brand-page-maker/utils';
8
9
  import { useReCaptcha } from '../../composables/recaptcha.composable';
9
10
  export default defineComponent({
10
11
  props: {
@@ -116,13 +117,30 @@ export default defineComponent({
116
117
  if (!this.viewModel.description) {
117
118
  return '';
118
119
  }
119
- return getRenderText(this.viewModel.description);
120
+ if (hasRTEContent(this.viewModel.description)) {
121
+ return this.viewModel.description;
122
+ }
123
+ else {
124
+ return getRenderText(this.viewModel.description);
125
+ }
120
126
  },
121
127
  renderSuccessText() {
122
128
  if (!this.viewModel.successMessage) {
123
129
  return '';
124
130
  }
125
- return getRenderText(this.viewModel.successMessage);
131
+ if (hasRTEContent(this.viewModel.successMessage)) {
132
+ return this.viewModel.successMessage;
133
+ }
134
+ else {
135
+ return getRenderText(this.viewModel.successMessage);
136
+ }
137
+ },
138
+ successMessageColorStyle() {
139
+ const color = this.viewModel.successMessageStyle?.color;
140
+ if (color) {
141
+ return { color };
142
+ }
143
+ return {};
126
144
  },
127
145
  },
128
146
  watch: {
@@ -70,12 +70,16 @@ export default defineComponent({
70
70
  return navItem.relativePath === this.context.currentPageRelativePath;
71
71
  },
72
72
  getSubNavItemStyle(navItem) {
73
- const baseStyle = this.isCurrentPage(navItem)
73
+ const isActive = this.isCurrentPage(navItem);
74
+ const baseStyle = isActive
74
75
  ? this.selectedButtonStyle
75
76
  : this.defaultButtonStyle;
76
77
  return {
77
78
  ...baseStyle,
78
- paddingLeft: '32px', // 16px additional indentation (base is 16px)
79
+ paddingLeft: '32px',
80
+ backgroundColor: isActive
81
+ ? baseStyle.backgroundColor
82
+ : this.styles.hamburgerMenuStyle.subNavBackgroundColor ?? '#ffffff',
79
83
  };
80
84
  },
81
85
  closeSideMenu() {
@@ -245,7 +245,7 @@ export interface ContactFormContent extends Content {
245
245
  descriptionStyle?: TextStyleDeclaration;
246
246
  buttonTextStyle?: TextStyleDeclaration;
247
247
  backgroundStyle?: BrandPageCssStyle;
248
- messageTextColor?: BrandPageCssStyle;
248
+ successMessageStyle?: TextStyleDeclaration;
249
249
  cardStyle?: BrandPageCssStyle;
250
250
  colorReplacements?: ColorReplacement[];
251
251
  mediaType?: string;
@@ -5,6 +5,7 @@ export declare class NavigationMenuStyles {
5
5
  defaultButtonStyle: TextStyleDeclaration;
6
6
  selectedButtonStyle: BrandPageCssStyle;
7
7
  iconStyle: BrandPageCssStyle;
8
+ subNavBackgroundColor?: string;
8
9
  constructor(options: Partial<NavigationMenuStyles>, defaultOptions: Partial<NavigationMenuStyles>);
9
10
  }
10
11
  type NavigationStylesOptionType = Partial<Omit<NavigationDesktop | NavigationMobile, 'hamburgerMenuStyle'>> & {
@@ -17,6 +18,7 @@ declare abstract class NavigationStyles implements NavigationMenuStyles {
17
18
  defaultButtonStyle: TextStyleDeclaration;
18
19
  selectedButtonStyle: BrandPageCssStyle;
19
20
  iconStyle: BrandPageCssStyle;
21
+ subNavBackgroundColor?: string;
20
22
  isLogoVisible: boolean;
21
23
  hamburgerMenuStyle: NavigationMenuStyles;
22
24
  viewport: ViewportsType;
@@ -1,4 +1,4 @@
1
- import { DEFAULT_FONT_FAMILY_KEY, DEFAULT_FONT_STYLE, DEFAULT_TEXT_ALIGN, DEFAULT_TEXT_DECORATION, FONT_FAMILY_CONFIGS, FONT_SIZE_BODY, FONT_WEIGHT_NORMAL, defaultHamburgerNavigation, NAVIGATION_DISPLAY, } from '../constants';
1
+ import { DEFAULT_FONT_FAMILY_KEY, DEFAULT_FONT_STYLE, DEFAULT_TEXT_ALIGN, DEFAULT_TEXT_DECORATION, FONT_FAMILY_CONFIGS, FONT_SIZE_BODY, FONT_WEIGHT_NORMAL, STYLE_THEME_KEYS, defaultHamburgerNavigation, NAVIGATION_DISPLAY, } from '../constants';
2
2
  import { VIEWPORTS } from './index';
3
3
  import { TEXT_STYLE_TYPES } from './index';
4
4
  import cloneDeep from 'lodash.clonedeep';
@@ -6,18 +6,33 @@ export class NavigationMenuStyles {
6
6
  defaultButtonStyle;
7
7
  selectedButtonStyle;
8
8
  iconStyle;
9
+ subNavBackgroundColor;
9
10
  constructor(options, defaultOptions) {
10
11
  this.defaultButtonStyle = Object.assign({}, defaultOptions.defaultButtonStyle, options.defaultButtonStyle || {});
11
12
  this.selectedButtonStyle = Object.assign({}, defaultOptions.selectedButtonStyle, options.selectedButtonStyle || {});
12
13
  this.iconStyle = Object.assign({}, defaultOptions.iconStyle, options.iconStyle || {});
14
+ this.subNavBackgroundColor =
15
+ options.subNavBackgroundColor ?? defaultOptions.subNavBackgroundColor;
13
16
  }
14
17
  }
18
+ const getDefaultSubNavBackgroundColor = (defaultTextColor) => {
19
+ if (defaultTextColor === STYLE_THEME_KEYS.LogoTextColor ||
20
+ defaultTextColor === STYLE_THEME_KEYS.LogoTextMultiColor) {
21
+ return STYLE_THEME_KEYS.LogoBackgroundColor;
22
+ }
23
+ if (defaultTextColor === STYLE_THEME_KEYS.LogoBackgroundColor ||
24
+ defaultTextColor === STYLE_THEME_KEYS.LogoBackgroundMultiColor) {
25
+ return STYLE_THEME_KEYS.LogoTextColor;
26
+ }
27
+ return '#ffffff';
28
+ };
15
29
  class NavigationStyles {
16
30
  displayType;
17
31
  renderAfterLogo;
18
32
  defaultButtonStyle;
19
33
  selectedButtonStyle;
20
34
  iconStyle;
35
+ subNavBackgroundColor;
21
36
  isLogoVisible;
22
37
  hamburgerMenuStyle;
23
38
  viewport;
@@ -55,6 +70,9 @@ class NavigationStyles {
55
70
  borderColor: theme?.primaryColor,
56
71
  }, option?.selectedButtonStyle || {});
57
72
  this.iconStyle = Object.assign({}, option?.iconStyle || {});
73
+ this.subNavBackgroundColor =
74
+ option?.subNavBackgroundColor ??
75
+ getDefaultSubNavBackgroundColor(option?.defaultButtonStyle?.color);
58
76
  this.isLogoVisible = option?.isLogoVisible || true;
59
77
  this.hamburgerMenuStyle = new NavigationMenuStyles(option?.hamburgerMenuStyle || {}, {
60
78
  defaultButtonStyle: {
@@ -74,6 +92,7 @@ class NavigationStyles {
74
92
  color: theme?.secondaryColor,
75
93
  backgroundColor: theme?.primaryColor,
76
94
  },
95
+ subNavBackgroundColor: theme?.secondaryColor ?? '#ffffff',
77
96
  });
78
97
  }
79
98
  }
@@ -0,0 +1,2 @@
1
+ import type { MigrationData } from '../migration.util';
2
+ export declare const migration14: (migrationResult: MigrationData) => Promise<MigrationData>;
@@ -0,0 +1,16 @@
1
+ import { isContact } from '../model.util';
2
+ export const migration14 = async (migrationResult) => {
3
+ const { brandPageModel } = migrationResult;
4
+ brandPageModel.pages.forEach((page) => {
5
+ page.contents.forEach((content) => {
6
+ if (isContact(content)) {
7
+ const contactForm = content;
8
+ if ('messageTextColor' in contactForm) {
9
+ contactForm.successMessageStyle = contactForm.messageTextColor;
10
+ delete contactForm.messageTextColor;
11
+ }
12
+ }
13
+ });
14
+ });
15
+ return migrationResult;
16
+ };
@@ -0,0 +1,2 @@
1
+ import type { MigrationData } from '../migration.util';
2
+ export declare const migration15: (migrationResult: MigrationData) => Promise<MigrationData>;
@@ -0,0 +1,37 @@
1
+ import { STYLE_THEME_KEYS } from '../../constants';
2
+ const DEFAULT_SUB_NAV_BG_COLOR = '#ffffff';
3
+ const getSubNavBgColorFromTextColor = (textColor) => {
4
+ if (textColor === STYLE_THEME_KEYS.LogoTextColor ||
5
+ textColor === STYLE_THEME_KEYS.LogoTextMultiColor) {
6
+ return STYLE_THEME_KEYS.LogoBackgroundColor;
7
+ }
8
+ if (textColor === STYLE_THEME_KEYS.LogoBackgroundColor ||
9
+ textColor === STYLE_THEME_KEYS.LogoBackgroundMultiColor) {
10
+ return STYLE_THEME_KEYS.LogoTextColor;
11
+ }
12
+ return DEFAULT_SUB_NAV_BG_COLOR;
13
+ };
14
+ export const migration15 = async (migrationResult) => {
15
+ const { brandPageModel } = migrationResult;
16
+ const navigations = [
17
+ brandPageModel.pageHeaderDesktop?.navigation,
18
+ brandPageModel.pageHeaderMobile?.navigation,
19
+ brandPageModel.headerStyles?.navigation,
20
+ ];
21
+ for (const nav of navigations) {
22
+ if (!nav)
23
+ continue;
24
+ if (!nav.subNavBackgroundColor ||
25
+ nav.subNavBackgroundColor === DEFAULT_SUB_NAV_BG_COLOR) {
26
+ nav.subNavBackgroundColor = getSubNavBgColorFromTextColor(nav.defaultButtonStyle?.color);
27
+ }
28
+ if (nav.hamburgerMenuStyle) {
29
+ const hamburgerBg = nav.hamburgerMenuStyle.subNavBackgroundColor;
30
+ if (!hamburgerBg || hamburgerBg === DEFAULT_SUB_NAV_BG_COLOR) {
31
+ nav.hamburgerMenuStyle.subNavBackgroundColor =
32
+ getSubNavBgColorFromTextColor(nav.hamburgerMenuStyle.defaultButtonStyle?.color);
33
+ }
34
+ }
35
+ }
36
+ return migrationResult;
37
+ };
@@ -16,6 +16,8 @@ import { migration11 } from './migration/migration-11';
16
16
  import { migration12 } from './migration/migration-12';
17
17
  import { migration12_1 } from './migration/migration-12_1';
18
18
  import { migration13 } from './migration/migration-13';
19
+ import { migration14 } from './migration/migration-14';
20
+ import { migration15 } from './migration/migration-15';
19
21
  const MIGRATION_TABLE = [
20
22
  {
21
23
  version: 1,
@@ -103,6 +105,16 @@ const MIGRATION_TABLE = [
103
105
  migrateFn: migration13,
104
106
  description: 'Migrating old page navigation refererences to use page ids',
105
107
  },
108
+ {
109
+ version: 14,
110
+ migrateFn: migration14,
111
+ description: 'Renaming messageTextColor to successMessageStyle on contact form content',
112
+ },
113
+ {
114
+ version: 15,
115
+ migrateFn: migration15,
116
+ description: 'Set sub nav background color based on default text style color',
117
+ },
106
118
  ];
107
119
  export const GetLatestModelVersion = () => Math.max(...MIGRATION_TABLE.map((x) => x.version));
108
120
  export const migrateBrandPageModel = async (brandPageModel, options) => {
@@ -162,7 +162,14 @@ export const applyLogoThemeToBrandPageNavigationStyles = (logoTheme, navigation)
162
162
  : new NavigationDesktop();
163
163
  for (const [key, value] of Object.entries(navigation)) {
164
164
  if (typeof value === 'string' || typeof value === 'boolean') {
165
- newNavigation[key] = value;
165
+ if (typeof value === 'string') {
166
+ const output = colorMatchCssKeyValue(key, value, logoTheme);
167
+ newNavigation[key] = output.cssValue;
168
+ isModified = isModified || output.isModified;
169
+ }
170
+ else {
171
+ newNavigation[key] = value;
172
+ }
166
173
  }
167
174
  else {
168
175
  const output = applyLogoThemeToBrandPageStyleRecursive(logoTheme, key, value);
@@ -225,7 +232,14 @@ const CONTENT_STYLE_PROP_NAME_SUFFIX = [
225
232
  'Color',
226
233
  'Replacements',
227
234
  ];
228
- const RTE_ALLOWED_FIELDS = ['title', 'description', 'text', 'textItems'];
235
+ const RTE_ALLOWED_FIELDS = [
236
+ 'title',
237
+ 'description',
238
+ 'text',
239
+ 'textItems',
240
+ 'paragraph',
241
+ 'successMessage',
242
+ ];
229
243
  export const applyLogoThemeToContents = (logoTheme, pages) => {
230
244
  let isModified = false;
231
245
  const newPages = pages.map((page) => {
@@ -757,7 +757,7 @@ export declare const BRAND_SITE_SAMPLE_WITH_LOGO: {
757
757
  textStyleType: string;
758
758
  applyAutoScale: boolean;
759
759
  };
760
- messageTextColor: {};
760
+ successMessageStyle: {};
761
761
  }[];
762
762
  })[];
763
763
  styles: {
@@ -1455,7 +1455,7 @@ export const BRAND_SITE_SAMPLE_WITH_LOGO = {
1455
1455
  textStyleType: 'paragraphs',
1456
1456
  applyAutoScale: true,
1457
1457
  },
1458
- messageTextColor: {},
1458
+ successMessageStyle: {},
1459
1459
  },
1460
1460
  ],
1461
1461
  },
@@ -803,7 +803,7 @@ export const BRAND_SITE_TEMPLATE_SAMPLE_2 = [
803
803
  overflowWrap: 'anywhere',
804
804
  wordBreak: 'normal',
805
805
  },
806
- messageTextColor: {},
806
+ successMessageStyle: {},
807
807
  role: 'contact-form',
808
808
  buttonStyles: {
809
809
  style: {
@@ -964,6 +964,12 @@ declare const _default: import("vue").DefineComponent<{}, {
964
964
  style: BrandPageCssStyle;
965
965
  viewport: import("@brand-page").ViewportsType;
966
966
  }): void;
967
+ _setSubNavBackgroundColor({ displayType, section, value, viewport, }: {
968
+ displayType: import("@brand-page").NavigationDisplayType;
969
+ section: "footer" | "header";
970
+ value: string;
971
+ viewport: import("@brand-page").ViewportsType;
972
+ }): void;
967
973
  _setButtonStyles({ section, defaultButtonStyle, selectedButtonStyle, iconStyle, viewport, }: {
968
974
  section: "footer" | "header";
969
975
  defaultButtonStyle: import("@brand-page").TextStyleDeclaration;
@@ -978,7 +984,7 @@ declare const _default: import("vue").DefineComponent<{}, {
978
984
  }): void;
979
985
  setNavigationStyleOptionValue({ section, option, value, viewport, }: {
980
986
  section: "footer" | "header";
981
- option: "defaultBorderColor" | "selectedBorderColor" | "defaultTextStyle" | "defaultBackgroundColor" | "selectedTextColor" | "selectedBackgroundColor" | "iconColor" | "iconBackgroundColor";
987
+ option: "defaultBorderColor" | "selectedBorderColor" | "subNavBackgroundColor" | "defaultTextStyle" | "defaultBackgroundColor" | "selectedTextColor" | "selectedBackgroundColor" | "iconColor" | "iconBackgroundColor";
982
988
  value: any;
983
989
  viewport: import("@brand-page").ViewportsType;
984
990
  }): void;
@@ -387,7 +387,7 @@ export const useRichTextEditor = (model, props, emit, fontSettings, fontStyleDro
387
387
  const copyGlobalStyleSettings = (selectedTextStyle) => {
388
388
  const globalStyles = selectedTextStyle ?? selectedGlobalTextStyles.value?.style;
389
389
  if (globalStyles) {
390
- globalStyles.fontWeight && toggleBoldAll();
390
+ globalStyles.fontWeight === 'bold' && toggleBoldAll();
391
391
  globalStyles.fontStyle && toggleItalicAll();
392
392
  globalStyles.textDecoration?.includes('underline') &&
393
393
  toggleUnderlineAll();
@@ -1774,6 +1774,7 @@ export const CONTACT_FORM_SETTINGS_CONFIG = () => ({
1774
1774
  placeholder: contentSettingsTr(`successMessagePlaceholder`),
1775
1775
  title: contentSettingsTr(`successMessageTitle`),
1776
1776
  groupId: CONTACT_FORM_GROUPS.settings,
1777
+ maxLength: 1000,
1777
1778
  },
1778
1779
  responseEmail: {
1779
1780
  type: 'email',
@@ -1813,16 +1814,6 @@ export const CONTACT_FORM_SETTINGS_CONFIG = () => ({
1813
1814
  title: contentSettingsTr(`backgroundColorTitle`),
1814
1815
  valueConvertor: backgroundColorConvertor,
1815
1816
  },
1816
- messageTextColor: {
1817
- type: 'color',
1818
- groupId: CONTACT_FORM_GROUPS.style,
1819
- defaultValue: {},
1820
- isInline: true,
1821
- showToggle: false,
1822
- disableTransparent: true,
1823
- title: contentSettingsTr(`successMessageTextColorTitle`),
1824
- valueConvertor: colorConvertor,
1825
- },
1826
1817
  },
1827
1818
  isEnabled: true,
1828
1819
  isLocked: (features) => !features.canAddContactFormContents,
@@ -99,6 +99,11 @@ export interface ContentSettingsField<TContent> {
99
99
  fieldTypeAssessor?: FieldTypeAssessor<TContent>;
100
100
  defaultGetter?: DefaultGetter<any>;
101
101
  validator?: ContentValidator<TContent>;
102
+ /**
103
+ * Override the style field name used by the RTE editor.
104
+ * Defaults to `${fieldName}Style` when not specified.
105
+ */
106
+ styleName?: string;
102
107
  }
103
108
  export interface ContentSettingsMultiField<TContent, TField> extends Omit<ContentSettingsField<TContent>, 'type' | 'role'> {
104
109
  type: ItemMultiFieldType;
@@ -437,6 +437,9 @@ export const createInitialContactFormContent = (options) => {
437
437
  textStyleType: TEXT_STYLE_TYPES.paragraphs,
438
438
  textAlign: 'center',
439
439
  },
440
+ successMessageStyle: {
441
+ textStyleType: TEXT_STYLE_TYPES.paragraphs,
442
+ },
440
443
  buttonTextStyle: {
441
444
  applyAutoScale: options?.brandPageType === BRAND_PAGE_TYPES.brandSite,
442
445
  textStyleType: TEXT_STYLE_TYPES.buttons,
@@ -11,6 +11,7 @@ export declare const NavigationStyleConfigOptions: {
11
11
  readonly selectedBackgroundColor: "selectedBackgroundColor";
12
12
  readonly iconColor: "iconColor";
13
13
  readonly iconBackgroundColor: "iconBackgroundColor";
14
+ readonly subNavBackgroundColor: "subNavBackgroundColor";
14
15
  };
15
16
  export type NavigationStyleConfigOption = keyof typeof NavigationStyleConfigOptions;
16
17
  export declare const NAVIGATION_STYLE_CONFIG_OPTION_TITLES: () => Record<NavigationStyleConfigOption, string>;
@@ -10,6 +10,7 @@ export const NavigationStyleConfigOptions = {
10
10
  selectedBackgroundColor: 'selectedBackgroundColor',
11
11
  iconColor: 'iconColor',
12
12
  iconBackgroundColor: 'iconBackgroundColor',
13
+ subNavBackgroundColor: 'subNavBackgroundColor',
13
14
  };
14
15
  export const NAVIGATION_STYLE_CONFIG_OPTION_TITLES = () => ({
15
16
  defaultBorderColor: modelsTr('defaultBorderColor'),
@@ -20,6 +21,7 @@ export const NAVIGATION_STYLE_CONFIG_OPTION_TITLES = () => ({
20
21
  selectedBackgroundColor: modelsTr('selectedBackgroundColor'),
21
22
  iconColor: commonTr('iconColor'),
22
23
  iconBackgroundColor: modelsTr('iconBackgroundColor'),
24
+ subNavBackgroundColor: modelsTr('subNavBackgroundColor'),
23
25
  });
24
26
  const hamburgerNavigationConfig = {
25
27
  ...defaultHamburgerNavigation,
@@ -29,6 +31,7 @@ const hamburgerNavigationConfig = {
29
31
  'selectedBackgroundColor',
30
32
  'iconColor',
31
33
  'iconBackgroundColor',
34
+ 'subNavBackgroundColor',
32
35
  ],
33
36
  selectedButtonStyle: {},
34
37
  iconStyle: {},
@@ -68,6 +71,7 @@ export const availableNavigationStyleConfigs = [
68
71
  'selectedBackgroundColor',
69
72
  'selectedBorderColor',
70
73
  'selectedTextColor',
74
+ 'subNavBackgroundColor',
71
75
  ],
72
76
  buttonGroupOption: {
73
77
  value: NAVIGATION_DISPLAY.TAB_1,
@@ -104,6 +108,7 @@ export const availableNavigationStyleConfigs = [
104
108
  'defaultBorderColor',
105
109
  'selectedBackgroundColor',
106
110
  'selectedTextColor',
111
+ 'subNavBackgroundColor',
107
112
  ],
108
113
  buttonGroupOption: {
109
114
  value: NAVIGATION_DISPLAY.TAB_2,