@designcrowd/library.brand-page 5.10.19-sanitise-hyperlink-15 → 5.10.19

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 (164) hide show
  1. package/lib/src/brand-page/models/index.d.ts +0 -5
  2. package/lib/src/brand-page/models/index.js +0 -4
  3. package/lib/src/brand-page/utils/style.util.d.ts +1 -8
  4. package/lib/src/brand-page/utils/style.util.js +5 -58
  5. package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.js +1 -1
  6. package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/content-settings-items.fixture.js +0 -1
  7. package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/page-content-items.d.ts +1 -1
  8. package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/page-content-items.js +1 -2
  9. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +0 -33
  10. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.js +1 -35
  11. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +0 -1
  12. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.js +0 -17
  13. package/lib/src/brand-page-maker/composables/rich-text-editor/extensions/MaxLength.js +3 -3
  14. package/lib/src/brand-page-maker/composables/rich-text-editor/font.d.ts +1 -1
  15. package/lib/src/brand-page-maker/composables/rich-text-editor/font.js +1 -0
  16. package/lib/src/brand-page-maker/composables/rich-text-editor/formatting.d.ts +1 -1
  17. package/lib/src/brand-page-maker/composables/rich-text-editor/formatting.js +1 -0
  18. package/lib/src/brand-page-maker/composables/rich-text-editor/spacing.d.ts +1 -1
  19. package/lib/src/brand-page-maker/composables/rich-text-editor/spacing.js +1 -0
  20. package/lib/src/brand-page-maker/composables/rich-text-editor/textAlign.d.ts +1 -1
  21. package/lib/src/brand-page-maker/composables/rich-text-editor/textAlign.js +1 -0
  22. package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.d.ts +3 -24
  23. package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.js +33 -199
  24. package/lib/src/brand-page-maker/models/button-group.model.d.ts +0 -2
  25. package/lib/src/brand-page-maker/utils/rich-text-editor.util.d.ts +2 -19
  26. package/lib/src/brand-page-maker/utils/rich-text-editor.util.js +5 -333
  27. package/lib/src/bundled-translations.de-DE-CraYoDWg.js +117 -0
  28. package/lib/src/{bundled-translations.de-DE-DjQFwukR.js → bundled-translations.de-DE-O4sKkzBX.js} +1 -1
  29. package/lib/src/bundled-translations.es-ES-BYFsV_3B.js +117 -0
  30. package/lib/src/{bundled-translations.es-ES--EbGRI7e.js → bundled-translations.es-ES-C4lGaf08.js} +1 -1
  31. package/lib/src/{bundled-translations.fr-FR-VtC2JYUC.js → bundled-translations.fr-FR-CIy8KjAV.js} +1 -1
  32. package/lib/src/bundled-translations.fr-FR-DeAgOmt6.js +117 -0
  33. package/lib/src/{bundled-translations.pt-PT-l9cEldEo.js → bundled-translations.pt-PT-C8EcSdyX.js} +1 -1
  34. package/lib/src/bundled-translations.pt-PT-DUwBYmvH.js +117 -0
  35. package/lib/src/bundles/bundled-translations.de-DE.json +4 -4
  36. package/lib/src/bundles/bundled-translations.es-ES.json +7 -7
  37. package/lib/src/bundles/bundled-translations.fr-FR.json +7 -7
  38. package/lib/src/bundles/bundled-translations.pt-PT.json +2 -2
  39. package/lib/src/css/library.brand-page-brandCrowd.min.css +70 -96
  40. package/lib/src/css/library.brand-page-brandPage.min.css +70 -96
  41. package/lib/src/css/library.brand-page-designCom.min.css +70 -96
  42. package/lib/src/css/library.brand-page-preview.min.css +70 -96
  43. package/lib/src/index.d.ts +0 -1
  44. package/lib/src/index.mjs +27716 -30165
  45. package/lib/src/lib.js +0 -1
  46. package/lib/src/mockServiceWorker.js +54 -91
  47. package/lib/src/shared/content-settings/components/color-field/ColorField.mixin.d.ts +0 -11
  48. package/lib/src/shared/content-settings/components/color-field/ColorField.mixin.js +0 -5
  49. package/lib/src/shared/content-settings/components/page-dropdown-field/PageDropdownField.mixin.d.ts +1 -11
  50. package/lib/src/shared/content-settings/components/page-dropdown-field/PageDropdownField.mixin.js +0 -4
  51. package/lib/src/shared/content-settings/components/url-field/UrlField.mixin.d.ts +0 -2
  52. package/lib/src/shared/content-settings/components/url-field/UrlField.mixin.js +7 -12
  53. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +0 -2
  54. package/package.json +3 -6
  55. package/src/brand-page/components/banner-section/BannerSection.vue +0 -6
  56. package/src/brand-page/components/text/Text.vue +0 -2
  57. package/src/brand-page/components/text-wrapper/TextWrapper.vue +11 -31
  58. package/src/brand-page/models/index.ts +0 -6
  59. package/src/brand-page/utils/style.util.ts +5 -105
  60. package/src/brand-page-maker/components/action-bar/i18n/action-bar.de-DE.json +1 -1
  61. package/src/brand-page-maker/components/action-bar/i18n/action-bar.es-ES.json +1 -1
  62. package/src/brand-page-maker/components/action-bar/i18n/action-bar.fr-FR.json +1 -1
  63. package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.ts +1 -1
  64. package/src/brand-page-maker/components/brand-page-maker/__fixtures__/content-settings-items.fixture.ts +0 -1
  65. package/src/brand-page-maker/components/brand-page-maker/__fixtures__/page-content-items.ts +0 -2
  66. package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.ts +1 -44
  67. package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.vue +0 -1
  68. package/src/brand-page-maker/components/brandpage-settings/i18n/brand-page-settings.fr-FR.json +1 -1
  69. package/src/brand-page-maker/components/brandpage-settings/i18n/brand-page-settings.pt-PT.json +1 -1
  70. package/src/brand-page-maker/components/quick-link-bar/i18n/quick-link-bar.de-DE.json +4 -4
  71. package/src/brand-page-maker/components/quick-link-bar/i18n/quick-link-bar.es-ES.json +4 -4
  72. package/src/brand-page-maker/components/quick-link-bar/i18n/quick-link-bar.fr-FR.json +4 -4
  73. package/src/brand-page-maker/components/quick-link-bar/i18n/quick-link-bar.pt-PT.json +4 -4
  74. package/src/brand-page-maker/components/rich-text-editor/RichTextEditor.vue +50 -548
  75. package/src/brand-page-maker/components/sensitive-content/i18n/sensitive-settings.de-DE.json +4 -4
  76. package/src/brand-page-maker/components/sensitive-content/i18n/sensitive-settings.es-ES.json +4 -4
  77. package/src/brand-page-maker/components/sensitive-content/i18n/sensitive-settings.fr-FR.json +4 -4
  78. package/src/brand-page-maker/components/sensitive-content/i18n/sensitive-settings.pt-PT.json +4 -4
  79. package/src/brand-page-maker/components/seo-settings/i18n/existing-domain-modal.de-DE.json +12 -12
  80. package/src/brand-page-maker/components/seo-settings/i18n/existing-domain-modal.es-ES.json +12 -12
  81. package/src/brand-page-maker/components/seo-settings/i18n/existing-domain-modal.fr-FR.json +12 -12
  82. package/src/brand-page-maker/components/seo-settings/i18n/existing-domain-modal.pt-PT.json +12 -12
  83. package/src/brand-page-maker/components/social-share/i18n/social-share.de-DE.json +8 -8
  84. package/src/brand-page-maker/components/social-share/i18n/social-share.es-ES.json +8 -8
  85. package/src/brand-page-maker/components/social-share/i18n/social-share.fr-FR.json +8 -8
  86. package/src/brand-page-maker/components/social-share/i18n/social-share.pt-PT.json +8 -8
  87. package/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.ts +0 -22
  88. package/src/brand-page-maker/components/template-preview/TemplatePreview.vue +1 -1
  89. package/src/brand-page-maker/composables/rich-text-editor/extensions/MaxLength.test.ts +1 -1
  90. package/src/brand-page-maker/composables/rich-text-editor/extensions/MaxLength.ts +15 -4
  91. package/src/brand-page-maker/composables/rich-text-editor/font.ts +1 -1
  92. package/src/brand-page-maker/composables/rich-text-editor/formatting.ts +1 -1
  93. package/src/brand-page-maker/composables/rich-text-editor/spacing.ts +1 -1
  94. package/src/brand-page-maker/composables/rich-text-editor/textAlign.ts +1 -1
  95. package/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.ts +41 -280
  96. package/src/brand-page-maker/constants/i18n/constants.es-ES.json +3 -3
  97. package/src/brand-page-maker/convertors/i18n/converter.de-DE.json +23 -23
  98. package/src/brand-page-maker/convertors/i18n/converter.es-ES.json +23 -23
  99. package/src/brand-page-maker/convertors/i18n/converter.fr-FR.json +23 -23
  100. package/src/brand-page-maker/convertors/i18n/converter.pt-PT.json +23 -23
  101. package/src/brand-page-maker/models/button-group.model.ts +0 -2
  102. package/src/brand-page-maker/models/i18n/models.es-ES.json +1 -1
  103. package/src/brand-page-maker/stores/brandpage-maker/__snapshots__/brandpage-maker-store.test.ts.snap +0 -1
  104. package/src/brand-page-maker/utils/rich-text-editor.util.test.ts +0 -418
  105. package/src/brand-page-maker/utils/rich-text-editor.util.ts +10 -451
  106. package/src/bundles/bundled-translations.de-DE.json +4 -4
  107. package/src/bundles/bundled-translations.es-ES.json +7 -7
  108. package/src/bundles/bundled-translations.fr-FR.json +7 -7
  109. package/src/bundles/bundled-translations.pt-PT.json +2 -2
  110. package/src/lib.ts +0 -1
  111. package/src/shared/color-picker/components/i18n/color-picker.de-DE.json +5 -5
  112. package/src/shared/color-picker/components/i18n/color-picker.es-ES.json +5 -5
  113. package/src/shared/color-picker/components/i18n/color-picker.fr-FR.json +5 -5
  114. package/src/shared/color-picker/components/i18n/color-picker.pt-PT.json +5 -5
  115. package/src/shared/common/i18n/common.de-DE.json +47 -47
  116. package/src/shared/common/i18n/common.es-ES.json +46 -46
  117. package/src/shared/common/i18n/common.fr-FR.json +46 -46
  118. package/src/shared/common/i18n/common.pt-PT.json +46 -46
  119. package/src/shared/common/i18n/error.de-DE.json +25 -25
  120. package/src/shared/common/i18n/error.es-ES.json +25 -25
  121. package/src/shared/common/i18n/error.fr-FR.json +25 -25
  122. package/src/shared/common/i18n/error.pt-PT.json +25 -25
  123. package/src/shared/content-settings/components/color-field/ColorField.mixin.ts +0 -5
  124. package/src/shared/content-settings/components/color-field/ColorField.vue +1 -1
  125. package/src/shared/content-settings/components/links-field/i18n/links-field.de-DE.json +1 -1
  126. package/src/shared/content-settings/components/links-field/i18n/links-field.fr-FR.json +1 -1
  127. package/src/shared/content-settings/components/logo-selection-field/i18n/logo-selection.de-DE.json +5 -5
  128. package/src/shared/content-settings/components/logo-selection-field/i18n/logo-selection.es-ES.json +5 -5
  129. package/src/shared/content-settings/components/logo-selection-field/i18n/logo-selection.fr-FR.json +5 -5
  130. package/src/shared/content-settings/components/logo-selection-field/i18n/logo-selection.pt-PT.json +5 -5
  131. package/src/shared/content-settings/components/page-dropdown-field/PageDropdownField.mixin.ts +0 -4
  132. package/src/shared/content-settings/components/page-dropdown-field/PageDropdownField.vue +2 -2
  133. package/src/shared/content-settings/components/payment-config-field/i18n/payment-config.pt-PT.json +16 -16
  134. package/src/shared/content-settings/components/testimonial-items-field/i18n/testimonial-items-field.fr-FR.json +1 -1
  135. package/src/shared/content-settings/components/text-field/TextField.vue +1 -1
  136. package/src/shared/content-settings/components/text-items-field/TextItemsField.vue +2 -2
  137. package/src/shared/content-settings/components/textarea-field/TextareaField.vue +3 -3
  138. package/src/shared/content-settings/components/url-field/UrlField.mixin.ts +10 -15
  139. package/src/shared/content-settings/components/url-field/UrlField.vue +0 -1
  140. package/src/shared/my-uploads/i18n/my-uploads.de-DE.json +7 -7
  141. package/src/shared/my-uploads/i18n/my-uploads.es-ES.json +7 -7
  142. package/src/shared/my-uploads/i18n/my-uploads.fr-FR.json +7 -7
  143. package/src/shared/my-uploads/i18n/my-uploads.pt-PT.json +7 -7
  144. package/src/shared/publish-brand-page-with-state/i18n/publish-brand-page-modal-with-state.de-DE.json +5 -5
  145. package/src/shared/publish-brand-page-with-state/i18n/publish-brand-page-modal-with-state.es-ES.json +5 -5
  146. package/src/shared/publish-brand-page-with-state/i18n/publish-brand-page-modal-with-state.fr-FR.json +5 -5
  147. package/src/shared/publish-brand-page-with-state/i18n/publish-brand-page-modal-with-state.pt-PT.json +5 -5
  148. package/src/shared/style-settings/components/i18n/style-settings.de-DE.json +19 -19
  149. package/src/shared/style-settings/components/i18n/style-settings.es-ES.json +19 -19
  150. package/src/shared/style-settings/components/i18n/style-settings.fr-FR.json +19 -19
  151. package/src/shared/style-settings/components/i18n/style-settings.pt-PT.json +19 -19
  152. package/lib/src/brand-page-maker/composables/rich-text-editor/bubbleMenu.d.ts +0 -19
  153. package/lib/src/brand-page-maker/composables/rich-text-editor/bubbleMenu.js +0 -31
  154. package/lib/src/brand-page-maker/composables/rich-text-editor/extensions/AutoLink.d.ts +0 -2
  155. package/lib/src/brand-page-maker/composables/rich-text-editor/extensions/AutoLink.js +0 -161
  156. package/lib/src/brand-page-maker/composables/rich-text-editor/hyperlink.d.ts +0 -19
  157. package/lib/src/brand-page-maker/composables/rich-text-editor/hyperlink.js +0 -87
  158. package/lib/src/bundled-translations.de-DE-sdRaZX_a.js +0 -117
  159. package/lib/src/bundled-translations.es-ES-BoYtagqP.js +0 -117
  160. package/lib/src/bundled-translations.fr-FR-CX5c0o6i.js +0 -117
  161. package/lib/src/bundled-translations.pt-PT-Balnne-7.js +0 -117
  162. package/src/brand-page-maker/composables/rich-text-editor/bubbleMenu.ts +0 -42
  163. package/src/brand-page-maker/composables/rich-text-editor/extensions/AutoLink.ts +0 -227
  164. package/src/brand-page-maker/composables/rich-text-editor/hyperlink.ts +0 -114
