@designcrowd/library.brand-page 5.17.24 → 5.17.25-ast-subnav-1
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-BNZPy6gb.js → CreatedOnBrandCrowd-de-de-A1LIY1JG.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-CDYK8a2c.js → CreatedOnBrandCrowd-en-us-DVloWK9E.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-DphVKlns.js → CreatedOnBrandCrowd-es-es-BtENFJW9.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-B6h0Kz4w.js → CreatedOnBrandCrowd-fr-ca-0SsE1mKX.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-B6h0Kz4w.js → CreatedOnBrandCrowd-fr-fr-0SsE1mKX.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-Ul4cjCzn.js → CreatedOnBrandCrowd-pt-br-CUCW0hCq.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-Ul4cjCzn.js → CreatedOnBrandCrowd-pt-pt-CUCW0hCq.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-BgUISgrB.js → CreatedOnDcom-de-de-B6r9MkXB.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-B9ndU3Ol.js → CreatedOnDcom-en-us-CGk1MSrt.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-ChU3xDaI.js → CreatedOnDcom-es-es-NuLxxhFL.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-R2QasTac.js → CreatedOnDcom-fr-ca-CEHyAXGc.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-R5PO6IlI.js → CreatedOnDcom-fr-fr-XPf1Jn7E.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-DRRbRn6T.js → CreatedOnDcom-pt-br-DxL3djRr.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-B-V3d_gi.js → CreatedOnDcom-pt-pt-D2N04Ne0.js} +1 -1
- package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.js +6 -2
- package/lib/src/brand-page/models/navigation-styles.model.d.ts +3 -0
- package/lib/src/brand-page/models/navigation-styles.model.js +20 -1
- package/lib/src/brand-page/utils/migration/migration-15.d.ts +2 -0
- package/lib/src/brand-page/utils/migration/migration-15.js +3 -0
- package/lib/src/brand-page/utils/migration.util.js +6 -0
- package/lib/src/brand-page/utils/style.util.js +12 -2
- package/lib/src/brand-page/utils/view-model.util.js +4 -2
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +2 -0
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +7 -1
- 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/stores/brandpage-container/brand-page-container-store.d.ts +2 -0
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.js +2 -1
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +9 -1
- 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-Bf5Pbl9o.js} +5 -5
- package/lib/src/{bundled-translations.es-ES-p86F-gOD.js → bundled-translations.es-ES-wcN8Cyzx.js} +1 -1
- package/lib/src/{bundled-translations.fr-CA-CM5ZA8dQ.js → bundled-translations.fr-CA-M5UVLWKo.js} +1 -1
- package/lib/src/{bundled-translations.fr-FR-DV7sOgtb.js → bundled-translations.fr-FR-D5SYpjlZ.js} +1 -1
- package/lib/src/{bundled-translations.pt-BR-DkWWGrsz.js → bundled-translations.pt-BR-CySDij-M.js} +1 -1
- package/lib/src/{bundled-translations.pt-PT-C5Td5lLs.js → bundled-translations.pt-PT-DiPjWW5m.js} +5 -5
- 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 +11 -12
- package/lib/src/css/library.brand-page-brandPage.min.css +11 -12
- package/lib/src/css/library.brand-page-designCom.min.css +11 -12
- package/lib/src/css/library.brand-page-preview.min.css +11 -12
- package/lib/src/index.mjs +49 -48
- package/lib/src/{lib-BFXrGmbh.js → lib-C3eglZr2.js} +17227 -17133
- package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.d.ts +2 -0
- 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 +25 -1
- 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/lib/src/shared/template-settings/components/TemplatesSettings.mixin.d.ts +2 -0
- package/lib/src/shared/template-settings/store/template-settings-store.d.ts +4 -0
- package/lib/src/shared/template-settings/store/template-settings-store.js +7 -0
- package/package.json +1 -1
- package/src/brand-page/components/navigation/navigation-carousel/NavigationCarousel.vue +22 -8
- package/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.ts +6 -2
- 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-15.ts +7 -0
- package/src/brand-page/utils/migration.util.ts +7 -0
- package/src/brand-page/utils/style.util.ts +11 -2
- package/src/brand-page/utils/view-model.util.ts +10 -2
- package/src/brand-page-maker/models/i18n/models.de-DE.json +16 -14
- package/src/brand-page-maker/models/i18n/models.es-ES.json +16 -14
- package/src/brand-page-maker/models/i18n/models.fr-CA.json +16 -14
- package/src/brand-page-maker/models/i18n/models.fr-FR.json +16 -14
- package/src/brand-page-maker/models/i18n/models.json +1 -0
- package/src/brand-page-maker/models/i18n/models.pt-BR.json +16 -14
- package/src/brand-page-maker/models/i18n/models.pt-PT.json +16 -14
- package/src/brand-page-maker/models/navigation-style-configs.ts +5 -0
- package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.ts +6 -1
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +14 -0
- 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/shared/logo-settings/components/LogoTemplateSearch.vue +1 -0
- package/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.ts +82 -4
- package/src/shared/navigation-style-settings/store/index.ts +47 -1
- package/src/shared/template-settings/store/template-settings-store.ts +18 -1
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() {
|
|
@@ -5,8 +5,10 @@ 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
|
}
|
|
11
|
+
export declare const getDefaultSubNavBackgroundColor: (defaultTextColor: string | undefined) => string | undefined;
|
|
10
12
|
type NavigationStylesOptionType = Partial<Omit<NavigationDesktop | NavigationMobile, 'hamburgerMenuStyle'>> & {
|
|
11
13
|
hamburgerMenuStyle?: Partial<NavigationMenuStyles>;
|
|
12
14
|
};
|
|
@@ -17,6 +19,7 @@ declare abstract class NavigationStyles implements NavigationMenuStyles {
|
|
|
17
19
|
defaultButtonStyle: TextStyleDeclaration;
|
|
18
20
|
selectedButtonStyle: BrandPageCssStyle;
|
|
19
21
|
iconStyle: BrandPageCssStyle;
|
|
22
|
+
subNavBackgroundColor?: string;
|
|
20
23
|
isLogoVisible: boolean;
|
|
21
24
|
hamburgerMenuStyle: NavigationMenuStyles;
|
|
22
25
|
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
|
+
export 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 undefined;
|
|
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(this.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,
|
|
77
96
|
});
|
|
78
97
|
}
|
|
79
98
|
}
|
|
@@ -17,6 +17,7 @@ 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
19
|
import { migration14 } from './migration/migration-14';
|
|
20
|
+
import { migration15 } from './migration/migration-15';
|
|
20
21
|
const MIGRATION_TABLE = [
|
|
21
22
|
{
|
|
22
23
|
version: 1,
|
|
@@ -109,6 +110,11 @@ const MIGRATION_TABLE = [
|
|
|
109
110
|
migrateFn: migration14,
|
|
110
111
|
description: 'Renaming messageTextColor to successMessageStyle on contact form content',
|
|
111
112
|
},
|
|
113
|
+
{
|
|
114
|
+
version: 15,
|
|
115
|
+
migrateFn: migration15,
|
|
116
|
+
description: 'Set sub nav background color based on default text style color',
|
|
117
|
+
},
|
|
112
118
|
];
|
|
113
119
|
export const GetLatestModelVersion = () => Math.max(...MIGRATION_TABLE.map((x) => x.version));
|
|
114
120
|
export const migrateBrandPageModel = async (brandPageModel, options) => {
|
|
@@ -162,13 +162,23 @@ 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
|
-
else {
|
|
174
|
+
else if (value != null && typeof value === 'object') {
|
|
168
175
|
const output = applyLogoThemeToBrandPageStyleRecursive(logoTheme, key, value);
|
|
169
176
|
newNavigation[key] = output.newStyle;
|
|
170
177
|
isModified = isModified || output.isApplied;
|
|
171
178
|
}
|
|
179
|
+
else {
|
|
180
|
+
newNavigation[key] = value;
|
|
181
|
+
}
|
|
172
182
|
}
|
|
173
183
|
return { navigation: newNavigation, isModified };
|
|
174
184
|
};
|
|
@@ -669,10 +669,12 @@ export const mapToPageHeaderViewModel = (pageHeader, pageStyles, pages, useOldLo
|
|
|
669
669
|
};
|
|
670
670
|
const navDefaultButtonTextStyle = getTextStyleByContentTextStyle(pageHeader.navigation.defaultButtonStyle, pageStyles.textStyles.textStyleOptions);
|
|
671
671
|
const navDefaultButtonStyle = Object.assign({}, pageHeader.navigation.defaultButtonStyle, navDefaultButtonTextStyle);
|
|
672
|
-
const
|
|
672
|
+
const { backgroundColor: _defaultBg, ...navDefaultTextStyleWithoutBg } = navDefaultButtonTextStyle || {};
|
|
673
|
+
const navSelectedButtonStyle = Object.assign({}, navDefaultTextStyleWithoutBg, pageHeader.navigation.selectedButtonStyle);
|
|
673
674
|
const hamburgerButtonTextStyle = getTextStyleByContentTextStyle(pageHeader.navigation.hamburgerMenuStyle.defaultButtonStyle, pageStyles.textStyles.textStyleOptions);
|
|
674
675
|
const hamburgerButtonStyle = Object.assign({}, pageHeader.navigation.hamburgerMenuStyle.defaultButtonStyle, hamburgerButtonTextStyle);
|
|
675
|
-
const
|
|
676
|
+
const { backgroundColor: _hamburgerDefaultBg, ...hamburgerTextStyleWithoutBg } = hamburgerButtonTextStyle || {};
|
|
677
|
+
const hamburgerSelectedButtonStyle = Object.assign({}, hamburgerTextStyleWithoutBg, pageHeader.navigation.hamburgerMenuStyle.selectedButtonStyle);
|
|
676
678
|
const hamburgerMenuStyle = new NavigationMenuStyles(Object.assign({}, pageHeader.navigation.hamburgerMenuStyle, {
|
|
677
679
|
defaultButtonStyle: hamburgerButtonStyle,
|
|
678
680
|
selectedButtonStyle: hamburgerSelectedButtonStyle,
|
|
@@ -1110,7 +1110,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1110
1110
|
}): void;
|
|
1111
1111
|
setInitialSearchTerm(payload: {
|
|
1112
1112
|
initialSearchTerm: string;
|
|
1113
|
+
onSearchTermChanged?: import("@shared/template-settings/store").OnSearchTermChangedCallback | undefined;
|
|
1113
1114
|
}): void;
|
|
1115
|
+
notifySearchTermChanged(searchTerm: string | undefined): void;
|
|
1114
1116
|
clearTemplates(): void;
|
|
1115
1117
|
getTemplateByTemplateId(id: string): import("@shared/template-settings/models").TemplateSettingsTemplate | undefined;
|
|
1116
1118
|
setupLogoChangeWatcher(): void;
|
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 | undefined;
|
|
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;
|
|
@@ -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,
|
|
@@ -4,6 +4,7 @@ import type { CustomDomainConfigModel, CustomDomainModel } from '@brand-page-mak
|
|
|
4
4
|
import { type AbTest } from '@brand-page';
|
|
5
5
|
import type { WebsiteSlugCheckResponse } from '@brand-page-maker/models/api.model';
|
|
6
6
|
import { WEBSITE_UPGRADE_CONTEXT_TYPES } from '@designcrowd/fe-shared-lib';
|
|
7
|
+
import { type OnSearchTermChangedCallback } from '@shared/template-settings/store';
|
|
7
8
|
export type WebsiteContextUpgradeType = keyof typeof WEBSITE_UPGRADE_CONTEXT_TYPES;
|
|
8
9
|
export interface BrandPageContainerState {
|
|
9
10
|
availableTaxes: any[];
|
|
@@ -74,6 +75,7 @@ export type InitialisePayload = Omit<BrandPageContainerState, 'customDomain' | '
|
|
|
74
75
|
logoDraftAssets: LogoDraftAsset[];
|
|
75
76
|
gettyVideos: GettyVideoEditorViewModelResponse[];
|
|
76
77
|
templateSearchTerm: string | undefined;
|
|
78
|
+
onSearchTermChanged?: OnSearchTermChangedCallback;
|
|
77
79
|
};
|
|
78
80
|
export declare const BRANDPAGE_STATUS: Readonly<{
|
|
79
81
|
Published: "Published";
|
|
@@ -13,7 +13,7 @@ import { navigationTr } from '@src/composables/useTranslate';
|
|
|
13
13
|
import { errorTr, constantsTr } from '@src/composables/useTranslate';
|
|
14
14
|
import { findValuesByKey } from '../../../helpers/ts.helper';
|
|
15
15
|
import { WEBSITE_UPGRADE_CONTEXT_TYPES } from '@designcrowd/fe-shared-lib';
|
|
16
|
-
import { useUiTemplateSettingsStore } from '@shared/template-settings/store';
|
|
16
|
+
import { useUiTemplateSettingsStore, } from '@shared/template-settings/store';
|
|
17
17
|
export const BRANDPAGE_STATUS = Object.freeze({
|
|
18
18
|
Published: 'Published',
|
|
19
19
|
Unpublished: 'Unpublished',
|
|
@@ -135,6 +135,7 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
135
135
|
});
|
|
136
136
|
templateSettingsStore.setInitialSearchTerm({
|
|
137
137
|
initialSearchTerm: payload.templateSearchTerm ?? '',
|
|
138
|
+
onSearchTermChanged: payload.onSearchTermChanged,
|
|
138
139
|
});
|
|
139
140
|
brandPageMakerStore.setSelectedTemplateId({
|
|
140
141
|
templateId: this.designTemplateToken,
|
|
@@ -18,7 +18,7 @@ import { useUiContentSettingsStore } from '@shared/content-settings/store';
|
|
|
18
18
|
import { setContentSettingsAddContentOptions } from './brandpage-maker-store-utils';
|
|
19
19
|
import { useAdminLogoSettingsStore } from '../admin-logo-settings';
|
|
20
20
|
import { useUiPageSettingsStore } from '@shared/page-settings/store';
|
|
21
|
-
import { mapBrandPageContentToContentSettingsItem, removeContentFieldValues, removeLogoTemplateModel, } from '@brand-page-maker/utils';
|
|
21
|
+
import { isColorMatched, mapBrandPageContentToContentSettingsItem, removeContentFieldValues, removeLogoTemplateModel, } from '@brand-page-maker/utils';
|
|
22
22
|
import { UI_DEVICE_MODES, UI_SCREENSIZE_MODES, } from '@shared/models';
|
|
23
23
|
import { PAGE_SECTIONS } from '@shared/page-settings/models';
|
|
24
24
|
import { useUiTemplateSettingsStore } from '@shared/template-settings/store';
|
|
@@ -345,6 +345,14 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
345
345
|
},
|
|
346
346
|
},
|
|
347
347
|
});
|
|
348
|
+
if (userStore.isAdmin) {
|
|
349
|
+
for (const viewport of [VIEWPORTS.desktop, VIEWPORTS.mobile]) {
|
|
350
|
+
const hamburger = navigationStyleSettingsStore.navigation[PAGE_SECTIONS.header][viewport].hamburgerMenuStyle;
|
|
351
|
+
if (isColorMatched(hamburger.subNavBackgroundColor)) {
|
|
352
|
+
hamburger.subNavBackgroundColor = undefined;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
348
356
|
backgroundSettingsStore.setBackgroundStyles({
|
|
349
357
|
backgroundStyles: brandPageModel.styles.backgroundStyles,
|
|
350
358
|
});
|