@designcrowd/library.brand-page 5.16.16 → 5.16.17-pre-temp-2

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 (153) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-9qd7Ywtz.js → CreatedOnBrandCrowd-de-de-CFZJ9B0_.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-DdyGV-qI.js → CreatedOnBrandCrowd-en-us-Co2tanrg.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-CUHwMcca.js → CreatedOnBrandCrowd-es-es-DWcr6V-z.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-C8QyqKxX.js → CreatedOnBrandCrowd-fr-ca-De72i4oQ.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-C8QyqKxX.js → CreatedOnBrandCrowd-fr-fr-De72i4oQ.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-nlLHZ08I.js → CreatedOnBrandCrowd-pt-br-CcznKAcC.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-nlLHZ08I.js → CreatedOnBrandCrowd-pt-pt-CcznKAcC.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-DUJu6NBT.js → CreatedOnDcom-de-de-xh1FG9UT.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-L_qTlE9o.js → CreatedOnDcom-en-us-DwRJ-NGl.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-DZmpnYln.js → CreatedOnDcom-es-es-qa4GXYmC.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-RVccl2_y.js → CreatedOnDcom-fr-ca-Ck443ItA.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-DyQaxN0C.js → CreatedOnDcom-fr-fr-DysZVU4Z.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-6yVtu8gd.js → CreatedOnDcom-pt-br-6zBZ72NO.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-ZmDkC8e2.js → CreatedOnDcom-pt-pt-Dtvbafy6.js} +1 -1
  15. package/lib/src/brand-page/__fixtures__/brand-page-sample-data.d.ts +1 -3
  16. package/lib/src/brand-page/__fixtures__/brand-page-sample-data.js +1 -1
  17. package/lib/src/brand-page/components/mailing-list/MailingList.stories.js +1 -1
  18. package/lib/src/brand-page/components/profile/Profile.mixin.d.ts +2 -1
  19. package/lib/src/brand-page/components/profile/Profile.mixin.js +18 -4
  20. package/lib/src/brand-page/models/index.d.ts +1 -1
  21. package/lib/src/brand-page/utils/migration/migration-10.d.ts +2 -0
  22. package/lib/src/brand-page/utils/migration/migration-10.js +16 -0
  23. package/lib/src/brand-page/utils/migration.util.js +6 -0
  24. package/lib/src/brand-page/utils/style.util.js +1 -8
  25. package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.d.ts +1 -11
  26. package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.js +1 -1
  27. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.js +2 -6
  28. package/lib/src/brand-page-maker/constants/config-settings-constant.js +7 -1
  29. package/lib/src/brand-page-maker/models/content-settings.js +1 -1
  30. package/lib/src/brand-page-maker/utils/rich-text-editor.util.d.ts +1 -0
  31. package/lib/src/brand-page-maker/utils/rich-text-editor.util.js +169 -0
  32. package/lib/src/{bundled-translations-DFard9nW.js → bundled-translations-BYa_U-US.js} +1 -1
  33. package/lib/src/{bundled-translations.de-DE-DABMhdVD.js → bundled-translations.de-DE-DypSwCKV.js} +1 -1
  34. package/lib/src/{bundled-translations.es-ES-D3uK0HbO.js → bundled-translations.es-ES-IiXZIQwt.js} +1 -1
  35. package/lib/src/{bundled-translations.fr-CA-CrNNQolN.js → bundled-translations.fr-CA-B4yILHO8.js} +8 -8
  36. package/lib/src/{bundled-translations.fr-FR-CoNrvKDx.js → bundled-translations.fr-FR-C6C6FR8Q.js} +1 -1
  37. package/lib/src/bundled-translations.pt-BR-C6Ym9BZY.js +163 -0
  38. package/lib/src/{bundled-translations.pt-PT-BEjR7U12.js → bundled-translations.pt-PT-CYohhAyJ.js} +1 -1
  39. package/lib/src/bundles/bundled-translations.de-DE.json +1 -1
  40. package/lib/src/bundles/bundled-translations.es-ES.json +1 -1
  41. package/lib/src/bundles/bundled-translations.fr-CA.json +1 -1
  42. package/lib/src/bundles/bundled-translations.fr-FR.json +1 -1
  43. package/lib/src/bundles/bundled-translations.json +1 -1
  44. package/lib/src/bundles/bundled-translations.pt-BR.json +2 -2
  45. package/lib/src/bundles/bundled-translations.pt-PT.json +1 -1
  46. package/lib/src/clients/fabric-render-client.d.ts +1 -0
  47. package/lib/src/css/library.brand-page-brandCrowd.min.css +52 -52
  48. package/lib/src/css/library.brand-page-brandPage.min.css +52 -52
  49. package/lib/src/css/library.brand-page-designCom.min.css +52 -52
  50. package/lib/src/css/library.brand-page-preview.min.css +52 -52
  51. package/lib/src/index.d.ts +1 -1
  52. package/lib/src/index.mjs +66 -65
  53. package/lib/src/{lib-F2oLNzFB.js → lib-DTMYf8OY.js} +11919 -11735
  54. package/lib/src/lib.js +1 -1
  55. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.js +2 -6
  56. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +1 -0
  57. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.js +4 -8
  58. package/lib/src/shared/logo-settings/store/editable-logo-store.js +1 -0
  59. package/package.json +1 -1
  60. package/src/brand-page/__fixtures__/brand-page-sample-data.ts +1 -1
  61. package/src/brand-page/components/mailing-list/MailingList.stories.ts +1 -1
  62. package/src/brand-page/components/mailing-list/MailingList.vue +3 -2
  63. package/src/brand-page/components/profile/Profile.mixin.ts +17 -5
  64. package/src/brand-page/components/profile/Profile.vue +5 -2
  65. package/src/brand-page/models/index.ts +1 -1
  66. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +3 -3
  67. package/src/brand-page/utils/migration/migration-10.ts +23 -0
  68. package/src/brand-page/utils/migration.util.test.ts +1 -1
  69. package/src/brand-page/utils/migration.util.ts +6 -0
  70. package/src/brand-page/utils/style.util.ts +4 -8
  71. package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.ts +1 -1
  72. package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.ts +5 -6
  73. package/src/brand-page-maker/components/color-palette/BpColorPalette.vue +1 -3
  74. package/src/brand-page-maker/components/rich-text-editor/RichTextEditor.vue +1 -1
  75. package/src/brand-page-maker/constants/config-settings-constant.ts +7 -1
  76. package/src/brand-page-maker/constants/i18n/constants.pt-BR.json +1 -1
  77. package/src/brand-page-maker/models/content-settings.ts +1 -1
  78. package/src/brand-page-maker/utils/rich-text-editor.util.ts +301 -0
  79. package/src/bundles/bundled-translations.de-DE.json +1 -1
  80. package/src/bundles/bundled-translations.es-ES.json +1 -1
  81. package/src/bundles/bundled-translations.fr-CA.json +1 -1
  82. package/src/bundles/bundled-translations.fr-FR.json +1 -1
  83. package/src/bundles/bundled-translations.json +1 -1
  84. package/src/bundles/bundled-translations.pt-BR.json +2 -2
  85. package/src/bundles/bundled-translations.pt-PT.json +1 -1
  86. package/src/clients/fabric-render-client.ts +1 -0
  87. package/src/lib.ts +1 -0
  88. package/src/shared/background-settings/components/i18n/background-settings.de-DE.json +17 -17
  89. package/src/shared/background-settings/components/i18n/background-settings.es-ES.json +17 -17
  90. package/src/shared/background-settings/components/i18n/background-settings.fr-CA.json +17 -17
  91. package/src/shared/background-settings/components/i18n/background-settings.fr-FR.json +17 -17
  92. package/src/shared/background-settings/components/i18n/background-settings.pt-BR.json +17 -17
  93. package/src/shared/background-settings/components/i18n/background-settings.pt-PT.json +17 -17
  94. package/src/shared/common/i18n/error.de-DE.json +35 -41
  95. package/src/shared/common/i18n/error.es-ES.json +35 -41
  96. package/src/shared/common/i18n/error.fr-CA.json +35 -41
  97. package/src/shared/common/i18n/error.fr-FR.json +35 -41
  98. package/src/shared/common/i18n/error.pt-BR.json +35 -41
  99. package/src/shared/common/i18n/error.pt-PT.json +35 -41
  100. package/src/shared/confirm-modal/i18n/confirm-modal.de-DE.json +5 -5
  101. package/src/shared/confirm-modal/i18n/confirm-modal.es-ES.json +5 -5
  102. package/src/shared/confirm-modal/i18n/confirm-modal.fr-CA.json +5 -5
  103. package/src/shared/confirm-modal/i18n/confirm-modal.fr-FR.json +5 -5
  104. package/src/shared/confirm-modal/i18n/confirm-modal.pt-BR.json +5 -5
  105. package/src/shared/confirm-modal/i18n/confirm-modal.pt-PT.json +5 -5
  106. package/src/shared/content-settings/components/booking-url-field/i18n/booking-url-field.de-DE.json +2 -2
  107. package/src/shared/content-settings/components/booking-url-field/i18n/booking-url-field.es-ES.json +2 -2
  108. package/src/shared/content-settings/components/booking-url-field/i18n/booking-url-field.fr-CA.json +2 -2
  109. package/src/shared/content-settings/components/booking-url-field/i18n/booking-url-field.fr-FR.json +2 -2
  110. package/src/shared/content-settings/components/booking-url-field/i18n/booking-url-field.pt-BR.json +2 -2
  111. package/src/shared/content-settings/components/booking-url-field/i18n/booking-url-field.pt-PT.json +2 -2
  112. package/src/shared/content-settings/components/content-settings/ContentSettings.mixin.ts +2 -5
  113. package/src/shared/content-settings/components/content-settings/i18n/content-settings.de-DE.json +2 -2
  114. package/src/shared/content-settings/components/content-settings/i18n/content-settings.es-ES.json +2 -2
  115. package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-CA.json +2 -2
  116. package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-FR.json +2 -2
  117. package/src/shared/content-settings/components/content-settings/i18n/content-settings.json +2 -2
  118. package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-BR.json +2 -2
  119. package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-PT.json +2 -2
  120. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.ts +4 -7
  121. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.vue +1 -1
  122. package/src/shared/content-settings/components/form-fields-field/i18n/form-fields.de-DE.json +12 -12
  123. package/src/shared/content-settings/components/form-fields-field/i18n/form-fields.es-ES.json +12 -12
  124. package/src/shared/content-settings/components/form-fields-field/i18n/form-fields.fr-CA.json +12 -12
  125. package/src/shared/content-settings/components/form-fields-field/i18n/form-fields.fr-FR.json +12 -12
  126. package/src/shared/content-settings/components/form-fields-field/i18n/form-fields.pt-BR.json +12 -12
  127. package/src/shared/content-settings/components/form-fields-field/i18n/form-fields.pt-PT.json +12 -12
  128. package/src/shared/content-settings/components/generate-ai-modal/i18n/generate-ai.de-DE.json +9 -9
  129. package/src/shared/content-settings/components/generate-ai-modal/i18n/generate-ai.es-ES.json +9 -9
  130. package/src/shared/content-settings/components/generate-ai-modal/i18n/generate-ai.fr-CA.json +9 -9
  131. package/src/shared/content-settings/components/generate-ai-modal/i18n/generate-ai.fr-FR.json +9 -9
  132. package/src/shared/content-settings/components/generate-ai-modal/i18n/generate-ai.pt-BR.json +9 -9
  133. package/src/shared/content-settings/components/generate-ai-modal/i18n/generate-ai.pt-PT.json +9 -9
  134. package/src/shared/logo-settings/components/i18n/logo-template-search.de-DE.json +5 -5
  135. package/src/shared/logo-settings/components/i18n/logo-template-search.es-ES.json +5 -5
  136. package/src/shared/logo-settings/components/i18n/logo-template-search.fr-CA.json +5 -5
  137. package/src/shared/logo-settings/components/i18n/logo-template-search.fr-FR.json +5 -5
  138. package/src/shared/logo-settings/components/i18n/logo-template-search.pt-BR.json +5 -5
  139. package/src/shared/logo-settings/components/i18n/logo-template-search.pt-PT.json +5 -5
  140. package/src/shared/logo-settings/components/logo-switch-confirmation-modal/i18n/logo-switch-confirmation-modal.de-DE.json +3 -3
  141. package/src/shared/logo-settings/components/logo-switch-confirmation-modal/i18n/logo-switch-confirmation-modal.es-ES.json +3 -3
  142. package/src/shared/logo-settings/components/logo-switch-confirmation-modal/i18n/logo-switch-confirmation-modal.fr-CA.json +3 -3
  143. package/src/shared/logo-settings/components/logo-switch-confirmation-modal/i18n/logo-switch-confirmation-modal.fr-FR.json +3 -3
  144. package/src/shared/logo-settings/components/logo-switch-confirmation-modal/i18n/logo-switch-confirmation-modal.pt-BR.json +3 -3
  145. package/src/shared/logo-settings/components/logo-switch-confirmation-modal/i18n/logo-switch-confirmation-modal.pt-PT.json +3 -3
  146. package/src/shared/logo-settings/store/editable-logo-store.ts +1 -0
  147. package/src/shared/video-library/i18n/video-library.de-DE.json +5 -5
  148. package/src/shared/video-library/i18n/video-library.es-ES.json +5 -5
  149. package/src/shared/video-library/i18n/video-library.fr-CA.json +5 -5
  150. package/src/shared/video-library/i18n/video-library.fr-FR.json +5 -5
  151. package/src/shared/video-library/i18n/video-library.pt-BR.json +5 -5
  152. package/src/shared/video-library/i18n/video-library.pt-PT.json +5 -5
  153. package/lib/src/bundled-translations.pt-BR-C9cLo_Jw.js +0 -163
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-F2oLNzFB.js";
2
+ import { _ as t } from "./lib-DTMYf8OY.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-F2oLNzFB.js";
2
+ import { _ as t } from "./lib-DTMYf8OY.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-F2oLNzFB.js";
2
+ import { _ as t } from "./lib-DTMYf8OY.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-F2oLNzFB.js";
2
+ import { _ as t } from "./lib-DTMYf8OY.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-F2oLNzFB.js";
2
+ import { _ as t } from "./lib-DTMYf8OY.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-F2oLNzFB.js";
2
+ import { _ as t } from "./lib-DTMYf8OY.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
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-F2oLNzFB.js";
2
+ import { _ as t } from "./lib-DTMYf8OY.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-F2oLNzFB.js";
2
+ import { _ as e } from "./lib-DTMYf8OY.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-F2oLNzFB.js";
2
+ import { _ as e } from "./lib-DTMYf8OY.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-F2oLNzFB.js";
2
+ import { _ as e } from "./lib-DTMYf8OY.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-F2oLNzFB.js";
2
+ import { _ as e } from "./lib-DTMYf8OY.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 e } from "./lib-F2oLNzFB.js";
2
+ import { _ as e } from "./lib-DTMYf8OY.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-F2oLNzFB.js";
2
+ import { _ as M } from "./lib-DTMYf8OY.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
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-F2oLNzFB.js";
2
+ import { _ as M } from "./lib-DTMYf8OY.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -252,10 +252,9 @@ export declare const brandsiteMigrationBrandPageData: {
252
252
  id: string;
