@designcrowd/library.brand-page 5.14.14 → 5.14.15-ast-bugs
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/{CreatedOnBrandCrowd-de-de-D7ryk46x.js → CreatedOnBrandCrowd-de-de-XA_P3O6B.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-BiPE1ue8.js → CreatedOnBrandCrowd-en-us-BJSORr8J.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-BYmn7fSR.js → CreatedOnBrandCrowd-es-es-CcUkCvk8.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-D50Z2M1g.js → CreatedOnBrandCrowd-fr-ca-CD35x6qo.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-D50Z2M1g.js → CreatedOnBrandCrowd-fr-fr-CD35x6qo.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-B2KzjGPW.js → CreatedOnBrandCrowd-pt-br-B7DFbsMA.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-B2KzjGPW.js → CreatedOnBrandCrowd-pt-pt-B7DFbsMA.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-Ch5hMWS9.js → CreatedOnDcom-de-de-DC9t7Chk.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-Dc200pCX.js → CreatedOnDcom-en-us-z6RWJgXt.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-ClTYKnwP.js → CreatedOnDcom-es-es-B3C8-GjM.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-DLmg-UoU.js → CreatedOnDcom-fr-ca-DFCLyNQ_.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-C9ikSDbM.js → CreatedOnDcom-fr-fr-Dd3irraf.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-4D9PnwCa.js → CreatedOnDcom-pt-br-Z_A2r0Wa.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-DDKAHEb_.js → CreatedOnDcom-pt-pt-D1yQ8zxn.js} +1 -1
- package/lib/src/brand-page/utils/style.util.d.ts +8 -0
- package/lib/src/brand-page/utils/style.util.js +26 -0
- package/lib/src/brand-page/utils/view-model.util.js +20 -20
- package/lib/src/brand-page-maker/components/admin-background-settings/AdminBackgroundSettings.mixin.d.ts +1 -3
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +2 -3
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.js +1 -1
- package/lib/src/brand-page-maker/composables/useEventTracker.d.ts +2 -0
- package/lib/src/brand-page-maker/composables/useEventTracker.js +2 -0
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.d.ts +1 -0
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +1 -1
- package/lib/src/brand-page-maker/stores/logo-store/logo-store.d.ts +16 -0
- package/lib/src/brand-page-maker/stores/logo-store/logo-store.js +44 -0
- package/lib/src/brand-page-maker/stores/ui/ui-store.d.ts +2 -3
- package/lib/src/brand-page-maker/stores/ui/ui-store.js +1 -1
- package/lib/src/bundled-translations-C35ICQCS.js +159 -0
- package/lib/src/bundled-translations.de-DE-B3sIK6Yw.js +159 -0
- package/lib/src/bundled-translations.es-ES-CJCflztK.js +159 -0
- package/lib/src/bundled-translations.fr-CA-CtlwKcDs.js +159 -0
- package/lib/src/bundled-translations.fr-FR-CjDBsRhl.js +159 -0
- package/lib/src/bundled-translations.pt-BR-CNuFzR0R.js +159 -0
- package/lib/src/bundled-translations.pt-PT-D2Ak5M-w.js +159 -0
- package/lib/src/bundles/bundled-translations.de-DE.json +14 -1
- package/lib/src/bundles/bundled-translations.es-ES.json +14 -1
- package/lib/src/bundles/bundled-translations.fr-CA.json +14 -1
- package/lib/src/bundles/bundled-translations.fr-FR.json +14 -1
- package/lib/src/bundles/bundled-translations.json +14 -1
- package/lib/src/bundles/bundled-translations.pt-BR.json +14 -1
- package/lib/src/bundles/bundled-translations.pt-PT.json +14 -1
- package/lib/src/clients/brand-page-client.d.ts +31 -0
- package/lib/src/clients/brand-page-client.js +40 -0
- package/lib/src/composables/useTranslate.d.ts +3 -1
- package/lib/src/composables/useTranslate.js +3 -1
- package/lib/src/css/library.brand-page-brandCrowd.min.css +26 -26
- package/lib/src/css/library.brand-page-brandPage.min.css +26 -26
- package/lib/src/css/library.brand-page-designCom.min.css +26 -26
- package/lib/src/css/library.brand-page-preview.min.css +26 -26
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-BAlwvkEk.js → lib-BYDNNx9t.js} +24388 -24157
- package/lib/src/shared/color-picker/components/ColorPicker.mixin.d.ts +6 -3
- package/lib/src/shared/color-picker/components/ColorPicker.mixin.js +123 -38
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +1 -3
- package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.d.ts +116 -5
- package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.js +16 -0
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +92 -2
- package/lib/src/shared/logo-settings/store/editable-logo-store.d.ts +86 -2
- package/lib/src/shared/logo-settings/store/editable-logo-store.js +10 -1
- package/lib/src/shared/logo-versions/LogoVersions.mixin.d.ts +1 -3
- package/lib/src/shared/my-designs/MyDesigns.mixin.d.ts +1 -3
- package/lib/src/shared/my-uploads/MyMedia.mixin.d.ts +1 -3
- package/lib/src/shared/my-uploads/MyUploads.mixin.d.ts +1 -3
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +1 -3
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +93 -5
- package/lib/src/shared/shape-library/ShapeLibrary.mixin.d.ts +1 -3
- package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +1 -3
- package/lib/src/shared/style-settings/store/style-settings-store.js +3 -2
- package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.d.ts +2 -3
- package/lib/src/shared/template-settings/models.d.ts +1 -0
- package/lib/src/shared/template-settings/store/template-settings-store.d.ts +2 -0
- package/lib/src/shared/template-settings/store/template-settings-store.js +23 -2
- package/lib/src/shared/unsplash-library/UnsplashLibrary.mixin.d.ts +1 -3
- package/package.json +1 -1
- package/src/brand-page/components/shop/Shop.vue +3 -6
- package/src/brand-page/utils/style.util.ts +30 -0
- package/src/brand-page/utils/view-model.util.ts +20 -20
- package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.ts +1 -1
- package/src/brand-page-maker/components/color-palette/BpColorPalette.vue +123 -17
- package/src/brand-page-maker/components/color-palette/BpColorPicker.vue +9 -13
- package/src/brand-page-maker/components/shop/AddOrEditProductContainer.vue +0 -1
- package/src/brand-page-maker/components/shop/ProductConfigModal.vue +13 -2
- package/src/brand-page-maker/composables/useEventTracker.ts +2 -0
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +2 -1
- package/src/brand-page-maker/stores/logo-store/logo-store.ts +60 -0
- package/src/brand-page-maker/stores/ui/ui-store.ts +5 -2
- package/src/bundles/bundled-translations.de-DE.json +14 -1
- package/src/bundles/bundled-translations.es-ES.json +14 -1
- package/src/bundles/bundled-translations.fr-CA.json +14 -1
- package/src/bundles/bundled-translations.fr-FR.json +14 -1
- package/src/bundles/bundled-translations.json +14 -1
- package/src/bundles/bundled-translations.pt-BR.json +14 -1
- package/src/bundles/bundled-translations.pt-PT.json +14 -1
- package/src/clients/brand-page-client.ts +80 -0
- package/src/composables/useTranslate.ts +6 -0
- package/src/shared/color-picker/components/ColorPicker.mixin.ts +153 -46
- package/src/shared/common/i18n/common.de-DE.json +2 -0
- package/src/shared/common/i18n/common.es-ES.json +2 -0
- package/src/shared/common/i18n/common.fr-CA.json +2 -0
- package/src/shared/common/i18n/common.fr-FR.json +2 -0
- package/src/shared/common/i18n/common.json +2 -0
- package/src/shared/common/i18n/common.pt-BR.json +2 -0
- package/src/shared/common/i18n/common.pt-PT.json +2 -0
- package/src/shared/content-settings/components/color-field/ColorField.vue +299 -14
- package/src/shared/ecommerce-settings/components/product-config-field/ProductConfigOption.vue +15 -4
- package/src/shared/logo-settings/components/EditLogoSettings.mixin.ts +20 -0
- package/src/shared/logo-settings/components/EditLogoSettings.vue +166 -147
- package/src/shared/logo-settings/components/LogoTemplateSearch.vue +266 -0
- package/src/shared/logo-settings/components/i18n/edit-logo-settings.de-DE.json +2 -1
- package/src/shared/logo-settings/components/i18n/edit-logo-settings.es-ES.json +2 -1
- package/src/shared/logo-settings/components/i18n/edit-logo-settings.fr-CA.json +2 -1
- package/src/shared/logo-settings/components/i18n/edit-logo-settings.fr-FR.json +2 -1
- package/src/shared/logo-settings/components/i18n/edit-logo-settings.json +2 -1
- package/src/shared/logo-settings/components/i18n/edit-logo-settings.pt-BR.json +2 -1
- package/src/shared/logo-settings/components/i18n/edit-logo-settings.pt-PT.json +2 -1
- package/src/shared/logo-settings/components/i18n/logo-template-search.de-DE.json +8 -0
- package/src/shared/logo-settings/components/i18n/logo-template-search.es-ES.json +8 -0
- package/src/shared/logo-settings/components/i18n/logo-template-search.fr-CA.json +8 -0
- package/src/shared/logo-settings/components/i18n/logo-template-search.fr-FR.json +8 -0
- package/src/shared/logo-settings/components/i18n/logo-template-search.json +8 -0
- package/src/shared/logo-settings/components/i18n/logo-template-search.pt-BR.json +8 -0
- package/src/shared/logo-settings/components/i18n/logo-template-search.pt-PT.json +8 -0
- package/src/shared/logo-settings/components/logo-switch-confirmation-modal/LogoSwitchConfirmationModal.vue +74 -0
- package/src/shared/logo-settings/components/logo-switch-confirmation-modal/i18n/logo-switch-confirmation-modal.de-DE.json +6 -0
- package/src/shared/logo-settings/components/logo-switch-confirmation-modal/i18n/logo-switch-confirmation-modal.es-ES.json +6 -0
- package/src/shared/logo-settings/components/logo-switch-confirmation-modal/i18n/logo-switch-confirmation-modal.fr-CA.json +6 -0
- package/src/shared/logo-settings/components/logo-switch-confirmation-modal/i18n/logo-switch-confirmation-modal.fr-FR.json +6 -0
- package/src/shared/logo-settings/components/logo-switch-confirmation-modal/i18n/logo-switch-confirmation-modal.json +6 -0
- package/src/shared/logo-settings/components/logo-switch-confirmation-modal/i18n/logo-switch-confirmation-modal.pt-BR.json +6 -0
- package/src/shared/logo-settings/components/logo-switch-confirmation-modal/i18n/logo-switch-confirmation-modal.pt-PT.json +6 -0
- package/src/shared/logo-settings/store/editable-logo-store.ts +14 -1
- package/src/shared/style-settings/store/style-settings-store.ts +3 -2
- package/src/shared/template-settings/models.ts +1 -0
- package/src/shared/template-settings/store/template-settings-store.ts +31 -2
- package/lib/src/brand-page-maker/components/color-palette/BpColorPalette.mixin.d.ts +0 -103
- package/lib/src/brand-page-maker/components/color-palette/BpColorPalette.mixin.js +0 -116
- package/lib/src/bundled-translations-Dy72EMki.js +0 -155
- package/lib/src/bundled-translations.de-DE-D8hpgB4c.js +0 -155
- package/lib/src/bundled-translations.es-ES-DDEID1pS.js +0 -155
- package/lib/src/bundled-translations.fr-CA-Bw7BvB5S.js +0 -155
- package/lib/src/bundled-translations.fr-FR-CYttyVyK.js +0 -155
- package/lib/src/bundled-translations.pt-BR-Ba0E7RWH.js +0 -155
- package/lib/src/bundled-translations.pt-PT-ChNJIgpc.js +0 -155
- package/lib/src/shared/content-settings/components/color-field/ColorField.mixin.d.ts +0 -402
- package/lib/src/shared/content-settings/components/color-field/ColorField.mixin.js +0 -234
- package/src/brand-page-maker/components/color-palette/BpColorPalette.mixin.ts +0 -133
- package/src/shared/content-settings/components/color-field/ColorField.mixin.ts +0 -273
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import type { BrandPageModel, LogoTheme, ThemeColor, FabricLogoTheme, ButtonStyles, PageModel } from '../models';
|
|
2
2
|
import { NavigationDesktop, NavigationMobile } from '../models';
|
|
3
3
|
import { PageStyles, PageHeaderMobile, PageHeaderDesktop, PageFooterMobile, PageFooterDesktop } from '../models';
|
|
4
|
+
/**
|
|
5
|
+
* Simple utility to convert any color format to hex for consistent comparison
|
|
6
|
+
*/
|
|
7
|
+
export declare const normalizeColorToHex: (color: string) => string;
|
|
8
|
+
/**
|
|
9
|
+
* Simple utility to check if two colors match (handles different formats)
|
|
10
|
+
*/
|
|
11
|
+
export declare const colorsMatch: (color1: string, color2: string) => boolean;
|
|
4
12
|
/**
|
|
5
13
|
* @function getColorValueForCorrectCssProperty
|
|
6
14
|
* @param k: string
|
|
@@ -3,8 +3,34 @@ import { PageStyles, PageHeaderMobile, PageHeaderDesktop, PageFooterMobile, Page
|
|
|
3
3
|
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
|
+
import { isRgbColor } from '../../utils/helpers';
|
|
6
7
|
import chroma from 'chroma-js';
|
|
7
8
|
import { hasRTEContent } from '../../brand-page-maker/utils';
|
|
9
|
+
/**
|
|
10
|
+
* Simple utility to convert any color format to hex for consistent comparison
|
|
11
|
+
*/
|
|
12
|
+
export const normalizeColorToHex = (color) => {
|
|
13
|
+
if (!color)
|
|
14
|
+
return color;
|
|
15
|
+
const cleanColor = color.replace(/ /g, '');
|
|
16
|
+
try {
|
|
17
|
+
return isRgbColor(cleanColor) ? RGBAtoHex(cleanColor) : cleanColor;
|
|
18
|
+
}
|
|
19
|
+
catch (e) {
|
|
20
|
+
console.warn('Failed to convert color to hex:', color);
|
|
21
|
+
return cleanColor;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Simple utility to check if two colors match (handles different formats)
|
|
26
|
+
*/
|
|
27
|
+
export const colorsMatch = (color1, color2) => {
|
|
28
|
+
if (!color1 || !color2)
|
|
29
|
+
return false;
|
|
30
|
+
const normalized1 = normalizeColorToHex(color1);
|
|
31
|
+
const normalized2 = normalizeColorToHex(color2);
|
|
32
|
+
return normalized1 === normalized2;
|
|
33
|
+
};
|
|
8
34
|
const MIN_LUM_RATIO = 0.3;
|
|
9
35
|
const parseFabricColorToCssStyle = (fabricColor) => {
|
|
10
36
|
if (fabricColor && typeof fabricColor === 'object') {
|
|
@@ -77,7 +77,7 @@ export const applyViewModelTextStyles = (content, styles) => {
|
|
|
77
77
|
Object.keys(CONTENT_TEXT_STYLE_PROPERTY_KEYS)
|
|
78
78
|
.filter((propKey) => propKey in content)
|
|
79
79
|
.forEach((propKey) => {
|
|
80
|
-
content[propKey] = getTextStyleByContentTextStyleProperty(content, propKey, styles.textStyles
|
|
80
|
+
content[propKey] = getTextStyleByContentTextStyleProperty(content, propKey, styles.textStyles?.textStyleOptions);
|
|
81
81
|
});
|
|
82
82
|
return content;
|
|
83
83
|
};
|
|
@@ -85,9 +85,9 @@ const applyViewModelTextItemTextStyles = (textItems, styles) => {
|
|
|
85
85
|
return textItems.map((item) => {
|
|
86
86
|
let itemTextStyle = item.textStyle;
|
|
87
87
|
if (item.textStyle?.textStyleType) {
|
|
88
|
-
const textStyleOption = styles.textStyles
|
|
88
|
+
const textStyleOption = styles.textStyles?.textStyleOptions?.[item.textStyle.textStyleType];
|
|
89
89
|
itemTextStyle = {
|
|
90
|
-
...textStyleOption
|
|
90
|
+
...textStyleOption?.style,
|
|
91
91
|
applyAutoScale: itemTextStyle.applyAutoScale,
|
|
92
92
|
textAlign: itemTextStyle.textAlign || DEFAULT_TEXT_ALIGN,
|
|
93
93
|
textStyleType: itemTextStyle.textStyleType || undefined,
|
|
@@ -203,17 +203,17 @@ const mapToButtonViewModel = (content, styles, options) => {
|
|
|
203
203
|
};
|
|
204
204
|
// Extract only text-related properties from titleStyle, excluding button styling properties
|
|
205
205
|
const textOnlyProperties = {
|
|
206
|
-
color: options.titleStyle
|
|
207
|
-
fontFamily: options.titleStyle
|
|
208
|
-
fontSize: options.titleStyle
|
|
209
|
-
fontWeight: options.titleStyle
|
|
210
|
-
textAlign: options.titleStyle
|
|
211
|
-
letterSpacing: options.titleStyle
|
|
212
|
-
lineHeight: options.titleStyle
|
|
213
|
-
textStyleType: options.titleStyle
|
|
214
|
-
applyAutoScale: options.titleStyle
|
|
215
|
-
textDecoration: options.titleStyle
|
|
216
|
-
fontStyle: options.titleStyle
|
|
206
|
+
color: options.titleStyle?.color,
|
|
207
|
+
fontFamily: options.titleStyle?.fontFamily,
|
|
208
|
+
fontSize: options.titleStyle?.fontSize,
|
|
209
|
+
fontWeight: options.titleStyle?.fontWeight,
|
|
210
|
+
textAlign: options.titleStyle?.textAlign,
|
|
211
|
+
letterSpacing: options.titleStyle?.letterSpacing,
|
|
212
|
+
lineHeight: options.titleStyle?.lineHeight || LINE_HEIGHT_HEADINGS,
|
|
213
|
+
textStyleType: options.titleStyle?.textStyleType,
|
|
214
|
+
applyAutoScale: options.titleStyle?.applyAutoScale,
|
|
215
|
+
textDecoration: options.titleStyle?.textDecoration,
|
|
216
|
+
fontStyle: options.titleStyle?.fontStyle,
|
|
217
217
|
};
|
|
218
218
|
/* For text content text style backward compatibility */
|
|
219
219
|
const titleStyle = {
|
|
@@ -247,18 +247,18 @@ export const mapToProfileViewModel = (content, styles) => {
|
|
|
247
247
|
containerStyle = applyContentBorderRadius(containerStyle);
|
|
248
248
|
const titleStyle = {
|
|
249
249
|
...content.titleStyle,
|
|
250
|
-
fontSize: content.titleStyle
|
|
251
|
-
lineHeight: content.titleStyle
|
|
250
|
+
fontSize: content.titleStyle?.fontSize || FONT_SIZE_BODY,
|
|
251
|
+
lineHeight: content.titleStyle?.lineHeight || LINE_HEIGHT_BODY,
|
|
252
252
|
};
|
|
253
253
|
const descriptionStyle = {
|
|
254
254
|
...content.descriptionStyle,
|
|
255
|
-
fontSize: content.descriptionStyle
|
|
256
|
-
lineHeight: content.descriptionStyle
|
|
255
|
+
fontSize: content.descriptionStyle?.fontSize || FONT_SIZE_BODY,
|
|
256
|
+
lineHeight: content.descriptionStyle?.lineHeight || LINE_HEIGHT_BODY,
|
|
257
257
|
};
|
|
258
258
|
const nameStyle = {
|
|
259
259
|
...content.nameStyle,
|
|
260
|
-
fontSize: content.nameStyle
|
|
261
|
-
lineHeight: content.nameStyle
|
|
260
|
+
fontSize: content.nameStyle?.fontSize || FONT_SIZE_HEADINGS,
|
|
261
|
+
lineHeight: content.nameStyle?.lineHeight || LINE_HEIGHT_HEADINGS,
|
|
262
262
|
};
|
|
263
263
|
return applyViewModelTextStyles({
|
|
264
264
|
...content,
|
|
@@ -214,9 +214,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
214
214
|
triggerLockedContentClickedEvent(payload: {
|
|
215
215
|
type: string;
|
|
216
216
|
}): Promise<void>;
|
|
217
|
-
onTemplateSelected(payload:
|
|
218
|
-
templateId: string;
|
|
219
|
-
}): Promise<void>;
|
|
217
|
+
onTemplateSelected(payload: import("../../stores").OnTemplateSelectedPayload): Promise<void>;
|
|
220
218
|
showUpgradeModalAndSaveAsync(): Promise<void>;
|
|
221
219
|
setIsPersonalisationEnabled({ isPersonalisationEnabled, }: {
|
|
222
220
|
isPersonalisationEnabled: boolean;
|
|
@@ -877,9 +877,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
877
877
|
triggerLockedContentClickedEvent(payload: {
|
|
878
878
|
type: string;
|
|
879
879
|
}): Promise<void>;
|
|
880
|
-
onTemplateSelected(payload:
|
|
881
|
-
templateId: string;
|
|
882
|
-
}): Promise<void>;
|
|
880
|
+
onTemplateSelected(payload: import("../../stores").OnTemplateSelectedPayload): Promise<void>;
|
|
883
881
|
showUpgradeModalAndSaveAsync(): Promise<void>;
|
|
884
882
|
setIsPersonalisationEnabled({ isPersonalisationEnabled, }: {
|
|
885
883
|
isPersonalisationEnabled: boolean;
|
|
@@ -997,6 +995,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
997
995
|
loadPageNo({ pageNo }: {
|
|
998
996
|
pageNo: number;
|
|
999
997
|
}): Promise<void>;
|
|
998
|
+
getCachedTemplateByTokenAsync(token: string): Promise<import("../../../shared/template-settings/models").TemplateSettingsTemplate | undefined>;
|
|
1000
999
|
onTemplateSelected(payload: import("../../../shared/template-settings/models").OnTemplateSelectedPayload): Promise<void>;
|
|
1001
1000
|
onCategorySelected(payload: import("../../../shared/template-settings/models").OnCategorySelectedPayload): Promise<void>;
|
|
1002
1001
|
onSearch(payload: import("../../../shared/template-settings/models").OnSearchPayload): Promise<void>;
|
package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.js
CHANGED
|
@@ -303,7 +303,7 @@ export default defineComponent({
|
|
|
303
303
|
eventProps: {
|
|
304
304
|
content_category: this.contentSettingsStore.getContentCategory(currentlySelectedItem.type),
|
|
305
305
|
content_type: currentlySelectedItem.type,
|
|
306
|
-
select_location: SELECT_LOCATIONS.
|
|
306
|
+
select_location: SELECT_LOCATIONS.SIDEBAR,
|
|
307
307
|
},
|
|
308
308
|
});
|
|
309
309
|
}
|
|
@@ -40,6 +40,8 @@ export declare const EVENTS: {
|
|
|
40
40
|
WEBSITE_MAKER_CALENDLY_LINK_CLICKED: string;
|
|
41
41
|
WEBSITE_MAKER_UPSELL_OFFER: string;
|
|
42
42
|
WEBSITE_MAKER_UPSELL_ACTION: string;
|
|
43
|
+
WEBSITE_MAKER_SWITCH_LOGO: string;
|
|
44
|
+
WEBSITE_MAKER_SWITCH_LOGO_MODAL: string;
|
|
43
45
|
};
|
|
44
46
|
export declare const SELECT_LOCATIONS: {
|
|
45
47
|
MAKER_PREVIEW: string;
|
|
@@ -23,6 +23,8 @@ export const EVENTS = {
|
|
|
23
23
|
WEBSITE_MAKER_CALENDLY_LINK_CLICKED: 'website_maker_calendly_link_clicked',
|
|
24
24
|
WEBSITE_MAKER_UPSELL_OFFER: 'website_maker_upsell_offer',
|
|
25
25
|
WEBSITE_MAKER_UPSELL_ACTION: 'website_maker_upsell_action',
|
|
26
|
+
WEBSITE_MAKER_SWITCH_LOGO: 'website_maker_switch_logo',
|
|
27
|
+
WEBSITE_MAKER_SWITCH_LOGO_MODAL: 'website_maker_switch_logo_modal',
|
|
26
28
|
};
|
|
27
29
|
export const SELECT_LOCATIONS = {
|
|
28
30
|
MAKER_PREVIEW: 'maker_preview',
|
|
@@ -340,7 +340,7 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
340
340
|
this.setSelectedTemplateId({
|
|
341
341
|
templateId: payload.templateId,
|
|
342
342
|
});
|
|
343
|
-
if (this.isModifiedAfterTemplateApplied) {
|
|
343
|
+
if (this.isModifiedAfterTemplateApplied && !payload.forceApply) {
|
|
344
344
|
this.setIsChangeTemplateConfirmModalVisible({
|
|
345
345
|
isVisible: true,
|
|
346
346
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { LogoTemplate } from '../../../clients/brand-page-client';
|
|
1
2
|
export interface LogoTemplateAsset {
|
|
2
3
|
token: string;
|
|
3
4
|
version: number;
|
|
@@ -13,6 +14,15 @@ export interface LogoDraftAsset {
|
|
|
13
14
|
export interface LogoStoreState {
|
|
14
15
|
logoTemplateAsset?: LogoTemplateAsset;
|
|
15
16
|
logoDraftAssets: LogoDraftAsset[];
|
|
17
|
+
logoSearchState: {
|
|
18
|
+
primaryText: string;
|
|
19
|
+
searchText: string;
|
|
20
|
+
currentPage: number;
|
|
21
|
+
isSearching: boolean;
|
|
22
|
+
logoTemplates: LogoTemplate[];
|
|
23
|
+
totalResultCount: number;
|
|
24
|
+
hasMore: boolean;
|
|
25
|
+
};
|
|
16
26
|
}
|
|
17
27
|
export declare const useLogoStore: import("pinia").StoreDefinition<"logoStore", LogoStoreState, {}, {
|
|
18
28
|
initialise(payload: {
|
|
@@ -24,4 +34,10 @@ export declare const useLogoStore: import("pinia").StoreDefinition<"logoStore",
|
|
|
24
34
|
logoDraftAsset: LogoDraftAsset;
|
|
25
35
|
}): void;
|
|
26
36
|
getLogoDraftAssetByToken(token: string): LogoDraftAsset | undefined;
|
|
37
|
+
resetLogoTemplateSearchResults(): void;
|
|
38
|
+
searchLogoTemplatesAsync(payload: {
|
|
39
|
+
searchText: string;
|
|
40
|
+
primaryText: string;
|
|
41
|
+
page: number;
|
|
42
|
+
}): Promise<void>;
|
|
27
43
|
}>;
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import { defineStore } from 'pinia';
|
|
2
|
+
import brandPageClient from '../../../clients/brand-page-client';
|
|
2
3
|
export const useLogoStore = defineStore('logoStore', {
|
|
3
4
|
state: () => ({
|
|
4
5
|
logoTemplateAsset: undefined,
|
|
5
6
|
logoDraftAssets: [],
|
|
7
|
+
logoSearchState: {
|
|
8
|
+
primaryText: '',
|
|
9
|
+
searchText: '',
|
|
10
|
+
currentPage: 1,
|
|
11
|
+
isSearching: false,
|
|
12
|
+
logoTemplates: [],
|
|
13
|
+
totalResultCount: 0,
|
|
14
|
+
hasMore: false,
|
|
15
|
+
},
|
|
6
16
|
}),
|
|
7
17
|
actions: {
|
|
8
18
|
initialise(payload) {
|
|
@@ -21,5 +31,39 @@ export const useLogoStore = defineStore('logoStore', {
|
|
|
21
31
|
getLogoDraftAssetByToken(token) {
|
|
22
32
|
return this.logoDraftAssets.find((x) => x.token === token);
|
|
23
33
|
},
|
|
34
|
+
resetLogoTemplateSearchResults() {
|
|
35
|
+
this.logoSearchState.logoTemplates = [];
|
|
36
|
+
this.logoSearchState.currentPage = 1;
|
|
37
|
+
this.logoSearchState.totalResultCount = 0;
|
|
38
|
+
this.logoSearchState.hasMore = false;
|
|
39
|
+
},
|
|
40
|
+
async searchLogoTemplatesAsync(payload) {
|
|
41
|
+
this.logoSearchState.isSearching = true;
|
|
42
|
+
try {
|
|
43
|
+
const response = await brandPageClient.searchLogoTemplatesAsync({
|
|
44
|
+
businessName: payload.primaryText,
|
|
45
|
+
query: payload.searchText,
|
|
46
|
+
page: payload.page,
|
|
47
|
+
pageSize: 20,
|
|
48
|
+
});
|
|
49
|
+
this.logoSearchState.logoTemplates = [
|
|
50
|
+
...this.logoSearchState.logoTemplates,
|
|
51
|
+
...(response?.paginatedItems || []),
|
|
52
|
+
];
|
|
53
|
+
this.logoSearchState.primaryText = payload.primaryText;
|
|
54
|
+
this.logoSearchState.searchText = payload.searchText;
|
|
55
|
+
this.logoSearchState.currentPage = payload.page;
|
|
56
|
+
this.logoSearchState.totalResultCount = response?.totalResultCount || 0;
|
|
57
|
+
}
|
|
58
|
+
catch (e) {
|
|
59
|
+
console.error('Error searching logo templates:', e);
|
|
60
|
+
}
|
|
61
|
+
finally {
|
|
62
|
+
this.logoSearchState.hasMore =
|
|
63
|
+
this.logoSearchState.totalResultCount >
|
|
64
|
+
this.logoSearchState.logoTemplates.length;
|
|
65
|
+
this.logoSearchState.isSearching = false;
|
|
66
|
+
}
|
|
67
|
+
},
|
|
24
68
|
},
|
|
25
69
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Endpoints, UiDeviceMode, UIRootState, UIRootStateThirdPartySettings, UiScreenSizeMode } from '../../../shared/models';
|
|
2
|
+
import { type OnTemplateSelectedPayload } from '../brandpage-maker';
|
|
2
3
|
import type { LogoTheme, UserPersonalisationContent } from '../../../brand-page';
|
|
3
4
|
export declare const useUiStore: import("pinia").StoreDefinition<"ui", UIRootState, {
|
|
4
5
|
endpoints: () => Endpoints;
|
|
@@ -35,9 +36,7 @@ export declare const useUiStore: import("pinia").StoreDefinition<"ui", UIRootSta
|
|
|
35
36
|
/**
|
|
36
37
|
* Proxy method to propagate template selection event to style settings store module
|
|
37
38
|
*/
|
|
38
|
-
onTemplateSelected(payload:
|
|
39
|
-
templateId: string;
|
|
40
|
-
}): Promise<void>;
|
|
39
|
+
onTemplateSelected(payload: OnTemplateSelectedPayload): Promise<void>;
|
|
41
40
|
showUpgradeModalAndSaveAsync(): Promise<void>;
|
|
42
41
|
setIsPersonalisationEnabled({ isPersonalisationEnabled, }: {
|
|
43
42
|
isPersonalisationEnabled: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineStore } from 'pinia';
|
|
2
2
|
import { UI_DEVICE_MODES, UI_SCREENSIZE_MODES } from '../../../shared/models';
|
|
3
3
|
import { DEFAULT_LOGO_BACKGROUND_COLOR_RGB, DEFAULT_LOGO_TEXT_COLOR_RGB, } from '../../../brand-page/constants';
|
|
4
|
-
import { useBrandPageMakerStore } from '../brandpage-maker';
|
|
4
|
+
import { useBrandPageMakerStore, } from '../brandpage-maker';
|
|
5
5
|
import { useBrandPageMakerUserStore } from '../user';
|
|
6
6
|
import { useBrandPageContainerStore } from '../brandpage-container';
|
|
7
7
|
import { DEFAULT_ADMIN_ENDPOINTS, DEFAULT_USER_ENDPOINTS, } from '../../constants';
|