@designcrowd/library.brand-page 5.12.14-upsell-6 → 5.12.15

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 (134) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-4gdNQRfZ.js → CreatedOnBrandCrowd-de-de-CZd7RKCS.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-kl2UTn1f.js → CreatedOnBrandCrowd-en-us-DgUw_Gmk.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-DUuyFU8S.js → CreatedOnBrandCrowd-es-es-qmEj0qtS.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-CiNUgSZL.js → CreatedOnBrandCrowd-fr-fr-WSAFNEbH.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-pt-pt-DtUdufqG.js → CreatedOnBrandCrowd-pt-pt-QQsa4zfN.js} +1 -1
  6. package/lib/src/{CreatedOnDcom-de-de-BXJ-VNwJ.js → CreatedOnDcom-de-de-Dgmk8ib6.js} +1 -1
  7. package/lib/src/{CreatedOnDcom-en-us-B9rtV_a9.js → CreatedOnDcom-en-us-u6DK8Fzd.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-es-es-DXz-RaQI.js → CreatedOnDcom-es-es-CyOJpVzh.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-fr-fr-CAo4Td4h.js → CreatedOnDcom-fr-fr-CWzC5FlL.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-pt-pt-Ba42OWgc.js → CreatedOnDcom-pt-pt-DVigHaTn.js} +1 -1
  11. package/lib/src/brand-page/components/icon/Icon.mixin.d.ts +1 -1
  12. package/lib/src/brand-page/components/icon/Icon.mixin.js +2 -2
  13. package/lib/src/brand-page/models/brand-page-context.model.d.ts +0 -2
  14. package/lib/src/brand-page/models/brand-page-context.model.js +1 -2
  15. package/lib/src/brand-page/models/content.model.d.ts +1 -1
  16. package/lib/src/brand-page/models/content.model.js +1 -1
  17. package/lib/src/brand-page/models/index.d.ts +7 -13
  18. package/lib/src/brand-page/models/index.js +2 -2
  19. package/lib/src/brand-page/utils/button.util.d.ts +7 -0
  20. package/lib/src/brand-page/utils/button.util.js +29 -0
  21. package/lib/src/brand-page/utils/content-callback-util.js +1 -1
  22. package/lib/src/brand-page/utils/model.util.js +1 -1
  23. package/lib/src/brand-page/utils/style.util.js +7 -1
  24. package/lib/src/brand-page/utils/view-model.util.js +18 -21
  25. package/lib/src/brand-page-maker/components/admin-logo-settings/AdminLogoSettings.mixin.d.ts +2 -2
  26. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +20 -23
  27. package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.js +2 -0
  28. package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/content-settings-items.fixture.d.ts +2 -2
  29. package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/content-settings-items.fixture.js +4 -4
  30. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +22 -29
  31. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.js +2 -0
  32. package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.d.ts +2 -5
  33. package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +3 -6
  34. package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +2 -5
  35. package/lib/src/brand-page-maker/components/seo-settings/UseExistingDomainModal.mixin.d.ts +2 -5
  36. package/lib/src/brand-page-maker/components/upgrade-to-premium-button/UpgradeToPremiumButton.mixin.d.ts +2 -5
  37. package/lib/src/brand-page-maker/composables/useEventTracker.d.ts +1 -7
  38. package/lib/src/brand-page-maker/composables/useEventTracker.js +4 -29
  39. package/lib/src/brand-page-maker/constants/config-settings-constant.d.ts +4 -2
  40. package/lib/src/brand-page-maker/constants/config-settings-constant.js +24 -5
  41. package/lib/src/brand-page-maker/constants/personalisation.constant.js +1 -1
  42. package/lib/src/brand-page-maker/models/content-settings.js +20 -2
  43. package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +2 -6
  44. package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.js +6 -43
  45. package/lib/src/brand-page-maker/utils/rich-text-editor.util.js +80 -0
  46. package/lib/src/bundled-translations-CD8h4dNr.js +27 -0
  47. package/lib/src/{bundled-translations-5b693qBQ.js → bundled-translations-DEYhoqLM.js} +10 -10
  48. package/lib/src/{bundled-translations.de-DE-Baq37kiT.js → bundled-translations.de-DE-B3NNo7JX.js} +22 -22
  49. package/lib/src/bundled-translations.de-DE-djs407Ih.js +27 -0
  50. package/lib/src/bundled-translations.es-ES-JjQoQaM7.js +27 -0
  51. package/lib/src/{bundled-translations.es-ES-BZB7Rc2f.js → bundled-translations.es-ES-_4IspVbp.js} +7 -7
  52. package/lib/src/{bundled-translations.fr-FR-QQJaBYEl.js → bundled-translations.fr-FR-9CdErV_a.js} +5 -5
  53. package/lib/src/bundled-translations.fr-FR-rUuRWfsM.js +27 -0
  54. package/lib/src/{bundled-translations.pt-PT-DXFlBwc9.js → bundled-translations.pt-PT-BSmtPIMr.js} +12 -12
  55. package/lib/src/bundled-translations.pt-PT-BiSQEFmA.js +27 -0
  56. package/lib/src/bundles/bundled-translations.de-DE.json +9 -8
  57. package/lib/src/bundles/bundled-translations.es-ES.json +10 -9
  58. package/lib/src/bundles/bundled-translations.fr-FR.json +3 -2
  59. package/lib/src/bundles/bundled-translations.json +2 -1
  60. package/lib/src/bundles/bundled-translations.pt-PT.json +14 -13
  61. package/lib/src/clients/brand-page-client.d.ts +3 -20
  62. package/lib/src/css/library.brand-page-brandCrowd.min.css +26 -29
  63. package/lib/src/css/library.brand-page-brandPage.min.css +26 -29
  64. package/lib/src/css/library.brand-page-designCom.min.css +26 -29
  65. package/lib/src/css/library.brand-page-preview.min.css +26 -29
  66. package/lib/src/index.mjs +74 -73
  67. package/lib/src/{lib-pU0Bg4q2.js → lib--oa9Rosp.js} +8436 -8421
  68. package/lib/src/plugins/bundle-translations-plugin/bundle-translations-plugin.js +2 -4
  69. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +20 -24
  70. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.js +2 -0
  71. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +21 -21
  72. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +20 -24
  73. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +18 -18
  74. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.js +7 -1
  75. package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +18 -18
  76. package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +2 -5
  77. package/lib/src/shared/content-settings/store/content-settings-store.d.ts +18 -18
  78. package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +2 -5
  79. package/lib/src/shared/page-settings/components/delete-page-modal/DeletePageModal.mixin.d.ts +1 -1
  80. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +24 -31
  81. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +22 -25
  82. package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +8 -18
  83. package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.js +1 -14
  84. package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +2 -5
  85. package/lib/src/shared/side-bar/components/SideBarTabButton.mixin.d.ts +0 -4
  86. package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +2 -9
  87. package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.d.ts +0 -4
  88. package/package.json +2 -2
  89. package/src/brand-page/components/icon/Icon.mixin.ts +2 -2
  90. package/src/brand-page/components/icon/Icon.vue +1 -1
  91. package/src/brand-page/components/text-media-section/TextMediaSection.vue +14 -0
  92. package/src/brand-page/models/brand-page-context.model.ts +1 -7
  93. package/src/brand-page/models/content.model.ts +1 -1
  94. package/src/brand-page/models/index.ts +9 -15
  95. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +12 -12
  96. package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +4 -4
  97. package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +8 -8
  98. package/src/brand-page/utils/button.util.ts +39 -0
  99. package/src/brand-page/utils/content-callback-util.ts +1 -1
  100. package/src/brand-page/utils/model.util.ts +1 -1
  101. package/src/brand-page/utils/style.util.ts +7 -1
  102. package/src/brand-page/utils/view-model.util.ts +21 -30
  103. package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.ts +2 -0
  104. package/src/brand-page-maker/components/brand-page-maker/__fixtures__/content-settings-items.fixture.ts +6 -6
  105. package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.ts +2 -0
  106. package/src/brand-page-maker/composables/useEventTracker.ts +4 -37
  107. package/src/brand-page-maker/constants/config-settings-constant.ts +38 -7
  108. package/src/brand-page-maker/constants/personalisation.constant.ts +1 -1
  109. package/src/brand-page-maker/models/content-settings.ts +20 -2
  110. package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.ts +6 -80
  111. package/src/brand-page-maker/stores/brandpage-maker/__snapshots__/brandpage-maker-store.test.ts.snap +1 -1
  112. package/src/brand-page-maker/utils/rich-text-editor.util.ts +156 -0
  113. package/src/bundles/bundled-translations.de-DE.json +9 -8
  114. package/src/bundles/bundled-translations.es-ES.json +10 -9
  115. package/src/bundles/bundled-translations.fr-FR.json +3 -2
  116. package/src/bundles/bundled-translations.json +2 -1
  117. package/src/bundles/bundled-translations.pt-PT.json +14 -13
  118. package/src/clients/brand-page-client.ts +3 -22
  119. package/src/plugins/bundle-translations-plugin/bundle-translations-plugin.ts +3 -6
  120. package/src/shared/content-settings/components/content-settings/ContentSettings.mixin.ts +2 -0
  121. package/src/shared/content-settings/components/content-settings/i18n/content-settings.de-DE.json +9 -8
  122. package/src/shared/content-settings/components/content-settings/i18n/content-settings.es-ES.json +10 -9
  123. package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-FR.json +3 -2
  124. package/src/shared/content-settings/components/content-settings/i18n/content-settings.json +2 -1
  125. package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-PT.json +14 -13
  126. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.ts +7 -1
  127. package/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.ts +1 -16
  128. package/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.vue +0 -5
  129. package/lib/src/bundled-translations-BMr0LtzI.js +0 -27
  130. package/lib/src/bundled-translations.de-DE-BXAa3p16.js +0 -27
  131. package/lib/src/bundled-translations.es-ES-B4FHib2V.js +0 -27
  132. package/lib/src/bundled-translations.fr-FR-B84T67W5.js +0 -27
  133. package/lib/src/bundled-translations.pt-PT-BB4hTIYd.js +0 -27
  134. /package/src/brand-page/components/icon/icons/{Twitter.vue → X.vue} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-pU0Bg4q2.js";
