@designcrowd/library.brand-page 5.18.1 → 5.18.2-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.
Files changed (52) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-DFpjIAUv.js → CreatedOnBrandCrowd-de-de-BcE0fnK1.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-BapIT2xO.js → CreatedOnBrandCrowd-en-us-CSiIpDLD.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-DaSf3Dt6.js → CreatedOnBrandCrowd-es-es-D_dx-lMy.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-Cvgei7yn.js → CreatedOnBrandCrowd-fr-ca-BR7qAax-.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-Cvgei7yn.js → CreatedOnBrandCrowd-fr-fr-BR7qAax-.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-Duxd2NmR.js → CreatedOnBrandCrowd-pt-br-D8L6aJoK.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-Duxd2NmR.js → CreatedOnBrandCrowd-pt-pt-D8L6aJoK.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-DXwNbruv.js → CreatedOnDcom-de-de-Bo0WNPXh.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-CkNGwN-p.js → CreatedOnDcom-en-us-B0GDCSrA.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-Csyf5yhI.js → CreatedOnDcom-es-es-CDq2MPQJ.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-GOIUmIdy.js → CreatedOnDcom-fr-ca-B8L5Wjnk.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-DF63cL2a.js → CreatedOnDcom-fr-fr-vpgsTke6.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-Ct6FWj7D.js → CreatedOnDcom-pt-br-CUMf_n7T.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-D22yb8Ci.js → CreatedOnDcom-pt-pt-B_Ek1lUj.js} +1 -1
  15. package/lib/src/brand-page/components/page/Page.mixin.d.ts +1 -1
  16. package/lib/src/brand-page/components/page/PageComponent.mixin.d.ts +1 -1
  17. package/lib/src/brand-page/constants/misc.constants.d.ts +6 -0
  18. package/lib/src/brand-page/constants/misc.constants.js +6 -0
  19. package/lib/src/brand-page/models/navigation-styles.model.d.ts +1 -0
  20. package/lib/src/brand-page/models/navigation-styles.model.js +28 -2
  21. package/lib/src/brand-page/utils/migration/migration-16.d.ts +2 -0
  22. package/lib/src/brand-page/utils/migration/migration-16.js +52 -0
  23. package/lib/src/brand-page/utils/migration.util.js +6 -0
  24. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +1 -1
  25. package/lib/src/brand-page-maker/convertors/banner-align-display-style.convertor.js +56 -2
  26. package/lib/src/css/library.brand-page-brandCrowd.min.css +123 -99
  27. package/lib/src/css/library.brand-page-brandPage.min.css +124 -99
  28. package/lib/src/css/library.brand-page-designCom.min.css +123 -99
  29. package/lib/src/css/library.brand-page-preview.min.css +123 -99
  30. package/lib/src/index.mjs +49 -48
  31. package/lib/src/{lib-_iwoSD1Z.js → lib-BXKezSr4.js} +17407 -16901
  32. package/lib/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.js +10 -8
  33. package/lib/src/shared/navigation-style-settings/store/index.js +1 -12
  34. package/package.json +2 -2
  35. package/src/brand-page/components/banner-section/BannerSection.vue +360 -12
  36. package/src/brand-page/components/banner-section/BannerSection.vue.test.ts +201 -0
  37. package/src/brand-page/components/placeholder/Placeholder.vue +39 -100
  38. package/src/brand-page/constants/misc.constants.ts +6 -0
  39. package/src/brand-page/models/navigation-styles.model.ts +43 -1
  40. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +3 -3
  41. package/src/brand-page/utils/migration/migration-16.test.ts +125 -0
  42. package/src/brand-page/utils/migration/migration-16.ts +80 -0
  43. package/src/brand-page/utils/migration.util.ts +7 -0
  44. package/src/brand-page-maker/components/color-palette/BpColorPalette.vue +10 -1
  45. package/src/brand-page-maker/convertors/banner-align-display-style.convertor.ts +61 -1
  46. package/src/shared/content-settings/components/color-field/ColorField.vue +10 -5
  47. package/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.ts +17 -11
  48. package/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.vue +4 -1
  49. package/src/shared/navigation-style-settings/store/index.ts +1 -21
  50. package/lib/src/brand-page/components/banner-section/BannerSection.mixin.d.ts +0 -103
  51. package/lib/src/brand-page/components/banner-section/BannerSection.mixin.js +0 -178
  52. package/src/brand-page/components/banner-section/BannerSection.mixin.ts +0 -213
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-_iwoSD1Z.js";
2
+ import { _ as t } from "./lib-BXKezSr4.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-_iwoSD1Z.js";
2
+ import { _ as t } from "./lib-BXKezSr4.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-_iwoSD1Z.js";
2
+ import { _ as t } from "./lib-BXKezSr4.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-_iwoSD1Z.js";
2
+ import { _ as t } from "./lib-BXKezSr4.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-_iwoSD1Z.js";
2
+ import { _ as t } from "./lib-BXKezSr4.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-_iwoSD1Z.js";
2
+ import { _ as t } from "./lib-BXKezSr4.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-_iwoSD1Z.js";
2
+ import { _ as t } from "./lib-BXKezSr4.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-_iwoSD1Z.js";
2
+ import { _ as e } from "./lib-BXKezSr4.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-_iwoSD1Z.js";
2
+ import { _ as e } from "./lib-BXKezSr4.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-_iwoSD1Z.js";
2
+ import { _ as e } from "./lib-BXKezSr4.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-_iwoSD1Z.js";
2
+ import { _ as e } from "./lib-BXKezSr4.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-_iwoSD1Z.js";
2
+ import { _ as e } from "./lib-BXKezSr4.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-_iwoSD1Z.js";
2
+ import { _ as M } from "./lib-BXKezSr4.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-_iwoSD1Z.js";
2
+ import { _ as M } from "./lib-BXKezSr4.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -145,8 +145,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
145
145
  }>, {
146
146
  viewport: ViewportsType;
147
147
  isMobileDevice: boolean;
148
- containerClientWidth: number | undefined;
149
148
  containerClientHeight: number | undefined;
149
+ containerClientWidth: number | undefined;
150
150
  isContentSelected: boolean;
151
151
  isHeaderSelected: boolean;
152
152
  isFooterSelected: boolean;
@@ -78,7 +78,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
78
78
  }>> & Readonly<{}>, {
79
79
  brandPageToken: string;
80
80
  isMobileDevice: boolean;
81
- containerClientWidth: number;
82
81
  containerClientHeight: number;
82
+ containerClientWidth: number;
83
83
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
84
84
  export default _default;
@@ -12,6 +12,12 @@ export declare const ALIGN_LEFT_BIG_IMAGE = "left-aligned-big-image";
12
12
  export declare const ALIGN_CARD_CENTER_IMAGE = "center-card-aligned-image";
13
13
  export declare const ALIGN_CARD_CENTER = "center-card-aligned";
14
14
  export declare const ALIGN_CARD_LEFT_IMAGE = "left-card-aligned-image";
15
+ export declare const ALIGN_TOP_CARD_IMAGE = "top-card-aligned-image";
16
+ export declare const ALIGN_BOTTOM_CARD_IMAGE = "bottom-card-aligned-image";
17
+ export declare const ALIGN_MIDDLE_CARD_IMAGE = "middle-card-aligned-image";
18
+ export declare const ALIGN_TOP_FULL_IMAGE = "top-aligned-full-image";
19
+ export declare const ALIGN_BOTTOM_FULL_IMAGE = "bottom-aligned-full-image";
20
+ export declare const ALIGN_MIDDLE_FULL_IMAGE = "middle-aligned-full-image";
15
21
  export declare const MAX_IMAGES_SECTION_ALIGNMENT_ITEMS_LENGTH = 3;
16
22
  export declare const TEXT_COLUMNS: {
17
23
  readonly 1: "1";
@@ -13,6 +13,12 @@ export const ALIGN_LEFT_BIG_IMAGE = 'left-aligned-big-image';
13
13
  export const ALIGN_CARD_CENTER_IMAGE = 'center-card-aligned-image';
14
14
  export const ALIGN_CARD_CENTER = 'center-card-aligned';
15
15
  export const ALIGN_CARD_LEFT_IMAGE = 'left-card-aligned-image';
16
+ export const ALIGN_TOP_CARD_IMAGE = 'top-card-aligned-image';
17
+ export const ALIGN_BOTTOM_CARD_IMAGE = 'bottom-card-aligned-image';
18
+ export const ALIGN_MIDDLE_CARD_IMAGE = 'middle-card-aligned-image';
19
+ export const ALIGN_TOP_FULL_IMAGE = 'top-aligned-full-image';
20
+ export const ALIGN_BOTTOM_FULL_IMAGE = 'bottom-aligned-full-image';
21
+ export const ALIGN_MIDDLE_FULL_IMAGE = 'middle-aligned-full-image';
16
22
  export const MAX_IMAGES_SECTION_ALIGNMENT_ITEMS_LENGTH = 3;
17
23
  export const TEXT_COLUMNS = {
18
24
  1: '1',
@@ -8,6 +8,7 @@ export declare class NavigationMenuStyles {
8
8
  subNavBackgroundColor?: string;
9
9
  constructor(options: Partial<NavigationMenuStyles>, defaultOptions: Partial<NavigationMenuStyles>);
10
10
  }
11
+ export declare const getDefaultSubNavBackgroundColor: (defaultTextColor: string | undefined) => string | undefined;
11
12
  type NavigationStylesOptionType = Partial<Omit<NavigationDesktop | NavigationMobile, 'hamburgerMenuStyle'>> & {
12
13
  hamburgerMenuStyle?: Partial<NavigationMenuStyles>;
13
14
  };
@@ -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';
@@ -15,6 +15,17 @@ export class NavigationMenuStyles {
15
15
  options.subNavBackgroundColor ?? defaultOptions.subNavBackgroundColor;
16
16
  }
17
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
+ };
18
29
  class NavigationStyles {
19
30
  displayType;
20
31
  renderAfterLogo;
@@ -59,7 +70,9 @@ class NavigationStyles {
59
70
  borderColor: theme?.primaryColor,
60
71
  }, option?.selectedButtonStyle || {});
61
72
  this.iconStyle = Object.assign({}, option?.iconStyle || {});
62
- this.subNavBackgroundColor = option?.subNavBackgroundColor;
73
+ this.subNavBackgroundColor =
74
+ option?.subNavBackgroundColor ??
75
+ getDefaultSubNavBackgroundColor(this.defaultButtonStyle.color);
63
76
  this.isLogoVisible = option?.isLogoVisible || true;
64
77
  this.hamburgerMenuStyle = new NavigationMenuStyles(option?.hamburgerMenuStyle || {}, {
65
78
  defaultButtonStyle: {
@@ -81,6 +94,19 @@ class NavigationStyles {
81
94
  },
82
95
  subNavBackgroundColor: theme?.secondaryColor,
83
96
  });
97
+ // Default the hamburger sub nav to the opposite logo colour when the menu
98
+ // text is colour matched (e.g. logo text colour -> logo background colour).
99
+ // Runs on every load - so it also reaches sites already stamped at the latest
100
+ // model version, where the migration is version-gated out (bp-5454). Only an
101
+ // unset value or the legacy explicit default is upgraded, so a deliberate
102
+ // non-matched choice (or an already color matched value) is preserved.
103
+ const colorMatchedHamburgerSubNav = getDefaultSubNavBackgroundColor(this.hamburgerMenuStyle.defaultButtonStyle.color);
104
+ if (colorMatchedHamburgerSubNav &&
105
+ (this.hamburgerMenuStyle.subNavBackgroundColor === undefined ||
106
+ this.hamburgerMenuStyle.subNavBackgroundColor === theme?.secondaryColor)) {
107
+ this.hamburgerMenuStyle.subNavBackgroundColor =
108
+ colorMatchedHamburgerSubNav;
109
+ }
84
110
  }
85
111
  }
86
112
  export class NavigationDesktop extends NavigationStyles {
@@ -0,0 +1,2 @@
1
+ import type { MigrationData } from '../migration.util';
2
+ export declare const migration16: (migrationResult: MigrationData) => Promise<MigrationData>;
@@ -0,0 +1,52 @@
1
+ import { STYLE_THEME_KEYS, NAVIGATION_DISPLAY } from '../../constants';
2
+ import { getDefaultSubNavBackgroundColor } from '../../models';
3
+ /**
4
+ * Migration 16: Default the sub nav background color to "color match on" for
5
+ * existing sites using the TAB_2 ("nav 2") or any hamburger display style.
6
+ *
7
+ * Before the sub nav background colour feature shipped, these styles defaulted
8
+ * to an explicit colour (e.g. the theme secondary colour for hamburger). This
9
+ * migration brings existing sites in line with the new default by setting the
10
+ * sub nav background colour to a logo theme key (color matched), unless the
11
+ * value is already color matched - in which case the user's choice is kept.
12
+ */
13
+ const isColorMatched = (color) => !!color && Object.values(STYLE_THEME_KEYS).includes(color);
14
+ // Matches NavigationStyleSettings.getMenuStyles: hamburger styles live on the
15
+ // hamburgerMenuStyle (looser `.includes` to catch any hamburger variant),
16
+ // TAB_2 uses the top-level styles.
17
+ const isHamburger = (displayType) => displayType.includes('hamburger');
18
+ const isColorMatchTargetDisplayType = (displayType) => isHamburger(displayType) || displayType === NAVIGATION_DISPLAY.TAB_2;
19
+ const applyDefaultSubNavColorMatch = (navigation) => {
20
+ if (!navigation?.displayType) {
21
+ return;
22
+ }
23
+ if (!isColorMatchTargetDisplayType(navigation.displayType)) {
24
+ return;
25
+ }
26
+ let menuStyles;
27
+ if (isHamburger(navigation.displayType)) {
28
+ navigation.hamburgerMenuStyle =
29
+ navigation.hamburgerMenuStyle ?? {};
30
+ menuStyles = navigation.hamburgerMenuStyle;
31
+ }
32
+ else {
33
+ menuStyles = navigation;
34
+ }
35
+ // Respect an existing color matched value so we don't clobber a deliberate choice.
36
+ if (isColorMatched(menuStyles.subNavBackgroundColor)) {
37
+ return;
38
+ }
39
+ // Only color match the sub nav when the default text color is itself color
40
+ // matched - in which case it takes the opposite logo color (e.g. logo text
41
+ // color -> logo background color). Otherwise leave the sub nav as-is.
42
+ const colorMatchedSubNav = getDefaultSubNavBackgroundColor(menuStyles.defaultButtonStyle?.color);
43
+ if (colorMatchedSubNav) {
44
+ menuStyles.subNavBackgroundColor = colorMatchedSubNav;
45
+ }
46
+ };
47
+ export const migration16 = async (migrationResult) => {
48
+ const { brandPageModel } = migrationResult;
49
+ applyDefaultSubNavColorMatch(brandPageModel.pageHeaderDesktop?.navigation);
50
+ applyDefaultSubNavColorMatch(brandPageModel.pageHeaderMobile?.navigation);
51
+ return migrationResult;
52
+ };
@@ -18,6 +18,7 @@ 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
20
  import { migration15 } from './migration/migration-15';
21
+ import { migration16 } from './migration/migration-16';
21
22
  const MIGRATION_TABLE = [
22
23
  {
23
24
  version: 1,
@@ -115,6 +116,11 @@ const MIGRATION_TABLE = [
115
116
  migrateFn: migration15,
116
117
  description: 'Adding default mediaOverlayStyle to background styles',
117
118
  },
119
+ {
120
+ version: 16,
121
+ migrateFn: migration16,
122
+ description: 'Default sub nav background color to color match on for existing TAB_2 and hamburger navs',
123
+ },
118
124
  ];
119
125
  export const GetLatestModelVersion = () => Math.max(...MIGRATION_TABLE.map((x) => x.version));
120
126
  export const migrateBrandPageModel = async (brandPageModel, options) => {
@@ -1312,8 +1312,8 @@ declare const _default: import("vue").DefineComponent<{}, {
1312
1312
  }>, {
1313
1313
  viewport: import("@brand-page").ViewportsType;
1314
1314
  isMobileDevice: boolean;
1315
- containerClientWidth: number | undefined;
1316
1315
  containerClientHeight: number | undefined;
1316
+ containerClientWidth: number | undefined;
1317
1317
  isContentSelected: boolean;
1318
1318
  isHeaderSelected: boolean;
1319
1319
  isFooterSelected: boolean;
@@ -1,4 +1,4 @@
1
- import { ALIGN_CENTERED, ALIGN_LEFT_ALIGNED, ALIGN_RIGHT_ALIGNED, BIG_IMAGE, ALIGN_LEFT_FULL_IMAGE, ALIGN_RIGHT_FULL_IMAGE, ALIGN_LEFT_BIG_IMAGE, ALIGN_CARD_CENTER_IMAGE, ALIGN_CARD_LEFT_IMAGE, } from '@brand-page/constants';
1
+ import { ALIGN_CENTERED, ALIGN_LEFT_ALIGNED, ALIGN_RIGHT_ALIGNED, BIG_IMAGE, ALIGN_LEFT_FULL_IMAGE, ALIGN_RIGHT_FULL_IMAGE, ALIGN_LEFT_BIG_IMAGE, ALIGN_CARD_CENTER_IMAGE, ALIGN_CARD_LEFT_IMAGE, ALIGN_TOP_CARD_IMAGE, ALIGN_BOTTOM_CARD_IMAGE, ALIGN_MIDDLE_CARD_IMAGE, ALIGN_TOP_FULL_IMAGE, ALIGN_BOTTOM_FULL_IMAGE, ALIGN_MIDDLE_FULL_IMAGE, } from '@brand-page/constants';
2
2
  export const bannerAlignDisplayStyleConvertor = {
3
3
  convertBackToMultipleValues: true,
4
4
  convert(value) {
@@ -28,6 +28,54 @@ export const bannerAlignDisplayStyleConvertor = {
28
28
  iconViewBox: '0 0 110 64',
29
29
  dataAttribute: 'data-test-btn-text-only',
30
30
  },
31
+ {
32
+ title: '',
33
+ value: ALIGN_TOP_CARD_IMAGE,
34
+ isSelected: value === ALIGN_TOP_CARD_IMAGE,
35
+ iconName: 'display-style-banner-10',
36
+ iconViewBox: '0 0 110 64',
37
+ dataAttribute: 'data-test-btn-top-card-image',
38
+ },
39
+ {
40
+ title: '',
41
+ value: ALIGN_BOTTOM_CARD_IMAGE,
42
+ isSelected: value === ALIGN_BOTTOM_CARD_IMAGE,
43
+ iconName: 'display-style-banner-11',
44
+ iconViewBox: '0 0 110 64',
45
+ dataAttribute: 'data-test-btn-bottom-card-image',
46
+ },
47
+ {
48
+ title: '',
49
+ value: ALIGN_MIDDLE_CARD_IMAGE,
50
+ isSelected: value === ALIGN_MIDDLE_CARD_IMAGE,
51
+ iconName: 'display-style-banner-12',
52
+ iconViewBox: '0 0 110 64',
53
+ dataAttribute: 'data-test-btn-middle-card-image',
54
+ },
55
+ {
56
+ title: '',
57
+ value: ALIGN_TOP_FULL_IMAGE,
58
+ isSelected: value === ALIGN_TOP_FULL_IMAGE,
59
+ iconName: 'display-style-banner-13',
60
+ iconViewBox: '0 0 110 64',
61
+ dataAttribute: 'data-test-btn-top-full-image',
62
+ },
63
+ {
64
+ title: '',
65
+ value: ALIGN_BOTTOM_FULL_IMAGE,
66
+ isSelected: value === ALIGN_BOTTOM_FULL_IMAGE,
67
+ iconName: 'display-style-banner-14',
68
+ iconViewBox: '0 0 110 64',
69
+ dataAttribute: 'data-test-btn-bottom-full-image',
70
+ },
71
+ {
72
+ title: '',
73
+ value: ALIGN_MIDDLE_FULL_IMAGE,
74
+ isSelected: value === ALIGN_MIDDLE_FULL_IMAGE,
75
+ iconName: 'display-style-banner-15',
76
+ iconViewBox: '0 0 110 64',
77
+ dataAttribute: 'data-test-btn-middle-full-image',
78
+ },
31
79
  {
32
80
  title: '',
33
81
  value: BIG_IMAGE,
@@ -86,7 +134,13 @@ export const bannerAlignDisplayStyleConvertor = {
86
134
  if (!selectedOption ||
87
135
  selectedOption.value === ALIGN_CENTERED ||
88
136
  selectedOption.value === BIG_IMAGE ||
89
- selectedOption.value === ALIGN_CARD_CENTER_IMAGE) {
137
+ selectedOption.value === ALIGN_CARD_CENTER_IMAGE ||
138
+ selectedOption.value === ALIGN_TOP_CARD_IMAGE ||
139
+ selectedOption.value === ALIGN_BOTTOM_CARD_IMAGE ||
140
+ selectedOption.value === ALIGN_MIDDLE_CARD_IMAGE ||
141
+ selectedOption.value === ALIGN_TOP_FULL_IMAGE ||
142
+ selectedOption.value === ALIGN_BOTTOM_FULL_IMAGE ||
143
+ selectedOption.value === ALIGN_MIDDLE_FULL_IMAGE) {
90
144
  textAlign = 'center';
91
145
  }
92
146
  return {