@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.
- package/lib/src/{CreatedOnBrandCrowd-de-de-CE3q_ouk.js → CreatedOnBrandCrowd-de-de-Ct9Aewoo.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-YmCINEd2.js → CreatedOnBrandCrowd-en-us-BsEzGp5K.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-po716FZh.js → CreatedOnBrandCrowd-es-es-UiIPmY0h.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-DgSeh7zq.js → CreatedOnBrandCrowd-fr-ca-CQmEXbU7.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-DgSeh7zq.js → CreatedOnBrandCrowd-fr-fr-CQmEXbU7.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-BY3I3OVc.js → CreatedOnBrandCrowd-pt-br-DoMI5QSQ.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-BY3I3OVc.js → CreatedOnBrandCrowd-pt-pt-DoMI5QSQ.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-VF__9AH9.js → CreatedOnDcom-de-de-gexV_wWX.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-B653tDEJ.js → CreatedOnDcom-en-us-C2sLHLjJ.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-Cc3g0BMj.js → CreatedOnDcom-es-es-CZFd666H.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-NzxsUZqx.js → CreatedOnDcom-fr-ca-CPaRB_io.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-DFuj0umw.js → CreatedOnDcom-fr-fr-BQo5D5gE.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-VxpFX1Jd.js → CreatedOnDcom-pt-br-CRr3CqOj.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-CG2qMIlw.js → CreatedOnDcom-pt-pt-DR6Vi-eZ.js} +1 -1
- package/lib/src/brand-page/components/banner-section/BannerSection.mixin.d.ts +1 -1
- package/lib/src/brand-page/components/contact-form/ContactForm.mixin.d.ts +1 -0
- package/lib/src/brand-page/components/contact-form/ContactForm.mixin.js +20 -2
- package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.js +6 -2
- package/lib/src/brand-page/models/index.d.ts +1 -1
- package/lib/src/brand-page/models/navigation-styles.model.d.ts +2 -0
- package/lib/src/brand-page/models/navigation-styles.model.js +20 -1
- package/lib/src/brand-page/utils/migration/migration-14.d.ts +2 -0
- package/lib/src/brand-page/utils/migration/migration-14.js +16 -0
- package/lib/src/brand-page/utils/migration/migration-15.d.ts +2 -0
- package/lib/src/brand-page/utils/migration/migration-15.js +37 -0
- package/lib/src/brand-page/utils/migration.util.js +12 -0
- package/lib/src/brand-page/utils/style.util.js +16 -2
- package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.d.ts +1 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.js +1 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-site-template.examples.js +1 -1
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +7 -1
- package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.js +1 -1
- package/lib/src/brand-page-maker/constants/config-settings-constant.js +1 -10
- package/lib/src/brand-page-maker/models/content-settings-configs.d.ts +5 -0
- package/lib/src/brand-page-maker/models/content-settings.js +3 -0
- package/lib/src/brand-page-maker/models/navigation-style-configs.d.ts +1 -0
- package/lib/src/brand-page-maker/models/navigation-style-configs.js +5 -0
- package/lib/src/brand-page-maker/utils/rich-text-editor.util.js +170 -388
- package/lib/src/{bundled-translations-Bu_5FO26.js → bundled-translations-Cy6nun02.js} +1 -1
- package/lib/src/{bundled-translations.de-DE-CZTzknyj.js → bundled-translations.de-DE-BUZncCAM.js} +1 -1
- package/lib/src/{bundled-translations.es-ES-p86F-gOD.js → bundled-translations.es-ES-D4IPwZD-.js} +9 -9
- package/lib/src/{bundled-translations.fr-CA-CM5ZA8dQ.js → bundled-translations.fr-CA-BMgRrrwA.js} +9 -9
- package/lib/src/{bundled-translations.fr-FR-DV7sOgtb.js → bundled-translations.fr-FR-Ck7kYrK4.js} +1 -1
- package/lib/src/{bundled-translations.pt-BR-DkWWGrsz.js → bundled-translations.pt-BR--5_9viJ9.js} +1 -1
- package/lib/src/{bundled-translations.pt-PT-C5Td5lLs.js → bundled-translations.pt-PT-DAGUOQ7m.js} +13 -13
- package/lib/src/bundles/bundled-translations.de-DE.json +1 -0
- package/lib/src/bundles/bundled-translations.es-ES.json +1 -0
- package/lib/src/bundles/bundled-translations.fr-CA.json +1 -0
- package/lib/src/bundles/bundled-translations.fr-FR.json +1 -0
- package/lib/src/bundles/bundled-translations.json +1 -0
- package/lib/src/bundles/bundled-translations.pt-BR.json +1 -0
- package/lib/src/bundles/bundled-translations.pt-PT.json +1 -0
- package/lib/src/css/library.brand-page-brandCrowd.min.css +99 -97
- package/lib/src/css/library.brand-page-brandPage.min.css +99 -97
- package/lib/src/css/library.brand-page-designCom.min.css +99 -97
- package/lib/src/css/library.brand-page-preview.min.css +99 -97
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-DO1Zk3d3.js → lib-wvy4koSU.js} +21539 -21668
- package/lib/src/metadata-builder/builders/section-field-maps.js +1 -0
- package/lib/src/metadata-builder/builders/section-field-utils.js +5 -0
- package/lib/src/metadata-builder/helpers/rte.helpers.js +3 -0
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.js +2 -1
- package/lib/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.d.ts +4 -1
- package/lib/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.js +55 -2
- package/lib/src/shared/navigation-style-settings/store/index.d.ts +6 -0
- package/lib/src/shared/navigation-style-settings/store/index.js +15 -0
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +27 -1
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +25 -2
- package/package.json +1 -1
- package/src/brand-page/components/about-section/AboutSection.vue +63 -6
- package/src/brand-page/components/collapsible/Collapsible.vue +8 -2
- package/src/brand-page/components/contact-form/ContactForm.mixin.ts +21 -2
- package/src/brand-page/components/contact-form/ContactForm.vue +15 -15
- package/src/brand-page/components/navigation/navigation-carousel/NavigationCarousel.vue +19 -8
- package/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.ts +6 -2
- package/src/brand-page/components/text-wrapper/TextWrapper.vue +5 -1
- package/src/brand-page/models/index.ts +1 -1
- package/src/brand-page/models/navigation-styles.model.ts +31 -0
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +15 -3
- package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +4 -0
- package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +8 -0
- package/src/brand-page/utils/migration/migration-14.ts +23 -0
- package/src/brand-page/utils/migration/migration-15.ts +62 -0
- package/src/brand-page/utils/migration.util.ts +14 -0
- package/src/brand-page/utils/style.util.ts +16 -2
- package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.ts +1 -1
- package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-site-template.examples.ts +1 -1
- package/src/brand-page-maker/components/rich-text-editor/RichTextEditor.vue +8 -1
- package/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.ts +1 -1
- package/src/brand-page-maker/constants/config-settings-constant.ts +1 -10
- package/src/brand-page-maker/models/content-settings-configs.ts +6 -0
- package/src/brand-page-maker/models/content-settings.ts +3 -0
- package/src/brand-page-maker/models/i18n/models.de-DE.json +1 -0
- package/src/brand-page-maker/models/i18n/models.es-ES.json +1 -0
- package/src/brand-page-maker/models/i18n/models.fr-CA.json +1 -0
- package/src/brand-page-maker/models/i18n/models.fr-FR.json +1 -0
- package/src/brand-page-maker/models/i18n/models.json +1 -0
- package/src/brand-page-maker/models/i18n/models.pt-BR.json +1 -0
- package/src/brand-page-maker/models/i18n/models.pt-PT.json +1 -0
- package/src/brand-page-maker/models/navigation-style-configs.ts +5 -0
- package/src/brand-page-maker/utils/rich-text-editor.util.ts +274 -684
- package/src/bundles/bundled-translations.de-DE.json +1 -0
- package/src/bundles/bundled-translations.es-ES.json +1 -0
- package/src/bundles/bundled-translations.fr-CA.json +1 -0
- package/src/bundles/bundled-translations.fr-FR.json +1 -0
- package/src/bundles/bundled-translations.json +1 -0
- package/src/bundles/bundled-translations.pt-BR.json +1 -0
- package/src/bundles/bundled-translations.pt-PT.json +1 -0
- package/src/metadata-builder/builders/section-field-maps.ts +1 -0
- package/src/metadata-builder/builders/section-field-utils.ts +5 -0
- package/src/metadata-builder/helpers/rte.helpers.ts +4 -0
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.ts +2 -1
- package/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.ts +82 -4
- package/src/shared/navigation-style-settings/store/index.ts +30 -0
- package/lib/src/brand-page/components/about-section/AboutSection.mixin.d.ts +0 -83
- package/lib/src/brand-page/components/about-section/AboutSection.mixin.js +0 -65
- package/src/brand-page/components/about-section/AboutSection.mixin.ts +0 -78
|
@@ -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
|
-
|
|
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
|
-
|
|
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: {
|
package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.js
CHANGED
|
@@ -70,12 +70,16 @@ export default defineComponent({
|
|
|
70
70
|
return navItem.relativePath === this.context.currentPageRelativePath;
|
|
71
71
|
},
|
|
72
72
|
getSubNavItemStyle(navItem) {
|
|
73
|
-
const
|
|
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',
|
|
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
|
-
|
|
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,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,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
|
-
|
|
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 = [
|
|
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) => {
|
package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts
CHANGED
|
@@ -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,
|