253
253
  type: string;
254
254
  buttonText: string;
255
- promptText: string;
255
+ title: string;
256
256
  acceptedFields: string;
257
257
  links?: undefined;
258
- title?: undefined;
259
258
  titleStyle?: undefined;
260
259
  iconFillStyles?: undefined;
261
260
  backgroundStyles?: undefined;
@@ -282,7 +281,6 @@ export declare const brandsiteMigrationBrandPageData: {
282
281
  iconDisplayStyle: string;
283
282
  iconBackgroundStyles: {};
284
283
  buttonText?: undefined;
285
- promptText?: undefined;
286
284
  acceptedFields?: undefined;
287
285
  })[];
288
286
  })[];
@@ -395,7 +395,7 @@ export const brandsiteMigrationBrandPageData = {
395
395
  id: '43406faf-f4f9-4071-a39d-b3e42e719b7d',
396
396
  type: 'mailing-list',
397
397
  buttonText: 'Send',
398
- promptText: 'Contact Us',
398
+ title: 'Contact Us',
399
399
  acceptedFields: 'nameAndEmail',
400
400
  },
401
401
  {
@@ -12,7 +12,7 @@ const bpData = {
12
12
  id: faker.datatype.uuid(),
13
13
  type: 'mailing-list',
14
14
  acceptedFields: undefined,
15
- promptText: 'You want some mails?',
15
+ title: 'You want some mails?',
16
16
  buttonText: 'Subscribe',
17
17
  titleStyle: {
18
18
  textAlign: DEFAULT_TEXT_ALIGN,
@@ -17,7 +17,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
17
17
  };
18
18
  }>, {}, {}, {
19
19
  containerStyle(): BrandPageCssStyle;
20
- renderDescriptionText(): string | undefined;
20
+ renderDescriptionText(): string;
21
+ hasDescriptionText(): boolean;
21
22
  }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
22
23
  viewModel: {
23
24
  type: PropType<ProfileViewModel>;
@@ -1,5 +1,6 @@
1
1
  import { defineComponent } from 'vue';
2
- import { getRenderText } from '../../utils';
2
+ import { getRenderText, escapeContentText } from '../../utils';
3
+ import { hasRTEContent } from '../../../brand-page-maker/utils/rich-text-editor.util';
3
4
  export default defineComponent({
4
5
  props: {
5
6
  viewModel: {
@@ -21,10 +22,23 @@ export default defineComponent({
21
22
  return this.viewModel.containerStyle || {};
22
23
  },
23
24
  renderDescriptionText() {
24
- if (!this.viewModel?.description) {
25
- return undefined;
25
+ if (!this.viewModel.description) {
26
+ return '';
27
+ }
28
+ if (hasRTEContent(this.viewModel.description)) {
29
+ return this.viewModel.description;
30
+ }
31
+ else {
32
+ return getRenderText(this.viewModel.description);
33
+ }
34
+ },
35
+ hasDescriptionText() {
36
+ if (hasRTEContent(this.viewModel.description)) {
37
+ return escapeContentText(this.viewModel.description) !== '';
38
+ }
39
+ else {
40
+ return this.viewModel?.description?.length > 0;
26
41
  }
27
- return getRenderText(this.viewModel.description);
28
42
  },
29
43
  },
30
44
  });
@@ -182,7 +182,7 @@ export interface MapContent extends Content {
182
182
  }
183
183
  export interface MailingListContent extends Content {
184
184
  acceptedFields?: 'emailOnly' | 'nameAndEmail';
185
- promptText: string;
185
+ title: string;
186
186
  buttonText: string;
187
187
  titleStyle: TextStyleDeclaration;
188
188
  buttonTextStyle: TextStyleDeclaration;
@@ -0,0 +1,2 @@
1
+ import type { MigrationData } from '../migration.util';
2
+ export declare const migration10: (migrationResult: MigrationData) => Promise<MigrationData>;
@@ -0,0 +1,16 @@
1
+ import { isMailingListContent } from '../model.util';
2
+ export const migration10 = async (migrationResult) => {
3
+ const { brandPageModel } = migrationResult;
4
+ brandPageModel.pages.forEach((page) => {
5
+ page.contents.forEach((content) => {
6
+ if (isMailingListContent(content)) {
7
+ const mailingList = content;
8
+ if (mailingList.promptText && !mailingList.title) {
9
+ mailingList.title = mailingList.promptText;
10
+ delete mailingList.promptText;
11
+ }
12
+ }
13
+ });
14
+ });
15
+ return migrationResult;
16
+ };
@@ -12,6 +12,7 @@ import { migration05_2 } from './migration/migration-05_2';
12
12
  import { migration07 } from './migration/migration-07';
13
13
  import { migration08 } from './migration/migration-08';
14
14
  import { migration09 } from './migration/migration-09';
15
+ import { migration10 } from './migration/migration-10';
15
16
  const MIGRATION_TABLE = [
16
17
  {
17
18
  version: 1,
@@ -74,6 +75,11 @@ const MIGRATION_TABLE = [
74
75
  migrateFn: migration09,
75
76
  description: 'Migrating contact form with additional 3 custom fields',
76
77
  },
78
+ {
79
+ version: 10,
80
+ migrateFn: migration10,
81
+ description: 'Migrating promptText to title for mailing list content',
82
+ },
77
83
  ];
78
84
  export const GetLatestModelVersion = () => Math.max(...MIGRATION_TABLE.map((x) => x.version));
79
85
  export const migrateBrandPageModel = async (brandPageModel, options) => {
@@ -5,7 +5,7 @@ import { arrayToLinearGradient, linearGradientToArray, isColorLinearGradient, RG
5
5
  import { addTransparentAlphaChannelToHex, calculateLuminanceRatio, getNewColorBasedOnTargetColorTheme, } from './color.util';
6
6
  import { isRgbColor } from '../../utils/helpers';
7
7
  import chroma from 'chroma-js';
8
- import { hasRTEContent } from '../../brand-page-maker/utils';
8
+ import { hasRTEContent, RTE_ALLOWED_SECTION_TYPES, } from '../../brand-page-maker/utils';
9
9
  /**
10
10
  * Simple utility to convert any color format to hex for consistent comparison
11
11
  */
@@ -225,13 +225,6 @@ const CONTENT_STYLE_PROP_NAME_SUFFIX = [
225
225
  'Color',
226
226
  'Replacements',
227
227
  ];
228
- const RTE_ALLOWED_SECTION_TYPES = [
229
- 'text',
230
- 'banner-section',
231
- 'booking-section',
232
- 'images-section',
233
- 'shapes-section',
234
- ];
235
228
  const RTE_ALLOWED_FIELDS = ['title', 'description', 'text', 'textItems'];
236
229
  export const applyLogoThemeToContents = (logoTheme, pages) => {
237
230
  let isModified = false;
@@ -85,7 +85,6 @@ export declare const BRAND_SITE_SAMPLE_WITH_LOGO: {
85
85
  backgroundStyles?: undefined;
86
86
  iconDisplayStyle?: undefined;
87
87
  iconBackgroundStyles?: undefined;
88
- promptText?: undefined;
89
88
  acceptedFields?: undefined;
90
89
  } | {
91
90
  id: string;
@@ -124,7 +123,6 @@ export declare const BRAND_SITE_SAMPLE_WITH_LOGO: {
124
123
  backgroundStyles?: undefined;
125
124
  iconDisplayStyle?: undefined;
126
125
  iconBackgroundStyles?: undefined;
127
- promptText?: undefined;
128
126
  acceptedFields?: undefined;
129
127
  } | {
130
128
  id: string;
@@ -229,7 +227,6 @@ export declare const BRAND_SITE_SAMPLE_WITH_LOGO: {
229
227
  backgroundStyles?: undefined;
230
228
  iconDisplayStyle?: undefined;
231
229
  iconBackgroundStyles?: undefined;
232
- promptText?: undefined;
233
230
  acceptedFields?: undefined;
234
231
  } | {
235
232
  id: string;
@@ -268,7 +265,6 @@ export declare const BRAND_SITE_SAMPLE_WITH_LOGO: {
268
265
  backgroundStyles?: undefined;
269
266
  iconDisplayStyle?: undefined;
270
267
  iconBackgroundStyles?: undefined;
271
- promptText?: undefined;
272
268
  acceptedFields?: undefined;
273
269
  } | {
274
270
  id: string;
@@ -361,7 +357,6 @@ export declare const BRAND_SITE_SAMPLE_WITH_LOGO: {
361
357
  backgroundStyles?: undefined;
362
358
  iconDisplayStyle?: undefined;
363
359
  iconBackgroundStyles?: undefined;
364
- promptText?: undefined;
365
360
  acceptedFields?: undefined;
366
361
  } | {
367
362
  id: string;
@@ -464,7 +459,6 @@ export declare const BRAND_SITE_SAMPLE_WITH_LOGO: {
464
459
  backgroundStyles?: undefined;
465
460
  iconDisplayStyle?: undefined;
466
461
  iconBackgroundStyles?: undefined;
467
- promptText?: undefined;
468
462
  acceptedFields?: undefined;
469
463
  } | {
470
464
  id: string;
@@ -567,7 +561,6 @@ export declare const BRAND_SITE_SAMPLE_WITH_LOGO: {
567
561
  backgroundStyles?: undefined;
568
562
  iconDisplayStyle?: undefined;
569
563
  iconBackgroundStyles?: undefined;
570
- promptText?: undefined;
571
564
  acceptedFields?: undefined;
572
565
  } | {
573
566
  id: string;
@@ -606,7 +599,6 @@ export declare const BRAND_SITE_SAMPLE_WITH_LOGO: {
606
599
  backgroundStyles?: undefined;
607
600
  iconDisplayStyle?: undefined;
608
601
  iconBackgroundStyles?: undefined;
609
- promptText?: undefined;
610
602
  acceptedFields?: undefined;
611
603
  } | {
612
604
  id: string;
@@ -665,13 +657,12 @@ export declare const BRAND_SITE_SAMPLE_WITH_LOGO: {
665
657
  headingStyle?: undefined;
666
658
  paragraphStyle?: undefined;
667
659
  areImagesFullWidth?: undefined;
668
- promptText?: undefined;
669
660
  acceptedFields?: undefined;
670
661
  } | {
671
662
  id: string;
672
663
  type: string;
673
664
  buttonText: string;
674
- promptText: string;
665
+ title: string;
675
666
  titleStyle: {
676
667
  textAlign: string;
677
668
  fontFamily: string;
@@ -699,7 +690,6 @@ export declare const BRAND_SITE_SAMPLE_WITH_LOGO: {
699
690
  textDecoration?: undefined;
700
691
  };
701
692
  url?: undefined;
702
- title?: undefined;
703
693
  imageUrl?: undefined;
704
694
  pageSlug?: undefined;
705
695
  cardStyle?: undefined;
@@ -1363,7 +1363,7 @@ export const BRAND_SITE_SAMPLE_WITH_LOGO = {
1363
1363
  id: 'fcf96448-a88c-4923-894a-762ab21a4a24',
1364
1364
  type: 'mailing-list',
1365
1365
  buttonText: 'Demander',
1366
- promptText: '',
1366
+ title: '',
1367
1367
  titleStyle: {
1368
1368
  textAlign: 'center',
1369
1369
  fontFamily: 'Lato',
@@ -11,7 +11,7 @@ import { useUiPageSettingsStore } from '../../../shared/page-settings/store';
11
11
  import { PAGE_SECTIONS } from '../../../shared/page-settings/models';
12
12
  import { EVENTS, SELECT_LOCATIONS, useEventTracker, } from '../../../brand-page-maker/composables/useEventTracker';
13
13
  import debounce from 'lodash.debounce';
14
- import { transformToRTE } from '../../../brand-page-maker/utils';
14
+ import { transformToRTE, RTE_ALLOWED_SECTION_TYPES, } from '../../../brand-page-maker/utils';
15
15
  import { useExternalRichTextEditor } from '../../../brand-page-maker/composables/rich-text-editor/useRichTextEditor';
16
16
  import { useUiStyleSettingsStore } from '../../../shared/style-settings/store';
17
17
  import { STYLE_THEME_KEYS } from '../../../brand-page/constants';
@@ -205,11 +205,7 @@ export default defineComponent({
205
205
  this.isHeaderSelected = false;
206
206
  this.isFooterSelected = false;
207
207
  this.isContentSelected = true;
208
- if ((item.type === 'banner-section' ||
209
- item.type === 'booking-section' ||
210
- item.type === 'images-section' ||
211
- item.type === 'shapes-section' ||
212
- item.type === 'text') &&
208
+ if (RTE_ALLOWED_SECTION_TYPES.includes(item.type) &&
213
209
  this.canUseRichTextEditor) {
214
210
  let selectedItem = item;
215
211
  if (this.isAdmin) {
@@ -575,8 +575,10 @@ export const PROFILE_CONTENT_SETTINGS_CONFIG = () => ({
575
575
  },
576
576
  name: {
577
577
  type: 'text',
578
+ title: contentSettingsTr(`nameTitle`),
578
579
  groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
579
580
  placeholder: contentSettingsTr(`yourNamePlaceholder`),
581
+ maxLength: 200,
580
582
  },
581
583
  nameOverride: {
582
584
  type: 'personalisation-override',
@@ -586,7 +588,9 @@ export const PROFILE_CONTENT_SETTINGS_CONFIG = () => ({
586
588
  title: {
587
589
  type: 'text',
588
590
  groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
591
+ title: contentSettingsTr(`titleTitle`),
589
592
  placeholder: contentSettingsTr(`titlePlaceholder`),
593
+ maxLength: 200,
590
594
  },
591
595
  titleOverride: {
592
596
  type: 'personalisation-override',
@@ -596,8 +600,10 @@ export const PROFILE_CONTENT_SETTINGS_CONFIG = () => ({
596
600
  description: {
597
601
  type: 'textarea',
598
602
  groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
603
+ title: contentSettingsTr(`defaultDescription`),
599
604
  placeholder: contentSettingsTr(`textAreaDescriptionPlaceholder`),
600
605
  defaultValue: '',
606
+ maxLength: 2000,
601
607
  },
602
608
  descriptionOverride: {
603
609
  type: 'personalisation-override',
@@ -1405,7 +1411,7 @@ export const MAILING_LIST_CONTENT_SETTINGS_CONFIG = () => ({
1405
1411
  },
1406
1412
  title: contentSettingsTr(`displayStyleTitle`),
1407
1413
  },
1408
- promptText: {
1414
+ title: {
1409
1415
  type: 'text',
1410
1416
  groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
1411
1417
  title: contentSettingsTr(`titleTitle`),
@@ -207,7 +207,7 @@ export const createInitialMailingListContent = (options) => {
207
207
  return {
208
208
  id: uuid.v4(),
209
209
  type: 'mailing-list',
210
- promptText: contentSettingsTr(`mailingListPromptText`),
210
+ title: contentSettingsTr(`mailingListTitle`),
211
211
  buttonText: contentSettingsTr(`subscribePlaceholder`),
212
212
  acceptedFields: 'emailOnly',
213
213
  titleStyle: {
@@ -5,6 +5,7 @@ import type { PageSettingsState } from '../../shared/page-settings/store';
5
5
  import type { StyleSettingsState } from '../../shared/style-settings/store';
6
6
  import type { Mark } from 'prosemirror-model';
7
7
  import { type DOMPurify } from 'dompurify';
8
+ export declare const RTE_ALLOWED_SECTION_TYPES: string[];
8
9
  export declare const isStyleChanged: (tr: Transaction) => boolean;
9
10
  export declare const skipStyleDetection: (chain: ChainedCommands, marks?: Mark[]) => ChainedCommands;
10
11
  export declare const hasRTEContent: (content: string) => boolean;
@@ -2,6 +2,15 @@ import { STYLE_THEME_KEYS, } from '../../brand-page';
2
2
  import { ESCAPED_NEWLINE_CHARACTER } from '../../constants/ui';
3
3
  import { getRenderText } from '../../brand-page/utils';
4
4
  import createDomPurify, {} from 'dompurify';
5
+ export const RTE_ALLOWED_SECTION_TYPES = [
6
+ 'banner-section',
7
+ 'text',
8
+ 'booking-section',
9
+ 'images-section',
10
+ 'shapes-section',
11
+ 'mailing-list',
12
+ 'profile',
13
+ ];
5
14
  // Only allow tags used by the enabled Tiptap extensions
6
15
  const allowedTags = [
7
16
  'p',
@@ -375,6 +384,92 @@ export const transformToRTE = (uiPageSettingStore, externalEditor, uiStyleSettin
375
384
  }
376
385
  }
377
386
  break;
387
+ case 'profile':
388
+ const profileContent = contentItem.settings.content;
389
+ const nameStyleType = profileContent.nameStyle.textStyleType;
390
+ const profileTitleStyleType = profileContent.titleStyle.textStyleType;
391
+ const profileDescriptionTextStyleType = profileContent.descriptionStyle.textStyleType;
392
+ if (nameStyleType &&
393
+ (nameStyleType === type || uiStyleSettingsStore)) {
394
+ let globalContentStyle = uiStyleSettingsStore
395
+ ? uiStyleSettingsStore.textStyles.textStyleOptions[nameStyleType]
396
+ .style
397
+ : newStyle ?? {};
398
+ globalContentStyle = {
399
+ ...globalContentStyle,
400
+ textAlign: profileContent.nameStyle.textAlign,
401
+ };
402
+ profileContent.name = getUpdatedHTMLFromEditor(externalEditor, profileContent.name, globalContentStyle);
403
+ }
404
+ else if (!nameStyleType &&
405
+ newContent &&
406
+ newContent.id === profileContent.id &&
407
+ !hasRTEContent(profileContent.name)) {
408
+ const newContentStyle = newContent.nameStyle;
409
+ profileContent.name = getUpdatedHTMLFromEditor(externalEditor, profileContent.name, newContentStyle);
410
+ }
411
+ if (profileTitleStyleType &&
412
+ (profileTitleStyleType === type || uiStyleSettingsStore)) {
413
+ let globalContentStyle = uiStyleSettingsStore
414
+ ? uiStyleSettingsStore.textStyles.textStyleOptions[profileTitleStyleType].style
415
+ : newStyle ?? {};
416
+ globalContentStyle = {
417
+ ...globalContentStyle,
418
+ textAlign: profileContent.titleStyle.textAlign,
419
+ };
420
+ profileContent.title = getUpdatedHTMLFromEditor(externalEditor, profileContent.title, globalContentStyle);
421
+ }
422
+ else if (!profileTitleStyleType &&
423
+ newContent &&
424
+ newContent.id === profileContent.id &&
425
+ !hasRTEContent(profileContent.title)) {
426
+ const newContentStyle = newContent.titleStyle;
427
+ profileContent.title = getUpdatedHTMLFromEditor(externalEditor, profileContent.title, newContentStyle);
428
+ }
429
+ if (profileDescriptionTextStyleType &&
430
+ (profileDescriptionTextStyleType === type || uiStyleSettingsStore)) {
431
+ let globalContentStyle = uiStyleSettingsStore
432
+ ? uiStyleSettingsStore.textStyles.textStyleOptions[profileDescriptionTextStyleType].style
433
+ : newStyle ?? {};
434
+ globalContentStyle = {
435
+ ...globalContentStyle,
436
+ textAlign: profileContent.descriptionStyle.textAlign,
437
+ };
438
+ profileContent.description = getUpdatedHTMLFromEditor(externalEditor, profileContent.description, globalContentStyle);
439
+ }
440
+ else if (!profileDescriptionTextStyleType &&
441
+ newContent &&
442
+ newContent.id === profileContent.id &&
443
+ !hasRTEContent(profileContent.description)) {
444
+ const newContentStyle = newContent
445
+ .descriptionStyle;
446
+ profileContent.description = getUpdatedHTMLFromEditor(externalEditor, profileContent.description, newContentStyle);
447
+ }
448
+ break;
449
+ case 'mailing-list':
450
+ const mailingListContent = contentItem.settings
451
+ .content;
452
+ const titleStyle = mailingListContent.titleStyle;
453
+ const mailingTitleStyleType = titleStyle?.textStyleType;
454
+ if (mailingTitleStyleType &&
455
+ (mailingTitleStyleType === type || uiStyleSettingsStore)) {
456
+ let globalContentStyle = uiStyleSettingsStore
457
+ ? uiStyleSettingsStore.textStyles.textStyleOptions[mailingTitleStyleType].style
458
+ : newStyle ?? {};
459
+ globalContentStyle = {
460
+ ...globalContentStyle,
461
+ textAlign: titleStyle.textAlign,
462
+ };
463
+ mailingListContent.title = getUpdatedHTMLFromEditor(externalEditor, mailingListContent.title, globalContentStyle);
464
+ }
465
+ else if (!mailingTitleStyleType &&
466
+ newContent &&
467
+ newContent.id === mailingListContent.id &&
468
+ !hasRTEContent(mailingListContent.title)) {
469
+ const newContentStyle = newContent.titleStyle || titleStyle;
470
+ mailingListContent.title = getUpdatedHTMLFromEditor(externalEditor, mailingListContent.title, newContentStyle);
471
+ }
472
+ break;
378
473
  }
379
474
  }
380
475
  }
@@ -501,6 +596,80 @@ export const switchAllContentToRTE = (uiPageSettingStore, externalEditor, uiStyl
501
596
  }
502
597
  }
503
598
  break;
599
+ case 'profile':
600
+ const profileContent = contentItem.settings.content;
601
+ const nameStyleType = profileContent.nameStyle.textStyleType;
602
+ const profileTitleStyleType = profileContent.titleStyle.textStyleType;
603
+ const profileDescriptionTextStyleType = profileContent.descriptionStyle.textStyleType;
604
+ if (nameStyleType && uiStyleSettingsStore) {
605
+ let globalContentStyle = uiStyleSettingsStore.textStyles
606
+ .textStyleOptions[nameStyleType].style;
607
+ globalContentStyle = {
608
+ ...globalContentStyle,
609
+ textAlign: profileContent.nameStyle.textAlign,
610
+ };
611
+ if (!hasRTEContent(profileContent.name))
612
+ profileContent.name = getUpdatedHTMLFromEditor(externalEditor, profileContent.name, globalContentStyle);
613
+ }
614
+ else if (!nameStyleType && !hasRTEContent(profileContent.name)) {
615
+ const newContentStyle = profileContent.nameStyle;
616
+ profileContent.name = getUpdatedHTMLFromEditor(externalEditor, profileContent.name, newContentStyle);
617
+ }
618
+ if (profileTitleStyleType && uiStyleSettingsStore) {
619
+ let globalContentStyle = uiStyleSettingsStore.textStyles
620
+ .textStyleOptions[profileTitleStyleType]
621
+ .style;
622
+ globalContentStyle = {
623
+ ...globalContentStyle,
624
+ textAlign: profileContent.titleStyle.textAlign,
625
+ };
626
+ if (!hasRTEContent(profileContent.title))
627
+ profileContent.title = getUpdatedHTMLFromEditor(externalEditor, profileContent.title, globalContentStyle);
628
+ }
629
+ else if (!profileTitleStyleType &&
630
+ !hasRTEContent(profileContent.title)) {
631
+ const newContentStyle = profileContent.titleStyle;
632
+ profileContent.title = getUpdatedHTMLFromEditor(externalEditor, profileContent.title, newContentStyle);
633
+ }
634
+ if (profileDescriptionTextStyleType && uiStyleSettingsStore) {
635
+ let globalContentStyle = uiStyleSettingsStore.textStyles
636
+ .textStyleOptions[profileDescriptionTextStyleType]
637
+ .style;
638
+ globalContentStyle = {
639
+ ...globalContentStyle,
640
+ textAlign: profileContent.descriptionStyle.textAlign,
641
+ };
642
+ if (!hasRTEContent(profileContent.description))
643
+ profileContent.description = getUpdatedHTMLFromEditor(externalEditor, profileContent.description, globalContentStyle);
644
+ }
645
+ else if (!profileDescriptionTextStyleType &&
646
+ !hasRTEContent(profileContent.description)) {
647
+ const newContentStyle = profileContent.descriptionStyle;
648
+ profileContent.description = getUpdatedHTMLFromEditor(externalEditor, profileContent.description, newContentStyle);
649
+ }
650
+ break;
651
+ case 'mailing-list':
652
+ const mailingListContent = contentItem.settings
653
+ .content;
654
+ const titleStyle = mailingListContent.titleStyle;
655
+ const titleStyleStyleType = titleStyle?.textStyleType;
656
+ if (titleStyleStyleType && uiStyleSettingsStore) {
657
+ let globalContentStyle = uiStyleSettingsStore.textStyles
658
+ .textStyleOptions[titleStyleStyleType]
659
+ .style;
660
+ globalContentStyle = {
661
+ ...globalContentStyle,
662
+ textAlign: mailingListContent.titleStyle.textAlign,
663
+ };
664
+ if (!hasRTEContent(mailingListContent.title))
665
+ mailingListContent.title = getUpdatedHTMLFromEditor(externalEditor, mailingListContent.title, globalContentStyle);
666
+ }
667
+ else if (!titleStyleStyleType &&
668
+ !hasRTEContent(mailingListContent.title)) {
669
+ const newContentStyle = mailingListContent.titleStyle;
670
+ mailingListContent.title = getUpdatedHTMLFromEditor(externalEditor, mailingListContent.title, newContentStyle);
671
+ }
672
+ break;
504
673
  }
505
674
  }
506
675
  }