@designcrowd/library.brand-page 6.0.23 → 6.0.24-ast-paper-fx

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 (89) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-CiyqScwz.js → CreatedOnBrandCrowd-de-de-9IvViIgN.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-CZZ_j7Gw.js → CreatedOnBrandCrowd-en-us-DuigZenX.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-CWXjDCio.js → CreatedOnBrandCrowd-es-es-C2Ttm0Yj.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-CfkjOdy9.js → CreatedOnBrandCrowd-fr-ca-CEjaG_Ck.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-CfkjOdy9.js → CreatedOnBrandCrowd-fr-fr-CEjaG_Ck.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-EOc0tNKn.js → CreatedOnBrandCrowd-pt-br-B6ZMHpAu.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-EOc0tNKn.js → CreatedOnBrandCrowd-pt-pt-B6ZMHpAu.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-BJmeOo0W.js → CreatedOnDcom-de-de-C0859AaE.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-NQxuJRPk.js → CreatedOnDcom-en-us-BoowmtYU.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-DLY_-jUJ.js → CreatedOnDcom-es-es-Cu-JLv9d.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-CIQECmJV.js → CreatedOnDcom-fr-ca-BzSqJIu2.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-Cu6db7o5.js → CreatedOnDcom-fr-fr-Bnw7_JZE.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-DbOUnilX.js → CreatedOnDcom-pt-br-Bt9Mt5Dd.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-K1MZafvR.js → CreatedOnDcom-pt-pt-DKkJOz2M.js} +1 -1
  15. package/lib/src/brand-page/components/collapsible/Collapsible.mixin.d.ts +0 -11
  16. package/lib/src/brand-page/components/collapsible/Collapsible.mixin.js +1 -13
  17. package/lib/src/brand-page/components/contact-form/ContactForm.mixin.d.ts +0 -1
  18. package/lib/src/brand-page/components/contact-form/ContactForm.mixin.js +3 -12
  19. package/lib/src/brand-page/components/mailing-list/MailingList.mixin.js +0 -5
  20. package/lib/src/brand-page/components/payment/Payment.mixin.js +0 -5
  21. package/lib/src/brand-page/models/index.d.ts +0 -2
  22. package/lib/src/brand-page/models/index.js +0 -3
  23. package/lib/src/brand-page/models/payment.model.d.ts +0 -2
  24. package/lib/src/brand-page/utils/button.util.d.ts +0 -5
  25. package/lib/src/brand-page/utils/button.util.js +0 -13
  26. package/lib/src/brand-page/utils/migration.util.js +0 -11
  27. package/lib/src/brand-page/utils/view-model.util.js +0 -1
  28. package/lib/src/brand-page-maker/assessors/contact-form-visibility.assessor.d.ts +0 -1
  29. package/lib/src/brand-page-maker/assessors/contact-form-visibility.assessor.js +7 -16
  30. package/lib/src/brand-page-maker/constants/config-settings-constant.js +3 -40
  31. package/lib/src/brand-page-maker/default-getters/index.d.ts +0 -1
  32. package/lib/src/brand-page-maker/default-getters/index.js +0 -1
  33. package/lib/src/brand-page-maker/models/button-styles-config.js +3 -15
  34. package/lib/src/brand-page-maker/models/content-settings-configs.d.ts +1 -2
  35. package/lib/src/brand-page-maker/models/content-settings.js +3 -15
  36. package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +0 -6
  37. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +0 -2
  38. package/lib/src/css/library.brand-page-brandCrowd.min.css +68 -96
  39. package/lib/src/css/library.brand-page-brandPage.min.css +68 -96
  40. package/lib/src/css/library.brand-page-designCom.min.css +68 -96
  41. package/lib/src/css/library.brand-page-preview.min.css +68 -96
  42. package/lib/src/index.mjs +1 -1
  43. package/lib/src/{lib-BhVYr7xx.js → lib-Bh-HSkAz.js} +18424 -18776
  44. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.js +0 -5
  45. package/lib/src/shared/content-settings/models.d.ts +0 -1
  46. package/lib/src/shared/content-settings/store/content-settings-store.js +0 -3
  47. package/lib/src/shared/template-settings/store/template-settings-store.js +4 -4
  48. package/package.json +2 -2
  49. package/src/brand-page/components/button/Button.vue.test.ts +104 -0
  50. package/src/brand-page/components/button/ButtonStyleWrapper.vue +44 -112
  51. package/src/brand-page/components/collapsible/Collapsible.mixin.ts +1 -14
  52. package/src/brand-page/components/contact-form/ContactForm.mixin.test.ts +0 -18
  53. package/src/brand-page/components/contact-form/ContactForm.mixin.ts +3 -15
  54. package/src/brand-page/components/contact-form/ContactForm.vue +36 -97
  55. package/src/brand-page/components/mailing-list/MailingList.mixin.ts +0 -6
  56. package/src/brand-page/components/mailing-list/MailingList.vue +10 -18
  57. package/src/brand-page/components/payment/Payment.mixin.ts +0 -6
  58. package/src/brand-page/components/payment/Payment.vue +24 -43
  59. package/src/brand-page/components/payment/RequestPaymentStripe.vue +22 -26
  60. package/src/brand-page/components/shop/Shop.vue +7 -16
  61. package/src/brand-page/models/index.ts +0 -5
  62. package/src/brand-page/models/payment.model.ts +0 -2
  63. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +3 -6
  64. package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +0 -1
  65. package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +0 -2
  66. package/src/brand-page/utils/button.util.ts +0 -17
  67. package/src/brand-page/utils/migration.util.ts +0 -12
  68. package/src/brand-page/utils/view-model.util.ts +0 -1
  69. package/src/brand-page-maker/assessors/contact-form-visibility.assessor.ts +26 -34
  70. package/src/brand-page-maker/constants/config-settings-constant.ts +2 -43
  71. package/src/brand-page-maker/default-getters/index.ts +0 -1
  72. package/src/brand-page-maker/models/button-styles-config.ts +3 -15
  73. package/src/brand-page-maker/models/content-settings-configs.ts +1 -4
  74. package/src/brand-page-maker/models/content-settings.ts +3 -16
  75. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +0 -2
  76. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.ts +0 -6
  77. package/src/shared/content-settings/models.ts +0 -3
  78. package/src/shared/content-settings/store/content-settings-store.ts +0 -3
  79. package/src/shared/style-settings/components/StyleSettings.vue +0 -1
  80. package/src/shared/template-settings/store/template-settings-store.ts +6 -4
  81. package/lib/src/brand-page/utils/migration/migration-19.d.ts +0 -2
  82. package/lib/src/brand-page/utils/migration/migration-19.js +0 -41
  83. package/lib/src/brand-page-maker/default-getters/contact-form-card-color.default-getter.d.ts +0 -8
  84. package/lib/src/brand-page-maker/default-getters/contact-form-card-color.default-getter.js +0 -16
  85. package/src/brand-page/components/button/ButtonStyleWrapper.vue.test.ts +0 -167
  86. package/src/brand-page/components/shop/Shop.vue.test.ts +0 -155
  87. package/src/brand-page/utils/migration/migration-19.test.ts +0 -172
  88. package/src/brand-page/utils/migration/migration-19.ts +0 -65
  89. package/src/brand-page-maker/default-getters/contact-form-card-color.default-getter.ts +0 -23
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BhVYr7xx.js";
2
+ import { _ as t } from "./lib-Bh-HSkAz.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-BhVYr7xx.js";
2
+ import { _ as t } from "./lib-Bh-HSkAz.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-BhVYr7xx.js";
2
+ import { _ as t } from "./lib-Bh-HSkAz.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-BhVYr7xx.js";
2
+ import { _ as t } from "./lib-Bh-HSkAz.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-BhVYr7xx.js";
2
+ import { _ as t } from "./lib-Bh-HSkAz.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-BhVYr7xx.js";
2
+ import { _ as t } from "./lib-Bh-HSkAz.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-BhVYr7xx.js";
2
+ import { _ as t } from "./lib-Bh-HSkAz.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-BhVYr7xx.js";
2
+ import { _ as e } from "./lib-Bh-HSkAz.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-BhVYr7xx.js";
2
+ import { _ as e } from "./lib-Bh-HSkAz.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-BhVYr7xx.js";
2
+ import { _ as e } from "./lib-Bh-HSkAz.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-BhVYr7xx.js";
2
+ import { _ as e } from "./lib-Bh-HSkAz.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-BhVYr7xx.js";
2
+ import { _ as e } from "./lib-Bh-HSkAz.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-BhVYr7xx.js";
2
+ import { _ as M } from "./lib-Bh-HSkAz.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-BhVYr7xx.js";
2
+ import { _ as M } from "./lib-Bh-HSkAz.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -25,11 +25,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
25
25
  required: false;
