@designcrowd/library.brand-page 5.10.11-sanitise-hyperlink-14 → 5.10.11
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.
- package/lib/src/brand-page/models/index.d.ts +0 -5
- package/lib/src/brand-page/models/index.js +0 -4
- package/lib/src/brand-page/utils/style.util.d.ts +1 -8
- package/lib/src/brand-page/utils/style.util.js +5 -58
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +11 -11
- package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.js +10 -9
- package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/content-settings-items.fixture.js +0 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/page-content-items.d.ts +1 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/page-content-items.js +1 -2
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +14 -47
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.js +1 -35
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +0 -1
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.js +0 -17
- package/lib/src/brand-page-maker/composables/rich-text-editor/extensions/MaxLength.js +3 -3
- package/lib/src/brand-page-maker/composables/rich-text-editor/font.d.ts +1 -1
- package/lib/src/brand-page-maker/composables/rich-text-editor/font.js +1 -0
- package/lib/src/brand-page-maker/composables/rich-text-editor/formatting.d.ts +1 -1
- package/lib/src/brand-page-maker/composables/rich-text-editor/formatting.js +1 -0
- package/lib/src/brand-page-maker/composables/rich-text-editor/spacing.d.ts +1 -1
- package/lib/src/brand-page-maker/composables/rich-text-editor/spacing.js +1 -0
- package/lib/src/brand-page-maker/composables/rich-text-editor/textAlign.d.ts +1 -1
- package/lib/src/brand-page-maker/composables/rich-text-editor/textAlign.js +1 -0
- package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.d.ts +3 -24
- package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.js +33 -199
- package/lib/src/brand-page-maker/composables/useEventTracker.d.ts +0 -3
- package/lib/src/brand-page-maker/composables/useEventTracker.js +0 -3
- package/lib/src/brand-page-maker/models/button-group.model.d.ts +0 -2
- package/lib/src/brand-page-maker/utils/rich-text-editor.util.d.ts +2 -19
- package/lib/src/brand-page-maker/utils/rich-text-editor.util.js +5 -333
- package/lib/src/composables/useTranslate.js +10 -10
- package/lib/src/css/library.brand-page-brandCrowd.min.css +76 -103
- package/lib/src/css/library.brand-page-brandPage.min.css +76 -99
- package/lib/src/css/library.brand-page-designCom.min.css +76 -103
- package/lib/src/css/library.brand-page-preview.min.css +76 -99
- package/lib/src/index.d.ts +0 -1
- package/lib/src/index.mjs +61923 -64480
- package/lib/src/lib.js +0 -1
- package/lib/src/mockServiceWorker.js +54 -91
- package/lib/src/shared/content-settings/components/color-field/ColorField.mixin.d.ts +0 -11
- package/lib/src/shared/content-settings/components/color-field/ColorField.mixin.js +0 -5
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +13 -13
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +11 -11
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +9 -9
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +10 -10
- package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +9 -9
- package/lib/src/shared/content-settings/components/page-dropdown-field/PageDropdownField.mixin.d.ts +2 -12
- package/lib/src/shared/content-settings/components/page-dropdown-field/PageDropdownField.mixin.js +0 -4
- package/lib/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.js +1 -3
- package/lib/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.d.ts +6 -6
- package/lib/src/shared/content-settings/components/url-field/UrlField.mixin.d.ts +0 -2
- package/lib/src/shared/content-settings/components/url-field/UrlField.mixin.js +7 -12
- package/lib/src/shared/font-family-selector/FontFamilySelector.mixin.d.ts +1 -1
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +1 -1
- package/lib/src/shared/page-settings/components/new-page-modal/NewPageModal.mixin.d.ts +1 -1
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +12 -12
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +15 -17
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +0 -4
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.js +1 -12
- package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +5 -5
- package/package.json +3 -6
- package/src/brand-page/components/banner-section/BannerSection.vue +0 -6
- package/src/brand-page/components/text/Text.vue +0 -2
- package/src/brand-page/components/text-wrapper/TextWrapper.vue +11 -31
- package/src/brand-page/models/index.ts +0 -6
- package/src/brand-page/utils/style.util.ts +5 -105
- package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.ts +10 -9
- package/src/brand-page-maker/components/brand-page-maker/__fixtures__/content-settings-items.fixture.ts +0 -1
- package/src/brand-page-maker/components/brand-page-maker/__fixtures__/page-content-items.ts +0 -2
- package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.ts +1 -44
- package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.vue +0 -1
- package/src/brand-page-maker/components/rich-text-editor/RichTextEditor.vue +50 -548
- package/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.ts +0 -22
- package/src/brand-page-maker/components/template-preview/TemplatePreview.vue +1 -1
- package/src/brand-page-maker/composables/rich-text-editor/extensions/MaxLength.test.ts +1 -1
- package/src/brand-page-maker/composables/rich-text-editor/extensions/MaxLength.ts +15 -4
- package/src/brand-page-maker/composables/rich-text-editor/font.ts +1 -1
- package/src/brand-page-maker/composables/rich-text-editor/formatting.ts +1 -1
- package/src/brand-page-maker/composables/rich-text-editor/spacing.ts +1 -1
- package/src/brand-page-maker/composables/rich-text-editor/textAlign.ts +1 -1
- package/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.ts +41 -280
- package/src/brand-page-maker/composables/useEventTracker.ts +0 -3
- package/src/brand-page-maker/models/button-group.model.ts +0 -2
- package/src/brand-page-maker/stores/brandpage-maker/__snapshots__/brandpage-maker-store.test.ts.snap +0 -1
- package/src/brand-page-maker/utils/rich-text-editor.util.test.ts +0 -418
- package/src/brand-page-maker/utils/rich-text-editor.util.ts +10 -451
- package/src/composables/useTranslate.ts +11 -12
- package/src/lib.ts +0 -1
- package/src/shared/common/SideBarSettingsHeader.vue +1 -1
- package/src/shared/content-settings/components/color-field/ColorField.mixin.ts +0 -5
- package/src/shared/content-settings/components/color-field/ColorField.vue +1 -1
- package/src/shared/content-settings/components/page-dropdown-field/PageDropdownField.mixin.ts +0 -4
- package/src/shared/content-settings/components/page-dropdown-field/PageDropdownField.vue +2 -2
- package/src/shared/content-settings/components/text-field/TextField.vue +1 -1
- package/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.ts +1 -3
- package/src/shared/content-settings/components/text-items-field/TextItemsField.vue +2 -2
- package/src/shared/content-settings/components/textarea-field/TextareaField.vue +3 -3
- package/src/shared/content-settings/components/url-field/UrlField.mixin.ts +10 -15
- package/src/shared/content-settings/components/url-field/UrlField.vue +0 -1
- package/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.ts +5 -24
- package/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.vue +0 -4
- package/lib/src/brand-page-maker/composables/rich-text-editor/bubbleMenu.d.ts +0 -19
- package/lib/src/brand-page-maker/composables/rich-text-editor/bubbleMenu.js +0 -31
- package/lib/src/brand-page-maker/composables/rich-text-editor/extensions/AutoLink.d.ts +0 -2
- package/lib/src/brand-page-maker/composables/rich-text-editor/extensions/AutoLink.js +0 -161
- package/lib/src/brand-page-maker/composables/rich-text-editor/hyperlink.d.ts +0 -19
- package/lib/src/brand-page-maker/composables/rich-text-editor/hyperlink.js +0 -87
- package/lib/src/bundled-translations-BQxlwhX6.js +0 -7
- package/lib/src/bundled-translations.de-DE-CVeltNnL.js +0 -7
- package/lib/src/bundled-translations.es-ES-BIl9nBGQ.js +0 -7
- package/lib/src/bundled-translations.fr-FR-D9Bmvesk.js +0 -7
- package/lib/src/bundled-translations.pt-PT-CT1O7aSj.js +0 -7
- package/src/brand-page-maker/composables/rich-text-editor/bubbleMenu.ts +0 -42
- package/src/brand-page-maker/composables/rich-text-editor/extensions/AutoLink.ts +0 -227
- 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";
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import type { BrandPageModel, LogoTheme,
|
|
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
|
-
|
|
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 (
|
|
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 (
|
|
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();
|
|
@@ -29,7 +29,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
29
29
|
};
|
|
30
30
|
}>, {
|
|
31
31
|
currentNotificationMessage: import("vue").ComputedRef<false | {
|
|
32
|
-
type: "
|
|
32
|
+
type: "error" | "success" | "warning";
|
|
33
33
|
label: string;
|
|
34
34
|
description: string | false;
|
|
35
35
|
}>;
|
|
@@ -444,7 +444,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
444
444
|
selectedItemIndex?: number | undefined;
|
|
445
445
|
}[];
|
|
446
446
|
selectedItemId: string | null;
|
|
447
|
-
selectedItemEventSource: "
|
|
447
|
+
selectedItemEventSource: "contentSettings" | "pageSettings" | "preview" | null;
|
|
448
448
|
selectedItemFieldName: string | null;
|
|
449
449
|
selectedItemValue: string | null;
|
|
450
450
|
selectedItemIndex: number | null;
|
|
@@ -493,7 +493,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
493
493
|
selectedItemIndex?: number | undefined;
|
|
494
494
|
}[];
|
|
495
495
|
selectedItemId: string | null;
|
|
496
|
-
selectedItemEventSource: "
|
|
496
|
+
selectedItemEventSource: "contentSettings" | "pageSettings" | "preview" | null;
|
|
497
497
|
selectedItemFieldName: string | null;
|
|
498
498
|
selectedItemValue: string | null;
|
|
499
499
|
selectedItemIndex: number | null;
|
|
@@ -542,7 +542,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
542
542
|
selectedItemIndex?: number | undefined;
|
|
543
543
|
}[];
|
|
544
544
|
selectedItemId: string | null;
|
|
545
|
-
selectedItemEventSource: "
|
|
545
|
+
selectedItemEventSource: "contentSettings" | "pageSettings" | "preview" | null;
|
|
546
546
|
selectedItemFieldName: string | null;
|
|
547
547
|
selectedItemValue: string | null;
|
|
548
548
|
selectedItemIndex: number | null;
|
|
@@ -591,7 +591,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
591
591
|
selectedItemIndex?: number | undefined;
|
|
592
592
|
}[];
|
|
593
593
|
selectedItemId: string | null;
|
|
594
|
-
selectedItemEventSource: "
|
|
594
|
+
selectedItemEventSource: "contentSettings" | "pageSettings" | "preview" | null;
|
|
595
595
|
selectedItemFieldName: string | null;
|
|
596
596
|
selectedItemValue: string | null;
|
|
597
597
|
selectedItemIndex: number | null;
|
|
@@ -640,7 +640,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
640
640
|
selectedItemIndex?: number | undefined;
|
|
641
641
|
}[];
|
|
642
642
|
selectedItemId: string | null;
|
|
643
|
-
selectedItemEventSource: "
|
|
643
|
+
selectedItemEventSource: "contentSettings" | "pageSettings" | "preview" | null;
|
|
644
644
|
selectedItemFieldName: string | null;
|
|
645
645
|
selectedItemValue: string | null;
|
|
646
646
|
selectedItemIndex: number | null;
|
|
@@ -689,7 +689,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
689
689
|
selectedItemIndex?: number | undefined;
|
|
690
690
|
}[];
|
|
691
691
|
selectedItemId: string | null;
|
|
692
|
-
selectedItemEventSource: "
|
|
692
|
+
selectedItemEventSource: "contentSettings" | "pageSettings" | "preview" | null;
|
|
693
693
|
selectedItemFieldName: string | null;
|
|
694
694
|
selectedItemValue: string | null;
|
|
695
695
|
selectedItemIndex: number | null;
|
|
@@ -719,7 +719,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
719
719
|
_setItemSettingsFieldErrorState(payload: import("../../../shared/content-settings/models").SetItemSettingsFieldErrorMessagePayload): void;
|
|
720
720
|
_setSelectedItemId({ id, eventSource, }: {
|
|
721
721
|
id: string | null;
|
|
722
|
-
eventSource: "
|
|
722
|
+
eventSource: "contentSettings" | "pageSettings" | "preview" | null;
|
|
723
723
|
}): void;
|
|
724
724
|
_setSelectedItemFieldName({ name: name }: {
|
|
725
725
|
name: string | null;
|
|
@@ -794,13 +794,13 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
794
794
|
updateIsDefaultTextColorRequired(): void;
|
|
795
795
|
setSelectedItemId(payload: {
|
|
796
796
|
id: string | null;
|
|
797
|
-
eventSource: "
|
|
797
|
+
eventSource: "contentSettings" | "pageSettings" | "preview";
|
|
798
798
|
}): void;
|
|
799
799
|
setSelectedItemAndFieldName(payload: {
|
|
800
800
|
id: string | null;
|
|
801
801
|
name: string | null;
|
|
802
802
|
index: number | null;
|
|
803
|
-
eventSource: "
|
|
803
|
+
eventSource: "contentSettings" | "pageSettings" | "preview" | null;
|
|
804
804
|
}): void;
|
|
805
805
|
setSelectedItemValue(payload: {
|
|
806
806
|
value: string | null;
|
|
@@ -906,7 +906,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
906
906
|
}): void;
|
|
907
907
|
setPageSettingsSectionValue({ sectionName, propName, index, value, merge, viewport, }: {
|
|
908
908
|
sectionName: "footer" | "header" | "pages";
|
|
909
|
-
propName: "copyrightStyle" | "style" | "iconStyle" | "displayStyle" | "backgroundStyle" | "logoImage" | "logoImageStyle" | "isLogoOptional" | "viewport" | "isLogoVisible" | "logoTemplateImage" | "logoImageHeight" | "logoImageWidth" | "navigationStyles" | "
|
|
909
|
+
propName: "navigation" | "copyrightStyle" | "style" | "iconStyle" | "displayStyle" | "backgroundStyle" | "logoImage" | "logoImageStyle" | "isLogoOptional" | "viewport" | "isLogoVisible" | "logoTemplateImage" | "logoImageHeight" | "logoImageWidth" | "navigationStyles" | "logoImageUrl" | "logoDraftToken" | "logoVariation" | "logoImageBase64Url" | "backgroundColorEnabled" | "copyrightText" | "socialLinks" | "textFontFamily";
|
|
910
910
|
index?: number | undefined;
|
|
911
911
|
value: string | number | boolean | BrandPageCssStyle | import("../../../brand-page").LinksItem[] | Partial<import("../../../brand-page").ImageItem> | null | undefined;
|
|
912
912
|
merge?: boolean | undefined;
|
package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.js
CHANGED
|
@@ -130,12 +130,15 @@ export const BRAND_SITE = {
|
|
|
130
130
|
title: 'Home',
|
|
131
131
|
slug: 'home',
|
|
132
132
|
contents: [
|
|
133
|
+
...Object.values(CONTENT_SETTINGS_CONFIGS())
|
|
134
|
+
.filter((x) => x.brandPageType === BRAND_PAGE_TYPES.brandSite)
|
|
135
|
+
.map((x) => x.createInitialContent()),
|
|
133
136
|
{
|
|
134
137
|
id: '837a501d-a6b7-4803-9859-d264a6d3b82css',
|
|
135
138
|
url: '',
|
|
136
139
|
size: '100%',
|
|
137
140
|
type: 'banner-section',
|
|
138
|
-
title: '
|
|
141
|
+
title: 'not RTE content',
|
|
139
142
|
imageUrl: '',
|
|
140
143
|
pageSlug: '',
|
|
141
144
|
cardStyle: {
|
|
@@ -144,16 +147,15 @@ export const BRAND_SITE = {
|
|
|
144
147
|
mediaType: 'image',
|
|
145
148
|
buttonText: 'Explore Portfolio',
|
|
146
149
|
titleStyle: {
|
|
147
|
-
color: 'logo-
|
|
148
|
-
backgroundColor: 'logo-text-color',
|
|
150
|
+
color: 'logo-text-color',
|
|
149
151
|
fontSize: '4.375rem',
|
|
150
152
|
textAlign: 'center',
|
|
151
153
|
fontFamily: 'Oswald',
|
|
152
154
|
fontWeight: 'bold',
|
|
153
|
-
lineHeight: '
|
|
155
|
+
lineHeight: '6.5625rem',
|
|
154
156
|
textDecoration: '',
|
|
155
157
|
},
|
|
156
|
-
description: 'rte content sdsa',
|
|
158
|
+
description: 'rte content <br> <br> sdsa <br><br><br>',
|
|
157
159
|
displayStyle: 'centered',
|
|
158
160
|
buttonLinkType: 'page',
|
|
159
161
|
backgroundStyle: {
|
|
@@ -166,12 +168,11 @@ export const BRAND_SITE = {
|
|
|
166
168
|
lineHeight: '1.875rem',
|
|
167
169
|
},
|
|
168
170
|
descriptionStyle: {
|
|
169
|
-
color: 'logo-
|
|
170
|
-
backgroundColor: 'logo-text-color',
|
|
171
|
+
color: 'logo-text-color',
|
|
171
172
|
fontSize: '1.5rem',
|
|
172
173
|
textAlign: 'center',
|
|
173
|
-
fontFamily: '
|
|
174
|
-
lineHeight: '
|
|
174
|
+
fontFamily: 'Nunito',
|
|
175
|
+
lineHeight: '2rem',
|
|
175
176
|
},
|
|
176
177
|
colorReplacements: [
|
|
177
178
|
{
|
package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/page-content-items.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const brandPageContentsSampleData: (import("../../../../brand-page").ButtonContent | import("../../../../brand-page").ProfileContent | import("../../../../brand-page").
|
|
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)[];
|
package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/page-content-items.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { logoContent, profileContent, generalLink, facebookLink, websiteLink, emailLink, phoneLink, twitterLink, instagramLink, youtubeLink, linkedinLink, pinterestLink, twitchLink, tiktokLink,
|
|
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,
|
package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
28
28
|
};
|
|
29
29
|
}[]>;
|
|
30
30
|
selectedItemId: import("vue").ComputedRef<string | null>;
|
|
31
|
-
selectedItemEventSource: import("vue").ComputedRef<"
|
|
31
|
+
selectedItemEventSource: import("vue").ComputedRef<"contentSettings" | "pageSettings" | "preview" | null>;
|
|
32
32
|
viewport: import("vue").ComputedRef<import("../../../brand-page").ViewportsType>;
|
|
33
33
|
isMobileDevice: import("vue").ComputedRef<boolean>;
|
|
34
34
|
brandPageToken: import("vue").ComputedRef<string | undefined>;
|
|
@@ -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: {
|
|
@@ -114,7 +82,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
114
82
|
selectedItemIndex?: number | undefined;
|
|
115
83
|
}[];
|
|
116
84
|
selectedItemId: string | null;
|
|
117
|
-
selectedItemEventSource: "
|
|
85
|
+
selectedItemEventSource: "contentSettings" | "pageSettings" | "preview" | null;
|
|
118
86
|
selectedItemFieldName: string | null;
|
|
119
87
|
selectedItemValue: string | null;
|
|
120
88
|
selectedItemIndex: number | null;
|
|
@@ -163,7 +131,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
163
131
|
selectedItemIndex?: number | undefined;
|
|
164
132
|
}[];
|
|
165
133
|
selectedItemId: string | null;
|
|
166
|
-
selectedItemEventSource: "
|
|
134
|
+
selectedItemEventSource: "contentSettings" | "pageSettings" | "preview" | null;
|
|
167
135
|
selectedItemFieldName: string | null;
|
|
168
136
|
selectedItemValue: string | null;
|
|
169
137
|
selectedItemIndex: number | null;
|
|
@@ -212,7 +180,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
212
180
|
selectedItemIndex?: number | undefined;
|
|
213
181
|
}[];
|
|
214
182
|
selectedItemId: string | null;
|
|
215
|
-
selectedItemEventSource: "
|
|
183
|
+
selectedItemEventSource: "contentSettings" | "pageSettings" | "preview" | null;
|
|
216
184
|
selectedItemFieldName: string | null;
|
|
217
185
|
selectedItemValue: string | null;
|
|
218
186
|
selectedItemIndex: number | null;
|
|
@@ -261,7 +229,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
261
229
|
selectedItemIndex?: number | undefined;
|
|
262
230
|
}[];
|
|
263
231
|
selectedItemId: string | null;
|
|
264
|
-
selectedItemEventSource: "
|
|
232
|
+
selectedItemEventSource: "contentSettings" | "pageSettings" | "preview" | null;
|
|
265
233
|
selectedItemFieldName: string | null;
|
|
266
234
|
selectedItemValue: string | null;
|
|
267
235
|
selectedItemIndex: number | null;
|
|
@@ -310,7 +278,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
310
278
|
selectedItemIndex?: number | undefined;
|
|
311
279
|
}[];
|
|
312
280
|
selectedItemId: string | null;
|
|
313
|
-
selectedItemEventSource: "
|
|
281
|
+
selectedItemEventSource: "contentSettings" | "pageSettings" | "preview" | null;
|
|
314
282
|
selectedItemFieldName: string | null;
|
|
315
283
|
selectedItemValue: string | null;
|
|
316
284
|
selectedItemIndex: number | null;
|
|
@@ -359,7 +327,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
359
327
|
selectedItemIndex?: number | undefined;
|
|
360
328
|
}[];
|
|
361
329
|
selectedItemId: string | null;
|
|
362
|
-
selectedItemEventSource: "
|
|
330
|
+
selectedItemEventSource: "contentSettings" | "pageSettings" | "preview" | null;
|
|
363
331
|
selectedItemFieldName: string | null;
|
|
364
332
|
selectedItemValue: string | null;
|
|
365
333
|
selectedItemIndex: number | null;
|
|
@@ -389,7 +357,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
389
357
|
_setItemSettingsFieldErrorState(payload: import("../../../shared/content-settings/models").SetItemSettingsFieldErrorMessagePayload): void;
|
|
390
358
|
_setSelectedItemId({ id, eventSource, }: {
|
|
391
359
|
id: string | null;
|
|
392
|
-
eventSource: "
|
|
360
|
+
eventSource: "contentSettings" | "pageSettings" | "preview" | null;
|
|
393
361
|
}): void;
|
|
394
362
|
_setSelectedItemFieldName({ name: name }: {
|
|
395
363
|
name: string | null;
|
|
@@ -464,13 +432,13 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
464
432
|
updateIsDefaultTextColorRequired(): void;
|
|
465
433
|
setSelectedItemId(payload: {
|
|
466
434
|
id: string | null;
|
|
467
|
-
eventSource: "
|
|
435
|
+
eventSource: "contentSettings" | "pageSettings" | "preview";
|
|
468
436
|
}): void;
|
|
469
437
|
setSelectedItemAndFieldName(payload: {
|
|
470
438
|
id: string | null;
|
|
471
439
|
name: string | null;
|
|
472
440
|
index: number | null;
|
|
473
|
-
eventSource: "
|
|
441
|
+
eventSource: "contentSettings" | "pageSettings" | "preview" | null;
|
|
474
442
|
}): void;
|
|
475
443
|
setSelectedItemValue(payload: {
|
|
476
444
|
value: string | null;
|
|
@@ -922,7 +890,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
922
890
|
}): void;
|
|
923
891
|
setPageSettingsSectionValue({ sectionName, propName, index, value, merge, viewport, }: {
|
|
924
892
|
sectionName: "footer" | "header" | "pages";
|
|
925
|
-
propName: "copyrightStyle" | "style" | "iconStyle" | "displayStyle" | "backgroundStyle" | "logoImage" | "logoImageStyle" | "isLogoOptional" | "viewport" | "isLogoVisible" | "logoTemplateImage" | "logoImageHeight" | "logoImageWidth" | "navigationStyles" | "
|
|
893
|
+
propName: "navigation" | "copyrightStyle" | "style" | "iconStyle" | "displayStyle" | "backgroundStyle" | "logoImage" | "logoImageStyle" | "isLogoOptional" | "viewport" | "isLogoVisible" | "logoTemplateImage" | "logoImageHeight" | "logoImageWidth" | "navigationStyles" | "logoImageUrl" | "logoDraftToken" | "logoVariation" | "logoImageBase64Url" | "backgroundColorEnabled" | "copyrightText" | "socialLinks" | "textFontFamily";
|
|
926
894
|
index?: number | undefined;
|
|
927
895
|
value: string | number | boolean | BrandPageCssStyle | import("../../../brand-page").LinksItem[] | Partial<import("../../../brand-page").ImageItem> | null | undefined;
|
|
928
896
|
merge?: boolean | undefined;
|
|
@@ -995,7 +963,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
995
963
|
defaultTextColor(): string | undefined;
|
|
996
964
|
logoBackgroundColor(): string | undefined;
|
|
997
965
|
selectedButtonStyleConfig(): import("../../models").ButtonStyleConfig | undefined;
|
|
998
|
-
selectedTextFontFamily(): "lato" | "roboto" | "notoSans" | "openSans" | "arvo" | "bebasNeue" | "ptSerif" | "oswald" | "inter" | "montserrat" | "raleway" | "anton" | "antonSc" | "quicksand" | "pacifico" | "bioRhyme" | "playfairDisplay" | "mulish" | "telex" | "pridi" | "hindMadurai" | "kanit" | "libreBaskerville" | "amiko" | "neuton" | "tenorSans" | "jacquesFrancois" | "varela" | "quattrocentoSans" | "workSans" | "titilliumWeb" | "amaticSc" | "poiretOne" | "shantellSans" | "dancingScript" | "tangerine" | "cinzel" | "jost" | "exo2" | "ebGaramond" | "ubuntu" | "cabin" | "josefinSans" | "lobsterTwo" | "sacramento" | "nunito" | "aboreto" | "aleo" | "abhayaLibre" | "caladea" | "rokkitt" | "rubik" | "frankRuhlLibre" | "spectral" | "abrilFatface" | "courgette" | "kiteOne" | "amarante" | "satisfy" | "lilitaOne" | "lobster" | "titanOne" | "
|
|
966
|
+
selectedTextFontFamily(): "cookie" | "lato" | "roboto" | "notoSans" | "openSans" | "arvo" | "bebasNeue" | "ptSerif" | "oswald" | "inter" | "montserrat" | "raleway" | "anton" | "antonSc" | "quicksand" | "pacifico" | "bioRhyme" | "playfairDisplay" | "mulish" | "telex" | "pridi" | "hindMadurai" | "kanit" | "libreBaskerville" | "amiko" | "neuton" | "tenorSans" | "jacquesFrancois" | "varela" | "quattrocentoSans" | "workSans" | "titilliumWeb" | "amaticSc" | "poiretOne" | "shantellSans" | "dancingScript" | "tangerine" | "cinzel" | "jost" | "exo2" | "ebGaramond" | "ubuntu" | "cabin" | "josefinSans" | "lobsterTwo" | "sacramento" | "nunito" | "aboreto" | "aleo" | "abhayaLibre" | "caladea" | "rokkitt" | "rubik" | "frankRuhlLibre" | "spectral" | "abrilFatface" | "courgette" | "kiteOne" | "amarante" | "satisfy" | "lilitaOne" | "lobster" | "titanOne" | "bungee" | "poppins" | "staatliches" | "patuaOne" | "calistoga" | "suezOne" | "caprasimo" | "rubikMonoOne" | "silkscreen" | "alfaSlabOne" | "orelegaOne" | "audiowide" | "redRose" | "kalnia" | "imbue" | "climateCrisis" | "gluten" | "madimiOne" | "anta" | "trykker" | "moul" | "bevan" | "wendyOne" | "lexendDeca" | "vinaSans" | "chango" | "changaOne" | "protestGuerrilla" | "londrinaShadow" | "candal" | "borel" | "rockNRollOne" | "bungeeInline" | "rampartOne" | "manrope" | "yuseiMagic" | "patrickHandSC" | "farsan" | "handlee" | "lemonada" | "arsenal" | "bakbakOne" | "belleza" | "blackHanSans" | "bowlbyOne" | "brunoAceSC" | "castoroTitling" | "contrailOne" | "delaGothicOne" | "dotGothic16" | "fahkwang" | "francoisOne" | "gloock" | "graduate" | "jersey10" | "kavoon" | "kronaOne" | "notable" | "pavanam" | "phudu" | "poetsenOne" | "pollerOne" | "questrial" | "racingSansOne" | "rammettoOne" | "rubikGlitch" | "shrikhand" | "spicyRice" | "syncopate" | "urbanist" | "yesevaOne" | "zenDots";
|
|
999
967
|
doesLogoHaveBackground(): boolean;
|
|
1000
968
|
activeLogoStyles(): import("../../../brand-page").LogoStyles;
|
|
1001
969
|
}, {
|
|
@@ -1019,7 +987,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
1019
987
|
id: string;
|
|
1020
988
|
}): void;
|
|
1021
989
|
_setTextFontFamily(payload: {
|
|
1022
|
-
fontFamily: "lato" | "roboto" | "notoSans" | "openSans" | "arvo" | "bebasNeue" | "ptSerif" | "oswald" | "inter" | "montserrat" | "raleway" | "anton" | "antonSc" | "quicksand" | "pacifico" | "bioRhyme" | "playfairDisplay" | "mulish" | "telex" | "pridi" | "hindMadurai" | "kanit" | "libreBaskerville" | "amiko" | "neuton" | "tenorSans" | "jacquesFrancois" | "varela" | "quattrocentoSans" | "workSans" | "titilliumWeb" | "amaticSc" | "poiretOne" | "shantellSans" | "dancingScript" | "tangerine" | "cinzel" | "jost" | "exo2" | "ebGaramond" | "ubuntu" | "cabin" | "josefinSans" | "lobsterTwo" | "sacramento" | "nunito" | "aboreto" | "aleo" | "abhayaLibre" | "caladea" | "rokkitt" | "rubik" | "frankRuhlLibre" | "spectral" | "abrilFatface" | "courgette" | "kiteOne" | "amarante" | "satisfy" | "lilitaOne" | "lobster" | "titanOne" | "
|
|
990
|
+
fontFamily: "cookie" | "lato" | "roboto" | "notoSans" | "openSans" | "arvo" | "bebasNeue" | "ptSerif" | "oswald" | "inter" | "montserrat" | "raleway" | "anton" | "antonSc" | "quicksand" | "pacifico" | "bioRhyme" | "playfairDisplay" | "mulish" | "telex" | "pridi" | "hindMadurai" | "kanit" | "libreBaskerville" | "amiko" | "neuton" | "tenorSans" | "jacquesFrancois" | "varela" | "quattrocentoSans" | "workSans" | "titilliumWeb" | "amaticSc" | "poiretOne" | "shantellSans" | "dancingScript" | "tangerine" | "cinzel" | "jost" | "exo2" | "ebGaramond" | "ubuntu" | "cabin" | "josefinSans" | "lobsterTwo" | "sacramento" | "nunito" | "aboreto" | "aleo" | "abhayaLibre" | "caladea" | "rokkitt" | "rubik" | "frankRuhlLibre" | "spectral" | "abrilFatface" | "courgette" | "kiteOne" | "amarante" | "satisfy" | "lilitaOne" | "lobster" | "titanOne" | "bungee" | "poppins" | "staatliches" | "patuaOne" | "calistoga" | "suezOne" | "caprasimo" | "rubikMonoOne" | "silkscreen" | "alfaSlabOne" | "orelegaOne" | "audiowide" | "redRose" | "kalnia" | "imbue" | "climateCrisis" | "gluten" | "madimiOne" | "anta" | "trykker" | "moul" | "bevan" | "wendyOne" | "lexendDeca" | "vinaSans" | "chango" | "changaOne" | "protestGuerrilla" | "londrinaShadow" | "candal" | "borel" | "rockNRollOne" | "bungeeInline" | "rampartOne" | "manrope" | "yuseiMagic" | "patrickHandSC" | "farsan" | "handlee" | "lemonada" | "arsenal" | "bakbakOne" | "belleza" | "blackHanSans" | "bowlbyOne" | "brunoAceSC" | "castoroTitling" | "contrailOne" | "delaGothicOne" | "dotGothic16" | "fahkwang" | "francoisOne" | "gloock" | "graduate" | "jersey10" | "kavoon" | "kronaOne" | "notable" | "pavanam" | "phudu" | "poetsenOne" | "pollerOne" | "questrial" | "racingSansOne" | "rammettoOne" | "rubikGlitch" | "shrikhand" | "spicyRice" | "syncopate" | "urbanist" | "yesevaOne" | "zenDots";
|
|
1023
991
|
}): void;
|
|
1024
992
|
_setTextStyles(payload: Partial<import("../../../brand-page").TextStyles>): void;
|
|
1025
993
|
setAdminStyleOptionDefaultValues(): void;
|
|
@@ -1045,7 +1013,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
1045
1013
|
id: string;
|
|
1046
1014
|
}): void;
|
|
1047
1015
|
setTextFontFamily(payload: {
|
|
1048
|
-
fontFamily: "lato" | "roboto" | "notoSans" | "openSans" | "arvo" | "bebasNeue" | "ptSerif" | "oswald" | "inter" | "montserrat" | "raleway" | "anton" | "antonSc" | "quicksand" | "pacifico" | "bioRhyme" | "playfairDisplay" | "mulish" | "telex" | "pridi" | "hindMadurai" | "kanit" | "libreBaskerville" | "amiko" | "neuton" | "tenorSans" | "jacquesFrancois" | "varela" | "quattrocentoSans" | "workSans" | "titilliumWeb" | "amaticSc" | "poiretOne" | "shantellSans" | "dancingScript" | "tangerine" | "cinzel" | "jost" | "exo2" | "ebGaramond" | "ubuntu" | "cabin" | "josefinSans" | "lobsterTwo" | "sacramento" | "nunito" | "aboreto" | "aleo" | "abhayaLibre" | "caladea" | "rokkitt" | "rubik" | "frankRuhlLibre" | "spectral" | "abrilFatface" | "courgette" | "kiteOne" | "amarante" | "satisfy" | "lilitaOne" | "lobster" | "titanOne" | "
|
|
1016
|
+
fontFamily: "cookie" | "lato" | "roboto" | "notoSans" | "openSans" | "arvo" | "bebasNeue" | "ptSerif" | "oswald" | "inter" | "montserrat" | "raleway" | "anton" | "antonSc" | "quicksand" | "pacifico" | "bioRhyme" | "playfairDisplay" | "mulish" | "telex" | "pridi" | "hindMadurai" | "kanit" | "libreBaskerville" | "amiko" | "neuton" | "tenorSans" | "jacquesFrancois" | "varela" | "quattrocentoSans" | "workSans" | "titilliumWeb" | "amaticSc" | "poiretOne" | "shantellSans" | "dancingScript" | "tangerine" | "cinzel" | "jost" | "exo2" | "ebGaramond" | "ubuntu" | "cabin" | "josefinSans" | "lobsterTwo" | "sacramento" | "nunito" | "aboreto" | "aleo" | "abhayaLibre" | "caladea" | "rokkitt" | "rubik" | "frankRuhlLibre" | "spectral" | "abrilFatface" | "courgette" | "kiteOne" | "amarante" | "satisfy" | "lilitaOne" | "lobster" | "titanOne" | "bungee" | "poppins" | "staatliches" | "patuaOne" | "calistoga" | "suezOne" | "caprasimo" | "rubikMonoOne" | "silkscreen" | "alfaSlabOne" | "orelegaOne" | "audiowide" | "redRose" | "kalnia" | "imbue" | "climateCrisis" | "gluten" | "madimiOne" | "anta" | "trykker" | "moul" | "bevan" | "wendyOne" | "lexendDeca" | "vinaSans" | "chango" | "changaOne" | "protestGuerrilla" | "londrinaShadow" | "candal" | "borel" | "rockNRollOne" | "bungeeInline" | "rampartOne" | "manrope" | "yuseiMagic" | "patrickHandSC" | "farsan" | "handlee" | "lemonada" | "arsenal" | "bakbakOne" | "belleza" | "blackHanSans" | "bowlbyOne" | "brunoAceSC" | "castoroTitling" | "contrailOne" | "delaGothicOne" | "dotGothic16" | "fahkwang" | "francoisOne" | "gloock" | "graduate" | "jersey10" | "kavoon" | "kronaOne" | "notable" | "pavanam" | "phudu" | "poetsenOne" | "pollerOne" | "questrial" | "racingSansOne" | "rammettoOne" | "rubikGlitch" | "shrikhand" | "spicyRice" | "syncopate" | "urbanist" | "yesevaOne" | "zenDots";
|
|
1049
1017
|
}): Promise<void>;
|
|
1050
1018
|
toggleLogoBackground(): Promise<any>;
|
|
1051
1019
|
}>;
|
|
@@ -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;
|
package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.js
CHANGED
|
@@ -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
|
-
|
|
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: {
|