2
+ import { _ as t } from "./lib--oa9Rosp.js";
3
3
  const i = {}, h = {
4
4
  width: "275",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-pU0Bg4q2.js";
2
+ import { _ as t } from "./lib--oa9Rosp.js";
3
3
  const i = {}, h = {
4
4
  width: "251",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-pU0Bg4q2.js";
2
+ import { _ as t } from "./lib--oa9Rosp.js";
3
3
  const i = {}, h = {
4
4
  width: "250",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-pU0Bg4q2.js";
2
+ import { _ as t } from "./lib--oa9Rosp.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-pU0Bg4q2.js";
2
+ import { _ as t } from "./lib--oa9Rosp.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-pU0Bg4q2.js";
2
+ import { _ as e } from "./lib--oa9Rosp.js";
3
3
  const M = {}, Z = {
4
4
  width: "242",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-pU0Bg4q2.js";
2
+ import { _ as e } from "./lib--oa9Rosp.js";
3
3
  const i = {}, M = {
4
4
  width: "231",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-pU0Bg4q2.js";
2
+ import { _ as e } from "./lib--oa9Rosp.js";
3
3
  const M = {}, Z = {
4
4
  width: "230",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-pU0Bg4q2.js";
2
+ import { _ as e } from "./lib--oa9Rosp.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-pU0Bg4q2.js";
2
+ import { _ as M } from "./lib--oa9Rosp.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -113,7 +113,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
113
113
  IconTikTok: import("vue").DefineComponent<{}, {}, any>;
114
114
  IconTumblr: import("vue").DefineComponent<{}, {}, any>;
115
115
  IconTwitch: import("vue").DefineComponent<{}, {}, any>;
116
- IconTwitter: import("vue").DefineComponent<{}, {}, any>;
116
+ IconX: import("vue").DefineComponent<{}, {}, any>;
117
117
  IconUser: import("vue").DefineComponent<{}, {}, any>;
118
118
  IconUtensils: import("vue").DefineComponent<{}, {}, any>;
119
119
  IconVideo: import("vue").DefineComponent<{}, {}, any>;
@@ -62,7 +62,7 @@ import IconThumbsUp from './icons/ThumbsUp.vue';
62
62
  import IconTikTok from './icons/TikTok.vue';
63
63
  import IconTumblr from './icons/Tumblr.vue';
64
64
  import IconTwitch from './icons/Twitch.vue';
65
- import IconTwitter from './icons/Twitter.vue';
65
+ import IconX from './icons/X.vue';
66
66
  import IconUser from './icons/User.vue';
67
67
  import IconUtensils from './icons/Utensils.vue';
68
68
  import IconVideo from './icons/Video.vue';
@@ -128,7 +128,7 @@ export default defineComponent({
128
128
  IconTikTok,
129
129
  IconTumblr,
130
130
  IconTwitch,
131
- IconTwitter,
131
+ IconX,
132
132
  IconUser,
133
133
  IconUtensils,
134
134
  IconVideo,
@@ -36,7 +36,6 @@ export interface AbTestResult {
36
36
  }
37
37
  export interface AbTest {
38
38
  bp_3926_freemium_watermark?: AbTestResult;
39
- bp_4092_rotating_upsells_at_publish?: AbTestResult;
40
39
  }
41
40
  export declare const MEDIA_SIZES: {
42
41
  readonly size1x: "size1x";
@@ -75,5 +74,4 @@ export interface BrandPageContext {
75
74
  isCapturingPreview: boolean;
76
75
  disableLogoRenderOnServerside?: boolean;
77
76
  }
78
- export declare const getValueType: (key: string, abtestValue?: string) => AbTestResult;
79
77
  export declare const getAbTestResults: (abtestKeyValues: Record<string, string>) => AbTest;
@@ -24,14 +24,13 @@ export const AB_TEST_FLAG = {
24
24
  };
25
25
  const AB_TEST_KEYS = {
26
26
  BP_3926_FREEMIUM_WATERMARK: 'bc-bp-3926-freemium-cta-in-website-editor',
27
- BP_4092_ROTATING_UPSELLS_AT_PUBLISH: 'bc-bp-4092-rotating-upsells-at-website-publish',
28
27
  };
29
28
  export const MEDIA_SIZES = {
30
29
  size1x: 'size1x',
31
30
  size2x: 'size2x',
32
31
  sizeThumb: 'sizeThumb',
33
32
  };
34
- export const getValueType = (key, abtestValue) => {
33
+ const getValueType = (key, abtestValue) => {
35
34
  return {
36
35
  key: key,
37
36
  value: abtestValue || '',
@@ -9,7 +9,7 @@ export declare const CONTENT_TYPES: {
9
9
  readonly phone: "phone";
10
10
  readonly text: "text";
11
11
  readonly facebook: "facebook";
12
- readonly twitter: "twitter";
12
+ readonly x: "x";
13
13
  readonly instagram: "instagram";
14
14
  readonly youtube: "youtube";
15
15
  readonly linkedin: "linkedin";
@@ -9,7 +9,7 @@ export const CONTENT_TYPES = {
9
9
  phone: 'phone',
10
10
  text: 'text',
11
11
  facebook: 'facebook',
12
- twitter: 'twitter',
12
+ x: 'x',
13
13
  instagram: 'instagram',
14
14
  youtube: 'youtube',
15
15
  linkedin: 'linkedin',
@@ -79,7 +79,7 @@ export type WebsiteContent = ButtonContent;
79
79
  export type EmailContent = ButtonContent;
80
80
  export type PhoneContent = ButtonContent;
81
81
  export type FacebookContent = ButtonContent;
82
- export type TwitterContent = ButtonContent;
82
+ export type XContent = ButtonContent;
83
83
  export type InstagramContent = ButtonContent;
84
84
  export type YoutubeContent = ButtonContent;
85
85
  export type LinkedInContent = ButtonContent;
@@ -287,12 +287,11 @@ export interface TextMediaItem extends ImageItem {
287
287
  }
288
288
  export interface TextShapeItem extends TextMediaItem {
289
289
  colorReplacements: ColorReplacement[];
290
- mediaType: 'shape';
291
290
  aspectRatio?: number | null;
292
291
  }
293
292
  export interface ShapeItem extends ImageItem {
294
293
  colorReplacements: ColorReplacement[];
295
- mediaType: 'shape';
294
+ mediaType: MediaType;
296
295
  title?: string;
297
296
  paragraph?: string;
298
297
  titleOverride?: string;
@@ -322,24 +321,19 @@ export interface ShapesSectionContent extends Content, MediaSection {
322
321
  size: string;
323
322
  cardStyle: BrandPageCssStyle;
324
323
  }
325
- export interface ImagesSectionContent extends Content {
324
+ export interface ImagesSectionContent extends Content, MediaSection {
326
325
  type: 'images-section';
327
- title: string;
328
- displayStyle: ImagesSectionContentDisplayStyle;
329
326
  aspectRatio: AspectRatio;
330
327
  areImagesFullWidth: boolean;
331
- items: TextMediaItem[];
332
- backgroundStyle: BrandPageCssStyle;
333
- titleStyle: TextStyleDeclaration;
334
- headingStyle: TextStyleDeclaration;
335
- paragraphStyle: TextStyleDeclaration;
336
328
  cardStyle: BrandPageCssStyle;
337
329
  }
338
330
  export interface MediaSection extends Content {
339
331
  title: string;
340
- displayStyle: string;
341
- items: TextShapeItem[];
332
+ description: string;
333
+ displayStyle: ImagesSectionContentDisplayStyle;
334
+ items: TextShapeItem[] | TextMediaItem[];
342
335
  titleStyle: TextStyleDeclaration;
336
+ descriptionStyle: TextStyleDeclaration;
343
337
  headingStyle: TextStyleDeclaration;
344
338
  paragraphStyle: TextStyleDeclaration;
345
339
  backgroundStyle: BrandPageCssStyle;
@@ -338,9 +338,9 @@ export class AbstractPageFooterStyles {
338
338
  {
339
339
  width: 0,
340
340
  height: 0,
341
- imageUrl: 'twitter',
341
+ imageUrl: 'x',
342
342
  imageTitle: '',
343
- url: 'https://www.twitter.com',
343
+ url: 'https://www.x.com',
344
344
  mediaType: 'image',
345
345
  imageLink: '',
346
346
  },
@@ -0,0 +1,7 @@
1
+ import type { ButtonStyles } from '../models';
2
+ /**
3
+ * Calculates the box shadow value for button styles based on the button style configuration
4
+ * @param buttonStyles - The button styles configuration
5
+ * @returns The calculated box shadow CSS value
6
+ */
7
+ export declare const getBoxShadowValue: (buttonStyles: ButtonStyles) => string;
@@ -0,0 +1,29 @@
1
+ import { isHexColor } from '../../utils/helpers';
2
+ import { setRgbAlpha } from './color.util';
3
+ import { ButtonSoftBoxShadowSize, ButtonBoxShadowSize, BoxShadowSpread, } from '../constants';
4
+ /**
5
+ * Calculates the box shadow value for button styles based on the button style configuration
6
+ * @param buttonStyles - The button styles configuration
7
+ * @returns The calculated box shadow CSS value
8
+ */
9
+ export const getBoxShadowValue = (buttonStyles) => {
10
+ let boxShadowValue = '';
11
+ if (buttonStyles.style.boxShadow) {
12
+ if (isHexColor(buttonStyles.style.boxShadow)) {
13
+ if (buttonStyles.selectedButtonStyleId === 'BUTTON_STYLE_16' ||
14
+ buttonStyles.selectedButtonStyleId === 'BUTTON_STYLE_17' ||
15
+ buttonStyles.selectedButtonStyleId === 'BUTTON_STYLE_18') {
16
+ const rgba = setRgbAlpha(buttonStyles.style.boxShadow, BoxShadowSpread);
17
+ boxShadowValue = `${ButtonSoftBoxShadowSize} ${rgba}`;
18
+ }
19
+ else {
20
+ const rgba = setRgbAlpha(buttonStyles.style.boxShadow, BoxShadowSpread);
21
+ boxShadowValue = `${ButtonBoxShadowSize} ${rgba}`;
22
+ }
23
+ }
24
+ else {
25
+ boxShadowValue = buttonStyles.style.boxShadow;
26
+ }
27
+ }
28
+ return boxShadowValue;
29
+ };
@@ -58,7 +58,7 @@ export const forEachPageCallContentCallback = (page, callbacks) => {
58
58
  case 'linkedin':
59
59
  case 'tiktok':
60
60
  case 'twitch':
61
- case 'twitter':
61
+ case 'x':
62
62
  case 'pinterest':
63
63
  case 'youtube':
64
64
  callbacks.buttonContentCallback(content);
@@ -28,7 +28,7 @@ export const isButtonContent = (content) => {
28
28
  content?.type === 'website' ||
29
29
  content?.type === 'email' ||
30
30
  content?.type === 'phone' ||
31
- content?.type === 'twitter' ||
31
+ content?.type === 'x' ||
32
32
  content?.type === 'instagram' ||
33
33
  content?.type === 'youtube' ||
34
34
  content?.type === 'linkedin' ||
@@ -199,7 +199,13 @@ const CONTENT_STYLE_PROP_NAME_SUFFIX = [
199
199
  'Color',
200
200
  'Replacements',
201
201
  ];
202
- const RTE_ALLOWED_SECTION_TYPES = ['text', 'banner-section', 'booking-section'];
202
+ const RTE_ALLOWED_SECTION_TYPES = [
203
+ 'text',
204
+ 'banner-section',
205
+ 'booking-section',
206
+ 'images-section',
207
+ 'shapes-section',
208
+ ];
203
209
  const RTE_ALLOWED_FIELDS = ['title', 'description', 'text', 'textItems'];
204
210
  export const applyLogoThemeToContents = (logoTheme, pages) => {
205
211
  let isModified = false;
@@ -9,6 +9,7 @@ import uniq from 'lodash/uniq';
9
9
  import { generateGoogleFontUrl } from './font-loader.util';
10
10
  import { isValidSvgUrl } from './image.util';
11
11
  import { isLogoContent } from './model.util';
12
+ import { getBoxShadowValue } from './button.util';
12
13
  const BUTTON_BORDER_RADIUS = '9999px';
13
14
  const CONTENT_BORDER_RADIUS = '48px';
14
15
  const PROFILE_PADDING_TOP = '1rem';
@@ -191,24 +192,7 @@ const isBigImageType = (displayStyle) => {
191
192
  return false;
192
193
  };
193
194
  const mapToButtonViewModel = (content, styles, options) => {
194
- let boxShadowValue = '';
195
- if (styles.buttonStyles.style.boxShadow) {
196
- if (isHexColor(styles.buttonStyles.style.boxShadow)) {
197
- if (styles.buttonStyles.selectedButtonStyleId === 'BUTTON_STYLE_16' ||
198
- styles.buttonStyles.selectedButtonStyleId === 'BUTTON_STYLE_17' ||
199
- styles.buttonStyles.selectedButtonStyleId === 'BUTTON_STYLE_18') {
200
- const rgba = setRgbAlpha(styles.buttonStyles.style.boxShadow, BoxShadowSpread);
201
- boxShadowValue = `${ButtonSoftBoxShadowSize} ${rgba}`;
202
- }
203
- else {
204
- const rgba = setRgbAlpha(styles.buttonStyles.style.boxShadow, BoxShadowSpread);
205
- boxShadowValue = `${ButtonBoxShadowSize} ${rgba}`;
206
- }
207
- }
208
- else {
209
- boxShadowValue = styles.buttonStyles.style.boxShadow;
210
- }
211
- }
195
+ const boxShadowValue = getBoxShadowValue(styles.buttonStyles);
212
196
  const buttonStyles = {
213
197
  iconStyle: styles.buttonStyles.iconStyle,
214
198
  style: {
@@ -309,9 +293,13 @@ const mapToMapViewModel = (content) => {
309
293
  return { ...content, role: content.type, type: 'map' };
310
294
  };
311
295
  const mapToMailingListViewModel = (content, styles) => {
296
+ const boxShadowValue = getBoxShadowValue(styles.buttonStyles);
312
297
  const buttonStyles = {
313
298
  iconStyle: styles.buttonStyles.iconStyle,
314
- style: styles.buttonStyles.style,
299
+ style: {
300
+ ...styles.buttonStyles.style,
301
+ boxShadow: boxShadowValue,
302
+ },
315
303
  selectedButtonStyleId: styles.buttonStyles.selectedButtonStyleId,
316
304
  };
317
305
  const titleStyle = {
@@ -368,11 +356,20 @@ const mapToRequestPaymentViewModel = (content, styles) => {
368
356
  }, styles);
369
357
  };
370
358
  const mapToContactFormViewModel = (content, styles, brandPageType) => {
359
+ const boxShadowValue = getBoxShadowValue(styles.buttonStyles);
360
+ const buttonStyles = {
361
+ iconStyle: styles.buttonStyles.iconStyle,
362
+ style: {
363
+ ...styles.buttonStyles.style,
364
+ boxShadow: boxShadowValue,
365
+ },
366
+ selectedButtonStyleId: styles.buttonStyles.selectedButtonStyleId,
367
+ };
371
368
  return applyViewModelTextStyles({
372
369
  ...content,
373
370
  role: content.type,
374
371
  type: 'contact-form',
375
- buttonStyles: styles.buttonStyles,
372
+ buttonStyles: buttonStyles,
376
373
  buttonTextStyle: {
377
374
  ...content.buttonTextStyle,
378
375
  },
@@ -659,7 +656,7 @@ export const mapToViewModel = (styles, brandPageType) => (content) => {
659
656
  case 'website':
660
657
  case 'phone':
661
658
  case 'facebook':
662
- case 'twitter':
659
+ case 'x':
663
660
  case 'instagram':
664
661
  case 'youtube':
665
662
  case 'linkedin':
@@ -2,11 +2,11 @@ declare const _default: import("vue").DefineComponent<{}, {
2
2
  templates: import("vue").ComputedRef<import("../../stores/admin-logo-settings").AdminPreviewLogoTemplateTemplate[]>;
3
3
  items: import("vue").ComputedRef<{
4
4
  id: string;
5
- type: "website" | "image" | "facebook" | "twitter" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
5
+ type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
6
6
  settings: {
7
7
  content: {
8
8
  id: string;
9
- type: "website" | "image" | "facebook" | "twitter" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
9
+ type: "website" | "image" | "email" | "phone" | "logo" | "general-link" | "profile" | "video" | "text" | "facebook" | "x" | "instagram" | "youtube" | "linkedin" | "pinterest" | "twitch" | "tiktok" | "map" | "image-gallery" | "mailing-list" | "request-payment" | "support-me" | "contact-form" | "banner-section" | "about-section" | "divider-section" | "images-section" | "testimonial-section" | "social-links" | "shapes-section" | "shop-section" | "booking-section";
10
10
  personalisationRole?: "website" | "email" | "phone" | "profile" | "about" | "information" | "media" | undefined;
11
11
  imageUrlOverride?: string | undefined;
12
12
  imageUrlsOverride?: string | undefined;