@@ -207,11 +207,6 @@ export declare const BUTTON_LINK_TYPE: {
207
207
  readonly tel: "tel";
208
208
  };
209
209
  export type ButtonLinkType = keyof typeof BUTTON_LINK_TYPE;
210
- export declare const HYPERLINK_TYPE: {
211
- readonly url: "url";
212
- readonly page: "page";
213
- };
214
- export type HyperlinkType = keyof typeof HYPERLINK_TYPE;
215
210
  export declare const URL_TYPE: {
216
211
  readonly url: "url";
217
212
  readonly email: "email";
@@ -136,10 +136,6 @@ export const BUTTON_LINK_TYPE = {
136
136
  mailTo: 'mailTo',
137
137
  tel: 'tel',
138
138
  };
139
- export const HYPERLINK_TYPE = {
140
- url: 'url',
141
- page: 'page',
142
- };
143
139
  export const URL_TYPE = {
144
140
  url: 'url',
145
141
  email: 'email',
@@ -1,13 +1,6 @@
1
- import type { BrandPageModel, LogoTheme, ThemeColor, FabricLogoTheme, ButtonStyles, PageModel } from '../models';
1
+ import type { BrandPageModel, LogoTheme, FabricLogoTheme, ButtonStyles, PageModel } from '../models';
2
2
  import { NavigationDesktop, NavigationMobile } from '../models';
3
3
  import { PageStyles, PageHeaderMobile, PageHeaderDesktop, PageFooterMobile, PageFooterDesktop } from '../models';
4
- /**
5
- * @function getColorValueForCorrectCssProperty
6
- * @param k: string
7
- * @param colorData { rgb: 'rgb(0,255,0)', gradient: 'linear-gradient(180deg, rgb(0,0,0), rgb(255,0,0), 100%)'}
8
- * @returns string - rgb() or linear-gradient()
9
- */
10
- export declare const getColorValueForCorrectCssProperty: (k: string, colorData: ThemeColor) => string;
11
4
  export declare const colorMatchCssKeyValue: (cssKey: string, cssValue: string, logoTheme: LogoTheme, applyColorWithMatchingLuminance?: {
12
5
  originalColor: string;
13
6
  }) => {
@@ -4,7 +4,6 @@ import { STYLE_THEME_KEYS } from '../constants';
4
4
  import { arrayToLinearGradient, linearGradientToArray, isColorLinearGradient, RGBAtoHex, } from '../../utils/helpers';
5
5
  import { addTransparentAlphaChannelToHex, calculateLuminanceRatio, getNewColorBasedOnTargetColorTheme, } from './color.util';
6
6
  import chroma from 'chroma-js';
7
- import { hasRTEContent } from '../../brand-page-maker/utils';
8
7
  const MIN_LUM_RATIO = 0.3;
9
8
  const parseFabricColorToCssStyle = (fabricColor) => {
10
9
  if (fabricColor && typeof fabricColor === 'object') {
@@ -26,7 +25,7 @@ const parseFabricColorToCssStyle = (fabricColor) => {
26
25
  * @param colorData { rgb: 'rgb(0,255,0)', gradient: 'linear-gradient(180deg, rgb(0,0,0), rgb(255,0,0), 100%)'}
27
26
  * @returns string - rgb() or linear-gradient()
28
27
  */
29
- export const getColorValueForCorrectCssProperty = (k, colorData) => {
28
+ const getColorValueForCorrectCssProperty = (k, colorData) => {
30
29
  const gradientSupportedCssProperties = ['background', 'backgroundImage'];
31
30
  return colorData.gradient && gradientSupportedCssProperties.indexOf(k) > -1
32
31
  ? colorData.gradient
@@ -50,15 +49,13 @@ export const colorMatchCssKeyValue = (cssKey, cssValue, logoTheme, applyColorWit
50
49
  return { cssValue: newColor, isModified: true };
51
50
  }
52
51
  }
53
- if ((cssValue.match(new RegExp(STYLE_THEME_KEYS.LogoTextColor, 'g')) ||
54
- cssValue.match(new RegExp(STYLE_THEME_KEYS.LogoTextMultiColor, 'g'))) &&
55
- !hasRTEContent(cssValue)) {
52
+ if (cssValue.match(new RegExp(STYLE_THEME_KEYS.LogoTextColor, 'g')) ||
53
+ cssValue.match(new RegExp(STYLE_THEME_KEYS.LogoTextMultiColor, 'g'))) {
56
54
  cssValue = getColorValueForCorrectCssProperty(cssKey, logoTheme.logoTextColor);
57
55
  return { cssValue, isModified: true };
58
56
  }
59
- else if ((cssValue.match(new RegExp(STYLE_THEME_KEYS.LogoBackgroundColor, 'g')) ||
60
- cssValue.match(new RegExp(STYLE_THEME_KEYS.LogoBackgroundMultiColor, 'g'))) &&
61
- !hasRTEContent(cssValue)) {
57
+ else if (cssValue.match(new RegExp(STYLE_THEME_KEYS.LogoBackgroundColor, 'g')) ||
58
+ cssValue.match(new RegExp(STYLE_THEME_KEYS.LogoBackgroundMultiColor, 'g'))) {
62
59
  cssValue = getColorValueForCorrectCssProperty(cssKey, logoTheme.logoBackgroundColor);
63
60
  return { cssValue, isModified: true };
64
61
  }
@@ -199,8 +196,6 @@ const CONTENT_STYLE_PROP_NAME_SUFFIX = [
199
196
  'Color',
200
197
  'Replacements',
201
198
  ];
202
- const RTE_ALLOWED_SECTION_TYPES = ['text', 'banner-section'];
203
- const RTE_ALLOWED_FIELDS = ['title', 'description', 'text', 'textItems'];
204
199
  export const applyLogoThemeToContents = (logoTheme, pages) => {
205
200
  let isModified = false;
206
201
  const newPages = pages.map((page) => {
@@ -216,60 +211,12 @@ export const applyLogoThemeToContents = (logoTheme, pages) => {
216
211
  newContent[styleKey] = newStyle;
217
212
  isModified = isModified || isApplied;
218
213
  }
219
- const rteContentKeys = RTE_ALLOWED_SECTION_TYPES.includes(content.type)
220
- ? Object.keys(content).filter((k) => RTE_ALLOWED_FIELDS.includes(k))
221
- : [];
222
- for (const key of rteContentKeys) {
223
- const { newRTEContent, isApplied } = applyLogoThemeToBrandPageRTEContentColorsRecursive(newContent[key], logoTheme, isModified);
224
- newContent[key] = newRTEContent;
225
- isModified = isModified || isApplied;
226
- }
227
214
  return newContent;
228
215
  });
229
216
  return { ...page, contents: newContents };
230
217
  });
231
218
  return { pages: newPages, isModified };
232
219
  };
233
- const applyLogoThemeToBrandPageRTEContentColorsRecursive = (content, logoTheme, isModified) => {
234
- let isApplied = false;
235
- let newRTEContent = {};
236
- if (typeof content === 'string' && hasRTEContent(content)) {
237
- newRTEContent = replaceRTEContentColors(content, logoTheme);
238
- isApplied = true;
239
- }
240
- else if (Array.isArray(content)) {
241
- newRTEContent = content.map((item) => {
242
- const { newRTEContent: recursiveContent, isApplied: recursiveIsApplied } = applyLogoThemeToBrandPageRTEContentColorsRecursive(item, logoTheme, isModified);
243
- isApplied = recursiveIsApplied;
244
- return recursiveContent;
245
- });
246
- }
247
- else if (typeof content === 'object') {
248
- for (const [key, value] of Object.entries(content)) {
249
- if (RTE_ALLOWED_FIELDS.includes(key) &&
250
- typeof value === 'string' &&
251
- hasRTEContent(value)) {
252
- newRTEContent[key] = replaceRTEContentColors(value, logoTheme);
253
- isApplied = true;
254
- }
255
- else {
256
- newRTEContent[key] = value;
257
- }
258
- }
259
- }
260
- else {
261
- newRTEContent = content;
262
- isApplied = false;
263
- }
264
- return { isApplied, newRTEContent };
265
- };
266
- const replaceRTEContentColors = (content, logoTheme) => {
267
- return content
268
- .replace(new RegExp(`var\\(--${STYLE_THEME_KEYS.LogoTextColor}\\)`, 'g'), logoTheme.logoTextColor.rgb)
269
- .replace(new RegExp(`var\\(--${STYLE_THEME_KEYS.LogoBackgroundColor}\\)`, 'g'), logoTheme.logoBackgroundColor.rgb)
270
- .replace(new RegExp(`var\\(--${STYLE_THEME_KEYS.LogoTextMultiColor}\\)`, 'g'), logoTheme.logoTextColor.rgb)
271
- .replace(new RegExp(`var\\(--${STYLE_THEME_KEYS.LogoBackgroundMultiColor}\\)`, 'g'), logoTheme.logoBackgroundColor.rgb);
272
- };
273
220
  export const applyLogoThemeToBrandPageStyles = (logoTheme, pageStyles) => {
274
221
  let isModified = false;
275
222
  const newStyle = new PageStyles();
@@ -171,7 +171,7 @@ export const BRAND_SITE = {
171
171
  color: 'logo-text-color',
172
172
  fontSize: '1.5rem',
173
173
  textAlign: 'center',
174
- fontFamily: 'Exo 2',
174
+ fontFamily: 'Nunito',
175
175
  lineHeight: '2rem',
176
176
  },
177
177
  colorReplacements: [
@@ -43,7 +43,6 @@ export const textContent = {
43
43
  textSize: {},
44
44
  textStyle: {
45
45
  textAlign: DEFAULT_TEXT_ALIGN,
46
- fontSize: '2em',
47
46
  },
48
47
  textAlignment: {},
49
48
  textColor: {},
@@ -1,2 +1,2 @@
1
- export declare const brandPageContentsSampleData: (import("../../../../brand-page").ButtonContent | import("../../../../brand-page").ProfileContent | import("../../../../brand-page").TextContent | import("../../../../brand-page").LogoContent)[];
1
+ export declare const brandPageContentsSampleData: (import("../../../../brand-page").ButtonContent | import("../../../../brand-page").ProfileContent | import("../../../../brand-page").LogoContent)[];
2
2
  export declare const brandPageContentsSampleDataStarterKit: (import("../../../../brand-page").ButtonContent | import("../../../../brand-page").ProfileContent | import("../../../../brand-page").LogoContent)[];
@@ -1,8 +1,7 @@
1
- import { logoContent, profileContent, generalLink, facebookLink, websiteLink, emailLink, phoneLink, twitterLink, instagramLink, youtubeLink, linkedinLink, pinterestLink, twitchLink, tiktokLink, textContent, } from './content-settings-items.fixture';
1
+ import { logoContent, profileContent, generalLink, facebookLink, websiteLink, emailLink, phoneLink, twitterLink, instagramLink, youtubeLink, linkedinLink, pinterestLink, twitchLink, tiktokLink, } from './content-settings-items.fixture';
2
2
  export const brandPageContentsSampleData = [
3
3
  logoContent,
4
4
  profileContent,
5
- textContent,
6
5
  generalLink,
7
6
  websiteLink,
8
7
  emailLink,
@@ -37,38 +37,6 @@ declare const _default: import("vue").DefineComponent<{}, {
37
37
  selectedTemplateId: import("vue").ComputedRef<string | false>;
38
38
  canUseRichTextEditor: import("vue").ComputedRef<boolean>;
39
39
  isAdmin: import("vue").ComputedRef<boolean>;
40
- logoTheme: import("vue").ComputedRef<{
41
- logoTextColor: {
42
- rgb: string;
43
- gradient?: string | undefined;
44
- 50?: string | undefined;
45
- 100?: string | undefined;
46
- 200?: string | undefined;
47
- 300?: string | undefined;
48
- 400?: string | undefined;
49
- 500?: string | undefined;
50
- 600?: string | undefined;
51
- 700?: string | undefined;
52
- 800?: string | undefined;
53
- 900?: string | undefined;
54
- 950?: string | undefined;
55
- };
56
- logoBackgroundColor: {
57
- rgb: string;
58
- gradient?: string | undefined;
59
- 50?: string | undefined;
60
- 100?: string | undefined;
61
- 200?: string | undefined;
62
- 300?: string | undefined;
63
- 400?: string | undefined;
64
- 500?: string | undefined;
65
- 600?: string | undefined;
66
- 700?: string | undefined;
67
- 800?: string | undefined;
68
- 900?: string | undefined;
69
- 950?: string | undefined;
70
- };
71
- }>;
72
40
  contentSettingsStore: import("pinia").Store<"uiContentSettings", import("../../../shared/content-settings/store").ContentSettingsState, {
73
41
  contentErrorCount(): number;
74
42
  getContent(state: {
@@ -1062,7 +1030,6 @@ declare const _default: import("vue").DefineComponent<{}, {
1062
1030
  };
1063
1031
  isDraggableEnabled(): boolean;
1064
1032
  isItemSelected(): (itemIdx: any) => boolean;
1065
- styleHtml(): string;
1066
1033
  }, {
1067
1034
  dispatchViewPortChangeEvent(): void;
1068
1035
  onDraggingStart(): void;
@@ -14,7 +14,6 @@ import debounce from 'lodash.debounce';
14
14
  import { transformToRTE } 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
- import { STYLE_THEME_KEYS } from '../../../brand-page/constants';
18
17
  export default defineComponent({
19
18
  mixins: [PageMixin],
20
19
  setup() {
@@ -41,7 +40,6 @@ export default defineComponent({
41
40
  selectedTemplateId: computed(() => brandPageMakerStore.selectedTemplateId),
42
41
  canUseRichTextEditor: computed(() => brandPageMakerUserStore.features.canUseRichTextEditor),
43
42
  isAdmin: computed(() => brandPageMakerUserStore.isAdmin),
44
- logoTheme: computed(() => uiStore.logoTheme),
45
43
  contentSettingsStore,
46
44
  brandPageMakerStore,
47
45
  brandPageContainerStore,
@@ -99,31 +97,6 @@ export default defineComponent({
99
97
  return this.isContentSelected ? item.id === this.selectedItemId : false;
100
98
  };
101
99
  },
102
- styleHtml() {
103
- if (!this.logoTheme) {
104
- return '';
105
- }
106
- // Generate CSS variables for logo theme colors
107
- const cssVariables = Object.entries(STYLE_THEME_KEYS)
108
- .map(([key, value]) => {
109
- const themeColor = key.includes('Background')
110
- ? this.logoTheme.logoBackgroundColor
111
- : this.logoTheme.logoTextColor;
112
- if (themeColor?.rgb) {
113
- return `--${value}: ${themeColor.rgb};`;
114
- }
115
- return '';
116
- })
117
- .filter(Boolean)
118
- .join('\n ');
119
- return cssVariables
120
- ? `<style>
121
- :root {
122
- ${cssVariables}
123
- }
124
- </style>`
125
- : '';
126
- },
127
100
  },
128
101
  mounted() {
129
102
  this.dispatchViewPortChangeEvent();
@@ -207,14 +180,7 @@ export default defineComponent({
207
180
  this.isContentSelected = true;
208
181
  if ((item.type === 'banner-section' || item.type === 'text') &&
209
182
  this.canUseRichTextEditor) {
210
- let selectedItem = item;
211
- if (this.isAdmin) {
212
- const currentItem = this.items.find((i) => i.id === item.id);
213
- if (currentItem) {
214
- selectedItem = currentItem.settings.content;
215
- }
216
- }
217
- transformToRTE(this.pageSettingsStore, this.externalEditor, this.styleSettingsStore, selectedItem);
183
+ transformToRTE(this.pageSettingsStore, this.externalEditor, this.styleSettingsStore, item);
218
184
  }
219
185
  if (this.selectEventDebounceHandler) {
220
186
  this.selectEventDebounceHandler();
@@ -185,7 +185,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
185
185
  scaledContainerStyle(): BrandPageCssStyle;
186
186
  innerContainerStyle(): BrandPageCssStyle;
187
187
  isPersonalisable(): boolean;
188
- cssVariablesStyle(): Record<string, string>;
189
188
  }, {
190
189
  onOverlayClicked(): void;
191
190
  onResize(): void;
@@ -1,7 +1,6 @@
1
1
  import { computed, defineComponent } from 'vue';
2
2
  import { BRAND_PAGE_TYPES, MEDIA_SIZES, VIEWPORTS } from '../../../brand-page';
3
3
  import { applyLogoThemeToBrandPageModel, applyUserPersonalisationToBrandPageModelAsync, getBrandPageViewModelFromBrandPageModel, } from '../../../brand-page/utils';
4
- import { STYLE_THEME_KEYS } from '../../../brand-page/constants';
5
4
  import debounce from 'lodash.debounce';
6
5
  import { MOBILE_HEIGHT, MOBILE_WIDTH } from '../../constants';
7
6
  import { useBrandPageMakerStore } from '../../stores';
@@ -129,22 +128,6 @@ export default defineComponent({
129
128
  isPersonalisable() {
130
129
  return this.template.isPersonalisable || false;
131
130
  },
132
- cssVariablesStyle() {
133
- if (!this.logoTheme) {
134
- return {};
135
- }
136
- const cssVariables = {};
137
- // Generate CSS variables for logo theme colors
138
- Object.entries(STYLE_THEME_KEYS).forEach(([key, value]) => {
139
- const themeColor = key.includes('Background')
140
- ? this.logoTheme.logoBackgroundColor
141
- : this.logoTheme.logoTextColor;
142
- if (themeColor?.rgb) {
143
- cssVariables[`--${value}`] = themeColor.rgb;
144
- }
145
- });
146
- return cssVariables;
147
- },
148
131
  },
149
132
  watch: {
150
133
  logoTheme: {
@@ -42,7 +42,7 @@ export const MaxLength = Extension.create({
42
42
  const text = node.text ?? '';
43
43
  const piece = text.slice(0, remaining);
44
44
  if (piece.length > 0) {
45
- nodes.push(node.type.schema.text(piece, node.marks));
45
+ nodes.push(node.type.create(node.attrs, node.type.schema.text(piece), node.marks));
46
46
  remaining -= piece.length;
47
47
  }
48
48
  }
@@ -64,7 +64,7 @@ export const MaxLength = Extension.create({
64
64
  const piece = (subNode.text ?? '').slice(0, remaining);
65
65
  if (piece.length === 0)
66
66
  return null;
67
- const newText = subNode.type.schema.text(piece, subNode.marks);
67
+ const newText = subNode.type.create(subNode.attrs, subNode.type.schema.text(piece), subNode.marks);
68
68
  remaining -= piece.length;
69
69
  return newText;
70
70
  }
@@ -77,7 +77,7 @@ export const MaxLength = Extension.create({
77
77
  });
78
78
  if (children.length === 0)
79
79
  return null;
80
- return subNode.copy(Fragment.fromArray(children));
80
+ return subNode.type.create(subNode.attrs, Fragment.fromArray(children), subNode.marks);
81
81
  }
82
82
  return null;
83
83
  };
@@ -1,5 +1,5 @@
1
1
  import { type Ref } from 'vue';
2
- import type { Editor } from '@tiptap/vue-3';
2
+ import { Editor } from '@tiptap/vue-3';
3
3
  interface DropdownRef {
4
4
  hideMenu: () => void;
5
5
  }
@@ -1,4 +1,5 @@
1
1
  import { ref } from 'vue';
2
+ import { Editor } from '@tiptap/vue-3';
2
3
  import { emToPx, pxToEm, skipStyleDetection, } from '../../../brand-page-maker/utils';
3
4
  import debounce from 'lodash/debounce';
4
5
  export const useFont = (editor, fontSettings, dropdownRef) => {
@@ -1,4 +1,4 @@
1
- import type { Editor } from '@tiptap/vue-3';
1
+ import { Editor } from '@tiptap/vue-3';
2
2
  export declare const createFormattingActions: (editor: Editor) => {
3
3
  toggleBold: () => boolean;
4
4
  toggleItalic: () => boolean;
@@ -1,3 +1,4 @@
1
+ import { Editor } from '@tiptap/vue-3';
1
2
  import { skipStyleDetection } from '../../../brand-page-maker/utils';
2
3
  export const createFormattingActions = (editor) => {
3
4
  return {
@@ -1,4 +1,4 @@
1
- import type { Editor } from '@tiptap/vue-3';
1
+ import { Editor } from '@tiptap/vue-3';
2
2
  export declare const useSpacing: (editor: Editor) => {
3
3
  letterSpacingValue: import("vue").WritableComputedRef<string, string>;
4
4
  lineHeightValue: import("vue").WritableComputedRef<string, string>;
@@ -1,4 +1,5 @@
1
1
  import { ref, computed } from 'vue';
2
+ import { Editor } from '@tiptap/vue-3';
2
3
  import debounce from 'lodash/debounce';
3
4
  import { letterSpacingValueConvertor } from '../../../brand-page-maker/convertors';
4
5
  import { skipStyleDetection } from '../../../brand-page-maker/utils';
@@ -1,4 +1,4 @@
1
- import type { Editor } from '@tiptap/vue-3';
1
+ import { Editor } from '@tiptap/vue-3';
2
2
  export declare const useTextAlign: (editor: Editor) => {
3
3
  currentAlignment: import("vue").ComputedRef<{
4
4
  icon: string;
@@ -1,4 +1,5 @@
1
1
  import { ref, computed } from 'vue';
2
+ import { Editor } from '@tiptap/vue-3';
2
3
  import { skipStyleDetection } from '../../../brand-page-maker/utils';
3
4
  export const useTextAlign = (editor) => {
4
5
  const alignmentSettings = {
@@ -1,8 +1,7 @@
1
1
  import { type ModelRef, type ComputedRef, type Ref, type WritableComputedRef } from 'vue';
2
2
  import { Editor } from '@tiptap/vue-3';
3
3
  import type { StyleTextFontFamilyOption } from '../../../shared/style-settings/models';
4
- import type { TextStyles } from '../../../brand-page';
5
- import { type TextItem, type TextStyleDeclaration } from '../../../brand-page';
4
+ import { TextStyles, type TextItem, type TextStyleDeclaration } from '../../../brand-page';
6
5
  import type { ButtonGroupOption } from '../../../brand-page-maker/models/button-group.model';
7
6
  interface UseRichTextEditorReturn {
8
7
  editor: Editor;
@@ -29,32 +28,12 @@ interface UseRichTextEditorReturn {
29
28
  setInitialStyleSettings: (selectedTextStyle?: BrandPageCssStyle) => void;
30
29
  copyGlobalStyleSettings: (selectedTextStyle?: BrandPageCssStyle) => void;
31
30
  unsetAllMarks: () => void;
32
- handleHyperlink: (action: 'toggle' | 'apply' | 'remove', data?: {
33
- href?: string;
34
- text?: string;
35
- }) => void;
36
- hyperlinkValue: ComputedRef<{
37
- id: string;
38
- name: string;
39
- value: string;
40
- }>;
41
- setHyperlinkUrlValue: (url: string) => void;
42
- shouldShow: ({ editor, state }: {
43
- editor: any;
44
- state: any;
45
- }) => boolean;
46
- tippyOptions: Record<string, any>;
47
- handleAdminColorChange: (color: {
48
- id: string;
49
- name: string;
50
- value: string;
51
- }, type: 'textColor' | 'backgroundColor') => void;
52
31
  }
53
32
  interface DropdownInstance {
54
33
  hideMenu: () => void;
55
34
  }
56
35
  interface EditorOptionType {
57
- type: 'hyperlink' | 'fontFamily' | 'fontSize' | 'fontWeight' | 'fontStyle' | 'textDecorationLine' | 'textDecorationStrike' | 'textColor' | 'backgroundColor' | 'lineHeight' | 'letterSpacing' | 'textAlign';
36
+ type: 'fontFamily' | 'fontSize' | 'fontWeight' | 'fontStyle' | 'textDecorationLine' | 'textDecorationStrike' | 'textColor' | 'backgroundColor' | 'lineHeight' | 'letterSpacing' | 'textAlign';
58
37
  value: string | StyleTextFontFamilyOption;
59
38
  }
60
39
  export declare const useExternalRichTextEditor: () => {
@@ -77,5 +56,5 @@ export declare const useRichTextEditor: (model: ModelRef<any>, props: {
77
56
  selectedFontSizePx: number;
78
57
  selectedTextColor: string;
79
58
  selectedBackgroundColor: string;
80
- }, fontStyleDropdownRef: Ref<DropdownInstance | undefined, DropdownInstance | undefined>, selectedGlobalTextStyles: WritableComputedRef<TextStyles, string>, onSelectTextStyleType: (option: ButtonGroupOption) => void, updateRichTextEditor: Ref<boolean>, textStyleTypeOptions: ButtonGroupOption[], markedText: Ref<string>, isHyperlinkPopupOpen: Ref<boolean>) => UseRichTextEditorReturn;
59
+ }, fontStyleDropdownRef: Ref<DropdownInstance | undefined, DropdownInstance | undefined>, selectedGlobalTextStyles: WritableComputedRef<TextStyles, string>, onSelectTextStyleType: (option: ButtonGroupOption) => void, updateRichTextEditor: Ref<boolean>, textStyleTypeOptions: ButtonGroupOption[]) => UseRichTextEditorReturn;
81
60
  export {};