26
26
  default: undefined;
27
27
  };
28
- backgroundStyle: {
29
- type: PropType<BrandPageCssStyle>;
30
- required: false;
31
- default: undefined;
32
- };
33
28
  context: {
34
29
  type: PropType<BrandPageContext>;
35
30
  required: true;
@@ -66,11 +61,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
66
61
  required: false;
67
62
  default: undefined;
68
63
  };
69
- backgroundStyle: {
70
- type: PropType<BrandPageCssStyle>;
71
- required: false;
72
- default: undefined;
73
- };
74
64
  context: {
75
65
  type: PropType<BrandPageContext>;
76
66
  required: true;
@@ -78,7 +68,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
78
68
  }>> & Readonly<{}>, {
79
69
  titleStyle: BrandPageCssStyle;
80
70
  cardStyle: BrandPageCssStyle;
81
- backgroundStyle: BrandPageCssStyle;
82
71
  buttonStyles: BrandPageCssStyle;
83
72
  canCollapse: boolean;
84
73
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -25,11 +25,6 @@ export default defineComponent({
25
25
  required: false,
26
26
  default: undefined,
27
27
  },
28
- backgroundStyle: {
29
- type: Object,
30
- required: false,
31
- default: undefined,
32
- },
33
28
  context: {
34
29
  type: Object,
35
30
  required: true,
@@ -45,16 +40,9 @@ export default defineComponent({
45
40
  if (borderRadius === '9999px') {
46
41
  containerStyle.borderRadius = '26px';
47
42
  }
48
- // Guarded on backgroundColor so an empty {} never blanks the container
49
- // (BP/BC contact-form card colour defaults to the button fill).
50
- if (this.cardStyle?.backgroundColor) {
43
+ if (this.cardStyle) {
51
44
  containerStyle.backgroundColor = this.cardStyle.backgroundColor;
52
45
  }
53
- // Own background colour decouples the container from the button fill (BP-5800).
54
- // Guarded on backgroundColor so an empty {} never blanks the container.
55
- if (this.backgroundStyle?.backgroundColor) {
56
- containerStyle.backgroundColor = this.backgroundStyle.backgroundColor;
57
- }
58
46
  return containerStyle;
59
47
  },
60
48
  arrowStyle() {
@@ -43,7 +43,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
43
43
  isSubmitting: boolean;
44
44
  submitError: string | undefined;
45
45
  }, {
46
- isDecorativeSubmitStyle(): boolean;
47
46
  submitButtonStyle(): BrandPageCssStyle;
48
47
  submitButtonTextStyle(): BrandPageCssStyle;
49
48
  contentPaddingStyle(): {
@@ -1,7 +1,6 @@
1
1
  import { defineComponent } from 'vue';
2
2
  import { FORM_FIELD_TYPES } from '@brand-page/models';
3
3
  import { getEmailValidationError, getMessageValidationError, getNameValidationError, getPhoneValidationError, } from '@brand-page/utils';
4
- import { isDecorativeButtonStyle } from '../../utils/button.util';
5
4
  import brandPageClient from '../../clients/brand-page.client';
6
5
  import { isEmail } from '../../../utils/validator.util';
7
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';
@@ -45,12 +44,6 @@ export default defineComponent({
45
44
  submitError: undefined,
46
45
  }),
47
46
  computed: {
48
- // Decorative styles (brushstroke/arrow/paper) render a shape that needs width
49
- // to read — at pure w-fit the arrow chevron collapses. Give the submit button a
50
- // ~200px min-width so the decoration looks intentional without going full-width.
51
- isDecorativeSubmitStyle() {
52
- return isDecorativeButtonStyle(this.viewModel.buttonStyles?.selectedButtonStyleId);
53
- },
54
47
  submitButtonStyle() {
55
48
  const buttonStyle = { ...this.viewModel.buttonStyles?.style };
56
49
  const buttonTextStyle = {
@@ -158,8 +151,8 @@ export default defineComponent({
158
151
  // differs by website type:
159
152
  // - brandSite: the card style (card + divided layouts) or the section
160
153
  // background (other layouts).
161
- // - brand.page / brand.contact: the container is the collapsible, whose
162
- // colour is the card colour (defaulting to the global button fill).
154
+ // - brand.page / brand.contact: there's no section background, so the
155
+ // coloured surface is the global button fill.
163
156
  // Falls back to the title colour when there's no solid colour to anchor to.
164
157
  const style = this.context.isBrandSite
165
158
  ? this.hasCard || this.isDividedContent
@@ -167,9 +160,7 @@ export default defineComponent({
167
160
  : this.hasBgColor
168
161
  ? this.viewModel.backgroundStyle
169
162
  : undefined
170
- : this.viewModel.cardStyle?.backgroundColor
171
- ? this.viewModel.cardStyle
172
- : this.viewModel.buttonStyles?.style;
163
+ : this.viewModel.buttonStyles?.style;
173
164
  return (mutedTextForBackground(backgroundColorFromStyle(style)) ??
174
165
  this.viewModel.titleStyle?.color);
175
166
  },
@@ -94,11 +94,6 @@ export default defineComponent({
94
94
  if (borderRadius === '9999px') {
95
95
  buttonStyle.borderRadius = '24px';
96
96
  }
97
- // Own background colour decouples the container from the button fill (BP-5800).
98
- if (this.viewModel.backgroundStyle?.backgroundColor) {
99
- buttonStyle.backgroundColor =
100
- this.viewModel.backgroundStyle.backgroundColor;
101
- }
102
97
  return buttonStyle;
103
98
  },
104
99
  isFormDisabled() {
@@ -77,11 +77,6 @@ export default defineComponent({
77
77
  if (borderRadius === '9999px') {
78
78
  buttonStyle.borderRadius = '26px';
79
79
  }
80
- // Own background colour decouples the container from the button fill (BP-5800).
81
- if (this.viewModel.backgroundStyle?.backgroundColor) {
82
- buttonStyle.backgroundColor =
83
- this.viewModel.backgroundStyle.backgroundColor;
84
- }
85
80
  return buttonStyle;
86
81
  },
87
82
  continueButtonStyle() {
@@ -195,7 +195,6 @@ export interface MailingListContent extends Content {
195
195
  buttonText: string;
196
196
  titleStyle: TextStyleDeclaration;
197
197
  buttonTextStyle: TextStyleDeclaration;
198
- backgroundStyle?: BrandPageCssStyle;
199
198
  }
200
199
  export declare const FORM_FIELD_TYPES: {
201
200
  readonly text: "text";
@@ -561,7 +560,6 @@ export interface SaveContactOptions {
561
560
  }
562
561
  export declare class BrandPageModel {
563
562
  v: number;
564
- userPromptContentKey?: string;
565
563
  styles: PageStyles;
566
564
  /** @deprecated */
567
565
  headerStyles?: AbstractPageHeaderStyles;
@@ -404,9 +404,6 @@ export class PageFooterMobile extends AbstractPageFooterStyles {
404
404
  export class BrandPageModel {
405
405
  // Model version
406
406
  v;
407
- // AI personalisation key persisted with the draft so previews survive login/checkout-back/
408
- // refresh - content is retrieved by this token (user-agnostic), not regenerated (bp-5742).
409
- userPromptContentKey;
410
407
  styles;
411
408
  /** @deprecated */
412
409
  headerStyles;
@@ -134,7 +134,6 @@ export interface RequestPaymentContent extends Content {
134
134
  descriptionStyle?: TextStyleDeclaration;
135
135
  itemTextStyle: TextStyleDeclaration;
136
136
  buttonTextStyle?: TextStyleDeclaration;
137
- backgroundStyle?: BrandPageCssStyle;
138
137
  }
139
138
  export interface ShopContentConfig extends PaymentConfig {
140
139
  paymentOptionDisplayType: PaymentOptionDisplayType;
@@ -175,7 +174,6 @@ export interface SupportMeContent extends Content {
175
174
  descriptionStyle: TextStyleDeclaration;
176
175
  buttonTextStyle: TextStyleDeclaration;
177
176
  itemTextStyle: TextStyleDeclaration;
178
- backgroundStyle?: BrandPageCssStyle;
179
177
  }
180
178
  export interface CreateStripePaymentIntentResponse {
181
179
  paymentIntent: StripePaymentIntent;
@@ -5,8 +5,3 @@ import type { ButtonStyles } from '../models';
5
5
  * @returns The calculated box shadow CSS value
6
6
  */
7
7
  export declare const getBoxShadowValue: (buttonStyles: ButtonStyles) => string;
8
- export declare const BUTTON_STYLE_BRUSHSTROKE = "BUTTON_STYLE_19";
9
- export declare const BUTTON_STYLE_ARROW = "BUTTON_STYLE_20";
10
- export declare const BUTTON_STYLE_PAPER = "BUTTON_STYLE_21";
11
- export declare const DECORATIVE_BUTTON_STYLE_IDS: string[];
12
- export declare const isDecorativeButtonStyle: (styleId?: string) => boolean;
@@ -27,16 +27,3 @@ export const getBoxShadowValue = (buttonStyles) => {
27
27
  }
28
28
  return boxShadowValue;
29
29
  };
30
- // The "decorative" button styles — brushstroke / arrow / torn-paper — whose visual
31
- // is drawn by ButtonStyleWrapper rather than plain CSS. Their banner-like SVG
32
- // decoration needs the button to be reasonably wide to render legibly, so narrow
33
- // (w-fit) hosts should widen when one of these is active (BP-5800).
34
- export const BUTTON_STYLE_BRUSHSTROKE = 'BUTTON_STYLE_19';
35
- export const BUTTON_STYLE_ARROW = 'BUTTON_STYLE_20';
36
- export const BUTTON_STYLE_PAPER = 'BUTTON_STYLE_21';
37
- export const DECORATIVE_BUTTON_STYLE_IDS = [
38
- BUTTON_STYLE_BRUSHSTROKE,
39
- BUTTON_STYLE_ARROW,
40
- BUTTON_STYLE_PAPER,
41
- ];
42
- export const isDecorativeButtonStyle = (styleId) => !!styleId && DECORATIVE_BUTTON_STYLE_IDS.includes(styleId);
@@ -21,7 +21,6 @@ import { migration15 } from './migration/migration-15';
21
21
  import { migration16 } from './migration/migration-16';
22
22
  import { migration17 } from './migration/migration-17';
23
23
  import { migration18 } from './migration/migration-18';
24
- import { migration19 } from './migration/migration-19';
25
24
  const MIGRATION_TABLE = [
26
25
  {
27
26
  version: 1,
@@ -139,16 +138,6 @@ const MIGRATION_TABLE = [
139
138
  migrateFn: migration18,
140
139
  description: 'BP-5603: backfill stable item ids on all nested items (gallery/section/testimonial/text items, section + footer social links) — the item id is now non-nullable',
141
140
  },
142
- {
143
- version: 19,
144
- migrateFn: migration19,
145
- // runAlways: re-apply on every load so already-published sites pick up the seed
146
- // without a version bump. Idempotent — only seeds a colour when unset, so a user
147
- // colour is never clobbered. Single pass over the model seeds both container types
148
- // and the contact form.
149
- runAlways: true,
150
- description: 'BP-5800: seed the button fill colour as each block’s own container colour so it is independent of the site button (existing sites render unchanged) — backgroundStyle for mailing-list, request-payment and support-me (all types); cardStyle for the BP/BC contact form (skipped on brand-site)',
151
- },
152
141
  ];
153
142
  export const GetLatestModelVersion = () => Math.max(...MIGRATION_TABLE.map((x) => x.version));
154
143
  export const migrateBrandPageModel = async (brandPageModel, options) => {
@@ -526,7 +526,6 @@ const mapToShapesSectionViewModel = (content, styles, brandPageType) => {
526
526
  };
527
527
  const mapToShopViewModel = (content, styles) => {
528
528
  const buttonStyles = new ButtonStyles({
529
- selectedButtonStyleId: styles.buttonStyles.selectedButtonStyleId,
530
529
  style: {
531
530
  ...styles.buttonStyles.style,
532
531
  },
@@ -1,7 +1,6 @@
1
1
  import { type ContactFormContent } from '@brand-page';
2
2
  import type { VisibilityAssessor } from '../models';
3
3
  export declare const contactCardDisplayTypeVisibilityAssessor: VisibilityAssessor<ContactFormContent | undefined>;
4
- export declare const contactCardColorVisibilityAssessor: VisibilityAssessor<ContactFormContent | undefined>;
5
4
  export declare const displayTypeVisibilityAssessor: VisibilityAssessor<ContactFormContent | undefined>;
6
5
  export declare const imageUrlVisibilityAssessor: VisibilityAssessor<ContactFormContent | undefined>;
7
6
  export declare const contactBackgroundDisplayTypeVisibilityAssessor: VisibilityAssessor<ContactFormContent | undefined>;
@@ -1,35 +1,26 @@
1
1
  import {} from '@brand-page';
2
2
  import { ALIGN_CARD_CENTER, ALIGN_CARD_CENTER_IMAGE, ALIGN_CENTERED, ALIGN_LEFT_FULL_IMAGE, ALIGN_RIGHT_FULL_IMAGE, TEXT_ONLY, } from '@brand-page/constants';
3
3
  export const contactCardDisplayTypeVisibilityAssessor = (content, context) => {
4
- return Boolean(content?.layoutStyle &&
4
+ return (Boolean(content?.layoutStyle &&
5
5
  [
6
6
  ALIGN_CARD_CENTER_IMAGE,
7
7
  ALIGN_CARD_CENTER,
8
8
  ALIGN_LEFT_FULL_IMAGE,
9
9
  ALIGN_RIGHT_FULL_IMAGE,
10
- ].includes(content?.layoutStyle) &&
11
- context?.isBrandSite);
12
- };
13
- // Card colour picker: on brand-page/brand-contact it's the collapsible container
14
- // colour (shown for every layout); on brand-site it's the card in card layouts.
15
- export const contactCardColorVisibilityAssessor = (content, context) => {
16
- return (!context?.isBrandSite ||
17
- contactCardDisplayTypeVisibilityAssessor(content, context));
10
+ ].includes(content?.layoutStyle)) && context.isBrandSite);
18
11
  };
19
12
  export const displayTypeVisibilityAssessor = (content, context) => {
20
- return Boolean(content?.layoutStyle === '' || context?.isBrandPage);
13
+ return Boolean(content?.layoutStyle === '' || context.isBrandPage);
21
14
  };
22
15
  export const imageUrlVisibilityAssessor = (content, context) => {
23
- return Boolean(content?.layoutStyle &&
16
+ return (Boolean(content?.layoutStyle &&
24
17
  [
25
18
  ALIGN_CARD_CENTER_IMAGE,
26
19
  ALIGN_LEFT_FULL_IMAGE,
27
20
  ALIGN_RIGHT_FULL_IMAGE,
28
- ].includes(content?.layoutStyle) &&
29
- context?.isBrandSite);
21
+ ].includes(content?.layoutStyle)) && context.isBrandSite);
30
22
  };
31
23
  export const contactBackgroundDisplayTypeVisibilityAssessor = (content, context) => {
32
- return Boolean(content?.layoutStyle &&
33
- [ALIGN_CARD_CENTER, ALIGN_CENTERED, TEXT_ONLY].includes(content?.layoutStyle) &&
34
- context?.isBrandSite);
24
+ return (Boolean(content?.layoutStyle &&
25
+ [ALIGN_CARD_CENTER, ALIGN_CENTERED, TEXT_ONLY].includes(content?.layoutStyle)) && context.isBrandSite);
35
26
  };
@@ -3,8 +3,8 @@ import { createInitialButtonContent, createInitialImageContent, createInitialPro
3
3
  import * as uuid from 'uuid';
4
4
  import { colorConvertor, backgroundColorConvertor, borderColorConvertor, displayStyleConvertor, galleryTypeConvertor, imageAspectRatioConvertor, textAlignmentOptionsConvertor, videoContentStateConvertor, fillColorConvertor, bannerAlignDisplayStyleConvertor, aboutDisplayStyleConvertor, dividerStyleConvertor, shapeSizeOptionsConvertor, buttonLinkStyleConvertor, textSizeValueConvertor, textColumnStyleConvertor, contactLayoutStyleConvertor, paymentLinkDisplayStyleConvertor, shopDisplayConvertor, shopAspectRatioConvertor, } from '../convertors';
5
5
  import { ALIGN_CENTERED, DISPLAY_STYLE_COLLAPSED, DISPLAY_STYLE_PREVIEW, } from '@brand-page';
6
- import { imageFieldVisibilityAssessor, imageOptionVisibilityAssessor, imageGalleryFieldVisibilityAssessor, cardFillVisibilityAssessor, mediaSectionItemsFieldTypeAssessor, dividerToggleFieldVisibilityAssessor, shapeSectionItemsFieldTypeAssessor, colorReplacementVisibilityTypeAssessor, colorReplacementProfileVisibilityTypeAssessor, colorReplacementIconVisibilityTypeAssessor, imagesSectionCardStyleVisibilityAssessor, contactCardColorVisibilityAssessor, imageUrlVisibilityAssessor, displayTypeVisibilityAssessor, logoFieldVisibilityAssessor, shapesSectionCardStyleVisibilityAssessor, shopImageOptionVisibilityAssessor, shopItemColorVisibility, personalisationOverrideVisibility, } from '../assessors';
7
- import { contactFormCardColorDefaultGetter, logoBackgroundColorDefaultGetter, paymentFillColorFieldDefaultGetter, paymentTextAndBorderColorFieldDefaultGetter, shopBorderColorFieldDefaultGetter, shopFillColorFieldDefaultGetter, textColorFieldDefaultGetter, } from '../default-getters';
6
+ import { imageFieldVisibilityAssessor, imageOptionVisibilityAssessor, imageGalleryFieldVisibilityAssessor, cardFillVisibilityAssessor, mediaSectionItemsFieldTypeAssessor, dividerToggleFieldVisibilityAssessor, shapeSectionItemsFieldTypeAssessor, colorReplacementVisibilityTypeAssessor, colorReplacementProfileVisibilityTypeAssessor, colorReplacementIconVisibilityTypeAssessor, imagesSectionCardStyleVisibilityAssessor, contactCardDisplayTypeVisibilityAssessor, imageUrlVisibilityAssessor, displayTypeVisibilityAssessor, logoFieldVisibilityAssessor, shapesSectionCardStyleVisibilityAssessor, shopImageOptionVisibilityAssessor, shopItemColorVisibility, personalisationOverrideVisibility, } from '../assessors';
7
+ import { logoBackgroundColorDefaultGetter, paymentFillColorFieldDefaultGetter, paymentTextAndBorderColorFieldDefaultGetter, shopBorderColorFieldDefaultGetter, shopFillColorFieldDefaultGetter, textColorFieldDefaultGetter, } from '../default-getters';
8
8
  import { socialLinksIconDisplayStyleConvertor } from '../convertors/social-links-icon-display-style.convertor';
9
9
  import { getTextMediaOptionsConverterByMediaType } from '../convertors/text-image-display-style.convertor';
10
10
  import { testimonialDisplayStyleConvertor } from '../convertors/testimonial-display-style-convertor';
@@ -455,7 +455,6 @@ const testimonialReplaceImageSettings = () => ({
455
455
  desiredWidth: undefined,
456
456
  mediaType: MEDIA_TYPES.image,
457
457
  });
458
- const disableTransparentOffBrandSite = (brandPageType) => brandPageType !== BRAND_PAGE_TYPES.brandSite;
459
458
  export const LOGO_SETTINGS_CONFIG = () => ({
460
459
  createInitialContent: createInitialLogoContent,
461
460
  type: 'logo',
@@ -1464,17 +1463,6 @@ export const MAILING_LIST_CONTENT_SETTINGS_CONFIG = () => ({
1464
1463
  titleStyle: DEFAULT_TITLE_STYLE_SETTINGS_FILED_WITH_TITLE(),
1465
1464
  buttonTextStyle: DEFAULT_BUTTON_TEXT_STYLE_FIELD(),
1466
1465
  ...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
1467
- backgroundStyle: {
1468
- type: 'color',
1469
- groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.style,
1470
- defaultValue: {},
1471
- isInline: true,
1472
- showToggle: false,
1473
- title: contentSettingsTr(`backgroundColorTitle`),
1474
- disableTransparent: true,
1475
- valueConvertor: backgroundColorConvertor,
1476
- defaultGetter: paymentFillColorFieldDefaultGetter,
1477
- },
1478
1466
  },
1479
1467
  isEnabled: true,
1480
1468
  isLocked: false,
@@ -1646,17 +1634,6 @@ export const REQUEST_PAYMENT_CONTENT_SETTINGS_CONFIG = () => ({
1646
1634
  label: contentSettingsTr(`buttonTextStyleLabel`),
1647
1635
  },
1648
1636
  ...PADDING_CONTROL_FIELDS(REQUEST_PAYMENT_GROUPS.style),
1649
- backgroundStyle: {
1650
- type: 'color',
1651
- groupId: REQUEST_PAYMENT_GROUPS.style,
1652
- defaultValue: {},
1653
- isInline: true,
1654
- showToggle: false,
1655
- title: contentSettingsTr(`backgroundColorTitle`),
1656
- disableTransparent: true,
1657
- valueConvertor: backgroundColorConvertor,
1658
- defaultGetter: paymentFillColorFieldDefaultGetter,
1659
- },
1660
1637
  },
1661
1638
  isEnabled: (features) => features.canAddRequestPaymentContents,
1662
1639
  isLocked: false,
@@ -1722,17 +1699,6 @@ export const SUPPORT_ME_CONTENT_SETTINGS_CONFIG = () => ({
1722
1699
  },
1723
1700
  buttonTextStyle: DEFAULT_BUTTON_TEXT_STYLE_FIELD(),
1724
1701
  ...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
1725
- backgroundStyle: {
1726
- type: 'color',
1727
- groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.style,
1728
- defaultValue: {},
1729
- isInline: true,
1730
- showToggle: false,
1731
- title: contentSettingsTr(`backgroundColorTitle`),
1732
- disableTransparent: true,
1733
- valueConvertor: backgroundColorConvertor,
1734
- defaultGetter: paymentFillColorFieldDefaultGetter,
1735
- },
1736
1702
  },
1737
1703
  isEnabled: (features) => features.canAddRequestPaymentContents,
1738
1704
  isLocked: false,
@@ -1871,8 +1837,7 @@ export const CONTACT_FORM_SETTINGS_CONFIG = () => ({
1871
1837
  disableTransparent: true,
1872
1838
  title: contentSettingsTr(`cardColorTitle`),
1873
1839
  valueConvertor: backgroundColorConvertor,
1874
- visibilityAssessor: contactCardColorVisibilityAssessor,
1875
- defaultGetter: contactFormCardColorDefaultGetter,
1840
+ visibilityAssessor: contactCardDisplayTypeVisibilityAssessor,
1876
1841
  },
1877
1842
  backgroundStyle: {
1878
1843
  type: 'color',
@@ -1881,9 +1846,7 @@ export const CONTACT_FORM_SETTINGS_CONFIG = () => ({
1881
1846
  isInline: true,
1882
1847
  showToggle: false,
1883
1848
  title: contentSettingsTr(`backgroundColorTitle`),
1884
- disableTransparent: disableTransparentOffBrandSite,
1885
1849
  valueConvertor: backgroundColorConvertor,
1886
- visibilityAssessor: brandSiteTypeVisibilityAssessor,
1887
1850
  },
1888
1851
  },
1889
1852
  isEnabled: true,
@@ -2,4 +2,3 @@ export * from './text-color.default-getter';
2
2
  export * from './payment-fill-color.default-getter';
3
3
  export * from './payment-text-and-border-color.default-getter';
4
4
  export * from './logo-background-fill.default-getter';
5
- export * from './contact-form-card-color.default-getter';
@@ -2,4 +2,3 @@ export * from './text-color.default-getter';
2
2
  export * from './payment-fill-color.default-getter';
3
3
  export * from './payment-text-and-border-color.default-getter';
4
4
  export * from './logo-background-fill.default-getter';
5
- export * from './contact-form-card-color.default-getter';
@@ -352,11 +352,7 @@ export const availableButtonStyleConfigs = [
352
352
  iconName: 'button-brushstroke',
353
353
  iconViewBox: '0 0 60 20',
354
354
  options: ['buttonFillColor', 'buttonIconColor'],
355
- brandPageType: [
356
- BRAND_PAGE_TYPES.default,
357
- BRAND_PAGE_TYPES.brandContact,
358
- BRAND_PAGE_TYPES.brandSite,
359
- ],
355
+ brandPageType: [BRAND_PAGE_TYPES.default, BRAND_PAGE_TYPES.brandContact],
360
356
  },
361
357
  {
362
358
  id: 'BUTTON_STYLE_20',
@@ -373,11 +369,7 @@ export const availableButtonStyleConfigs = [
373
369
  iconName: 'button-arrow',
374
370
  iconViewBox: '0 0 60 20',
375
371
  options: ['buttonFillColor', 'buttonIconColor'],
376
- brandPageType: [
377
- BRAND_PAGE_TYPES.default,
378
- BRAND_PAGE_TYPES.brandContact,
379
- BRAND_PAGE_TYPES.brandSite,
380
- ],
372
+ brandPageType: [BRAND_PAGE_TYPES.default, BRAND_PAGE_TYPES.brandContact],
381
373
  },
382
374
  {
383
375
  id: 'BUTTON_STYLE_21',
@@ -394,10 +386,6 @@ export const availableButtonStyleConfigs = [
394
386
  iconName: 'button-paper',
395
387
  iconViewBox: '0 0 60 20',
396
388
  options: ['buttonFillColor', 'buttonIconColor'],
397
- brandPageType: [
398
- BRAND_PAGE_TYPES.default,
399
- BRAND_PAGE_TYPES.brandContact,
400
- BRAND_PAGE_TYPES.brandSite,
401
- ],
389
+ brandPageType: [BRAND_PAGE_TYPES.default, BRAND_PAGE_TYPES.brandContact],
402
390
  },
403
391
  ];
@@ -90,7 +90,7 @@ export interface ContentSettingsField<TContent> {
90
90
  variant?: VariantDisplayModes | ((brandPageType: BrandPageType) => VariantDisplayModes);
91
91
  replaceImageSettings?: ContentReplaceImageSettings<TContent>;
92
92
  showToggle?: boolean;
93
- disableTransparent?: boolean | ((brandPageType: BrandPageType) => boolean);
93
+ disableTransparent?: boolean;
94
94
  valueConvertor?: ValueConvertor<any, any>;
95
95
  canReplace?: boolean;
96
96
  placeholderAssessor?: PlaceholderTypeAssessor<TContent>;
@@ -121,7 +121,6 @@ export interface MultiFieldOption {
121
121
  export interface CreateInitialContentOptions {
122
122
  userState: UserState;
123
123
  brandPageType: BrandPageType;
124
- buttonFillColor?: string;
125
124
  }
126
125
  export type CreateInitialContentFunction<TContent> = (options?: CreateInitialContentOptions) => TContent;
127
126
  export declare const CONTENT_SETTINGS_DISPLAY_MODES: {
@@ -232,9 +232,6 @@ export const createInitialMailingListContent = (options) => {
232
232
  textStyleType: TEXT_STYLE_TYPES.buttons,
233
233
  textAlign: 'center',
234
234
  },
235
- // Detach the container background from the button fill by copying the current
236
- // fill as this block's own colour at creation (BP-5800; matches migration-19).
237
- backgroundStyle: { backgroundColor: options?.buttonFillColor },
238
235
  };
239
236
  };
240
237
  export const createInitialRequestPaymentContent = (options) => {
@@ -277,9 +274,6 @@ export const createInitialRequestPaymentContent = (options) => {
277
274
  textStyleType: TEXT_STYLE_TYPES.buttons,
278
275
  textAlign: 'center',
279
276
  },
280
- // Detach the container background from the button fill by copying the current
281
- // fill as this block's own colour at creation (BP-5800; matches migration-19).
282
- backgroundStyle: { backgroundColor: options?.buttonFillColor },
283
277
  };
284
278
  };
285
279
  export const createInitialShopContent = (options) => {
@@ -371,9 +365,6 @@ export const createInitialSupportMeContent = (options) => {
371
365
  textStyleType: TEXT_STYLE_TYPES.buttons,
372
366
  textAlign: 'center',
373
367
  },
374
- // Detach the container background from the button fill by copying the current
375
- // fill as this block's own colour at creation (BP-5800; matches migration-19).
376
- backgroundStyle: { backgroundColor: options?.buttonFillColor },
377
368
  };
378
369
  };
379
370
  export const createInitialContactFormContent = (options) => {
@@ -456,12 +447,9 @@ export const createInitialContactFormContent = (options) => {
456
447
  successMessage: contentSettingsTr(`formSuccessMessage`),
457
448
  responseEmail: options?.userState.emailAddress || '',
458
449
  type: 'contact-form',
459
- // brand-site: card layouts default to the logo bg. brand-page/brand-contact:
460
- // copy the current button fill as the container's own colour so it renders
461
- // like the button fill but is detached from it (BP-5800; matches migration-19).
462
- cardStyle: options?.brandPageType === BRAND_PAGE_TYPES.brandSite
463
- ? { backgroundColor: DEFAULT_LOGO_BACKGROUND_COLOR_RGB }
464
- : { backgroundColor: options?.buttonFillColor },
450
+ cardStyle: {
451
+ backgroundColor: DEFAULT_LOGO_BACKGROUND_COLOR_RGB,
452
+ },
465
453
  backgroundStyle: {},
466
454
  titleStyle: {
467
455
  applyAutoScale: options?.brandPageType === BRAND_PAGE_TYPES.brandSite,