@designcrowd/library.brand-page 5.15.1-ast-color-bug-3 → 5.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/src/{CreatedOnBrandCrowd-de-de-ynS-2K9E.js → CreatedOnBrandCrowd-de-de-CC0IFuTS.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-BnJe87v-.js → CreatedOnBrandCrowd-en-us-DHSPJreq.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-DaY0886t.js → CreatedOnBrandCrowd-es-es-D0Z2Ftc8.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-BFH_pox0.js → CreatedOnBrandCrowd-fr-ca-B5m-vPKs.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-BFH_pox0.js → CreatedOnBrandCrowd-fr-fr-B5m-vPKs.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-DhFx90_M.js → CreatedOnBrandCrowd-pt-br-BUldaocW.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-DhFx90_M.js → CreatedOnBrandCrowd-pt-pt-BUldaocW.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-7WsH6h_7.js → CreatedOnDcom-de-de-FfVsOpHR.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-B6OM5-ww.js → CreatedOnDcom-en-us-D-MPmkgN.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-BBUndE0w.js → CreatedOnDcom-es-es-CNC_3nv0.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-CHkGzcHQ.js → CreatedOnDcom-fr-ca-DzqdFn7y.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-D81mM4O9.js → CreatedOnDcom-fr-fr-rBYGR5It.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-EmLu1Dd6.js → CreatedOnDcom-pt-br-CDu8WIMK.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-BF_SPv8p.js → CreatedOnDcom-pt-pt-Dx-OKM33.js} +1 -1
- package/lib/src/brand-page/models/index.d.ts +0 -1
- package/lib/src/brand-page/models/index.js +1 -14
- package/lib/src/brand-page/utils/logo.util.js +3 -3
- package/lib/src/brand-page/utils/migration/migration-07.js +11 -0
- package/lib/src/brand-page/utils/migration.util.js +1 -7
- 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 +3 -6
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +0 -7
- 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/constants/config-settings-constant.js +1 -1
- 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 +3 -33
- 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 +23 -23
- package/lib/src/css/library.brand-page-brandPage.min.css +23 -23
- package/lib/src/css/library.brand-page-designCom.min.css +23 -23
- package/lib/src/css/library.brand-page-preview.min.css +23 -23
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-R-LSrTQC.js → lib-BreGHBnl.js} +28206 -27976
- package/lib/src/shared/color-picker/components/ColorPicker.mixin.d.ts +0 -1
- package/lib/src/shared/color-picker/components/ColorPicker.mixin.js +27 -33
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +0 -7
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +1 -3
- package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +1 -3
- package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.js +1 -3
- package/lib/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.d.ts +0 -14
- package/lib/src/shared/ecommerce-settings/store/shop-settings-store.d.ts +1 -3
- package/lib/src/shared/ecommerce-settings/store/shop-settings-store.js +2 -2
- 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 -12
- package/lib/src/shared/shape-library/ShapeLibrary.mixin.d.ts +1 -3
- package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +1 -10
- package/lib/src/shared/style-settings/store/style-settings-store.d.ts +0 -8
- package/lib/src/shared/style-settings/store/style-settings-store.js +2 -25
- 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/logo/Logo.vue +2 -1
- package/src/brand-page/components/logo/LogoRender.vue +1 -1
- package/src/brand-page/components/shop/FeaturedDisplay.vue +7 -6
- package/src/brand-page/components/shop/PaymentModal.vue +0 -2
- package/src/brand-page/components/shop/ProductDetailModal.vue +2 -1
- package/src/brand-page/components/shop/Shop.vue +12 -31
- package/src/brand-page/components/shop/TextDisplay.vue +7 -6
- package/src/brand-page/components/shop/ThumbnailDisplay.vue +7 -6
- package/src/brand-page/models/index.ts +1 -18
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +3 -6
- package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +0 -1
- package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +0 -2
- package/src/brand-page/utils/logo.util.test.ts +3 -3
- package/src/brand-page/utils/logo.util.ts +3 -3
- package/src/brand-page/utils/migration/migration-07.ts +13 -0
- package/src/brand-page/utils/migration.util.ts +1 -8
- package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.ts +1 -1
- package/src/brand-page-maker/components/shop/AddOrEditProductContainer.vue +3 -8
- package/src/brand-page-maker/composables/useEventTracker.ts +2 -0
- package/src/brand-page-maker/constants/config-settings-constant.ts +1 -1
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +5 -48
- 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 +35 -43
- 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/payment-config-field/PaymentConfigField.mixin.ts +1 -3
- package/src/shared/ecommerce-settings/components/product-config-field/ProductConfigOption.vue +4 -2
- package/src/shared/ecommerce-settings/store/shop-settings-store.ts +2 -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 +2 -29
- 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/utils/migration/migration-08.d.ts +0 -2
- package/lib/src/brand-page/utils/migration/migration-08.js +0 -10
- 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/src/brand-page/utils/migration/migration-08.ts +0 -14
|
@@ -51,7 +51,6 @@ export declare class PageStyles {
|
|
|
51
51
|
logoStyles: LogoStyles;
|
|
52
52
|
textStyles: TextStyles;
|
|
53
53
|
galleryStyles: GalleryStyles;
|
|
54
|
-
newColors: string[];
|
|
55
54
|
constructor(option?: Partial<Omit<PageStyles, 'logoStyles' | 'buttonStyles' | 'backgroundStyles' | 'textStyles'>> & {
|
|
56
55
|
logoStyles?: Partial<LogoStyles>;
|
|
57
56
|
buttonStyles?: Partial<ButtonStyles>;
|
|
@@ -80,7 +80,6 @@ export class PageStyles {
|
|
|
80
80
|
logoStyles;
|
|
81
81
|
textStyles;
|
|
82
82
|
galleryStyles;
|
|
83
|
-
newColors;
|
|
84
83
|
constructor(option = {}) {
|
|
85
84
|
this.backgroundStyles = new BackgroundStyles(option.backgroundStyles || {
|
|
86
85
|
backgroundImageUrl: '',
|
|
@@ -105,7 +104,6 @@ export class PageStyles {
|
|
|
105
104
|
? new TextStyles(option.textStyles)
|
|
106
105
|
: TextStyles.GetDefaultTextStyle();
|
|
107
106
|
this.galleryStyles = new GalleryStyles(option.galleryStyles);
|
|
108
|
-
this.newColors = option.newColors || [];
|
|
109
107
|
}
|
|
110
108
|
}
|
|
111
109
|
export const ASPECT_RATIOS = {
|
|
@@ -397,18 +395,7 @@ export class BrandPageModel {
|
|
|
397
395
|
paymentConfig;
|
|
398
396
|
constructor(options) {
|
|
399
397
|
this.v = options.v || 0;
|
|
400
|
-
|
|
401
|
-
if (options.styles && !options.styles.hasOwnProperty('newColors')) {
|
|
402
|
-
options.styles.newColors = [];
|
|
403
|
-
}
|
|
404
|
-
// Extract newColors directly from options if it exists at the top level
|
|
405
|
-
const newColors = options.styles?.newColors || options.newColors || [];
|
|
406
|
-
// Ensure newColors is passed to PageStyles constructor
|
|
407
|
-
const stylesWithNewColors = {
|
|
408
|
-
...options.styles,
|
|
409
|
-
newColors: newColors,
|
|
410
|
-
};
|
|
411
|
-
this.styles = new PageStyles(stylesWithNewColors);
|
|
398
|
+
this.styles = new PageStyles(options.styles);
|
|
412
399
|
const theme = {
|
|
413
400
|
primaryColor: this.styles.textStyles.style.color || '',
|
|
414
401
|
secondaryColor: this.styles.backgroundStyles.style.background || '',
|
|
@@ -175,9 +175,9 @@ export const getOptimalLogoSize = (width, height, currentSize) => {
|
|
|
175
175
|
if (!parseFloat(`${aspectRatio}`) || aspectRatio <= 1) {
|
|
176
176
|
return currentSize;
|
|
177
177
|
}
|
|
178
|
-
const newSize = parseFloat(currentSize) + (aspectRatio - 1) *
|
|
179
|
-
if (newSize >
|
|
180
|
-
return '
|
|
178
|
+
const newSize = parseFloat(currentSize) + (aspectRatio - 1) * 4.5;
|
|
179
|
+
if (newSize > 11) {
|
|
180
|
+
return '11rem';
|
|
181
181
|
}
|
|
182
182
|
else {
|
|
183
183
|
return `${Math.round(newSize)}rem`;
|
|
@@ -48,6 +48,17 @@ export const migration07 = async (migrationResult, options) => {
|
|
|
48
48
|
const currentMaxHeight = config.logoImageHeight || DEFAULT_LOGO_HEIGHT;
|
|
49
49
|
const dimensions = calculateConstrainedDimensions(logoData, currentMaxWidth, currentMaxHeight);
|
|
50
50
|
config.logoImageHeight = dimensions.height;
|
|
51
|
+
config.logoImageWidth = dimensions.width;
|
|
52
|
+
}
|
|
53
|
+
else if (!logoData &&
|
|
54
|
+
(sectionName === 'pageFooterDesktop' ||
|
|
55
|
+
sectionName === 'pageFooterMobile' ||
|
|
56
|
+
sectionName === 'pageHeaderMobile')) {
|
|
57
|
+
const currentMaxHeight = config.logoImageHeight || DEFAULT_LOGO_HEIGHT;
|
|
58
|
+
const heightValue = parseFloat(currentMaxHeight);
|
|
59
|
+
const newHeight = heightValue >= 13 ? heightValue - 4 : heightValue - 1;
|
|
60
|
+
config.logoImageHeight = `${newHeight}rem`;
|
|
61
|
+
config.logoImageWidth = `${newHeight}rem`;
|
|
51
62
|
}
|
|
52
63
|
});
|
|
53
64
|
}
|
|
@@ -6,11 +6,10 @@ import { migration02 } from './migration/migration-02';
|
|
|
6
6
|
import { migration03 } from './migration/migration-03';
|
|
7
7
|
import { migration04 } from './migration/migration-04';
|
|
8
8
|
import { migration05 } from './migration/migration-05';
|
|
9
|
+
import { migration06 } from './migration/migration-06';
|
|
9
10
|
import { migration05_1 } from './migration/migration-05_1';
|
|
10
11
|
import { migration05_2 } from './migration/migration-05_2';
|
|
11
|
-
import { migration06 } from './migration/migration-06';
|
|
12
12
|
import { migration07 } from './migration/migration-07';
|
|
13
|
-
import { migration08 } from './migration/migration-08';
|
|
14
13
|
const MIGRATION_TABLE = [
|
|
15
14
|
{
|
|
16
15
|
version: 1,
|
|
@@ -63,11 +62,6 @@ const MIGRATION_TABLE = [
|
|
|
63
62
|
migrateFn: migration07,
|
|
64
63
|
description: 'Migrating logo render sizes for logo content, header and footer sections',
|
|
65
64
|
},
|
|
66
|
-
{
|
|
67
|
-
version: 8,
|
|
68
|
-
migrateFn: migration08,
|
|
69
|
-
description: 'Adding newColors property for color picker persistence',
|
|
70
|
-
},
|
|
71
65
|
];
|
|
72
66
|
export const GetLatestModelVersion = () => Math.max(...MIGRATION_TABLE.map((x) => x.version));
|
|
73
67
|
export const migrateBrandPageModel = async (brandPageModel, options) => {
|
|
@@ -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>;
|
|
@@ -1105,9 +1104,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1105
1104
|
paymentConfig: import("../../../brand-page").BrandPagePaymentConfig | undefined;
|
|
1106
1105
|
pages: import("../../../brand-page").PageModel[];
|
|
1107
1106
|
}): void;
|
|
1108
|
-
setPaymentConfig(
|
|
1109
|
-
paymentConfig: import("../../../brand-page").BrandPagePaymentConfig | undefined;
|
|
1110
|
-
}): void;
|
|
1107
|
+
setPaymentConfig(value: import("../../../brand-page").BrandPagePaymentConfig): void;
|
|
1111
1108
|
getProductById(id: string): import("../../../brand-page/models/shop.model").ProductModel | undefined;
|
|
1112
1109
|
addProduct(product: import("../../../brand-page/models/shop.model").ProductModel): void;
|
|
1113
1110
|
updateProduct(id: string, updatedProduct: import("../../../brand-page/models/shop.model").ProductModel): void;
|
package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts
CHANGED
|
@@ -1065,13 +1065,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
1065
1065
|
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" | "cookie" | "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";
|
|
1066
1066
|
}): Promise<void>;
|
|
1067
1067
|
toggleLogoBackground(): Promise<any>;
|
|
1068
|
-
addNewColor({ color }: {
|
|
1069
|
-
color: string;
|
|
1070
|
-
}): void;
|
|
1071
|
-
setNewColors({ newColors }: {
|
|
1072
|
-
newColors: string[];
|
|
1073
|
-
}): void;
|
|
1074
|
-
removeDuplicateNewColors(): void;
|
|
1075
1068
|
}>;
|
|
1076
1069
|
}, {
|
|
1077
1070
|
isDraggingContent: boolean;
|
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',
|
|
@@ -2525,7 +2525,7 @@ export const SHOP_SECTION_SETTINGS_CONFIG = () => ({
|
|
|
2525
2525
|
shouldRender: false,
|
|
2526
2526
|
},
|
|
2527
2527
|
paymentConfig: {
|
|
2528
|
-
type: 'payment-config',
|
|
2528
|
+
type: 'shop-payment-config',
|
|
2529
2529
|
groupId: REQUEST_PAYMENT_GROUPS.settings,
|
|
2530
2530
|
overrideValueFieldName: 'shopPaymentConfig',
|
|
2531
2531
|
},
|
|
@@ -234,14 +234,13 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
234
234
|
reset: true,
|
|
235
235
|
brandPageType: this.brandPageType,
|
|
236
236
|
});
|
|
237
|
-
const { buttonStyles, logoStyles, textStyles, galleryStyles
|
|
237
|
+
const { buttonStyles, logoStyles, textStyles, galleryStyles } = brandPageModel.styles;
|
|
238
238
|
styleSettingsStore.setState({
|
|
239
239
|
newState: {
|
|
240
240
|
buttonStyles,
|
|
241
241
|
logoStyles,
|
|
242
242
|
textStyles,
|
|
243
243
|
galleryStyles,
|
|
244
|
-
newColors: newColors || [], // Use saved newColors or empty array if not available
|
|
245
244
|
},
|
|
246
245
|
});
|
|
247
246
|
this.initialisePages({
|
|
@@ -265,9 +264,6 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
265
264
|
styleSettingsStore.setButtonStyles(brandPageModel.styles.buttonStyles);
|
|
266
265
|
styleSettingsStore.setTextStyles(brandPageModel.styles.textStyles);
|
|
267
266
|
styleSettingsStore.setGalleryStyles(brandPageModel.styles.galleryStyles);
|
|
268
|
-
styleSettingsStore.setNewColors({
|
|
269
|
-
newColors: brandPageModel.styles.newColors || [],
|
|
270
|
-
});
|
|
271
267
|
if (!userStore.isAdmin) {
|
|
272
268
|
containerStore.setDesignTemplateToken({
|
|
273
269
|
designTemplateToken: this.selectedTemplateId,
|
|
@@ -344,7 +340,7 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
344
340
|
this.setSelectedTemplateId({
|
|
345
341
|
templateId: payload.templateId,
|
|
346
342
|
});
|
|
347
|
-
if (this.isModifiedAfterTemplateApplied) {
|
|
343
|
+
if (this.isModifiedAfterTemplateApplied && !payload.forceApply) {
|
|
348
344
|
this.setIsChangeTemplateConfirmModalVisible({
|
|
349
345
|
isVisible: true,
|
|
350
346
|
});
|
|
@@ -433,38 +429,17 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
433
429
|
: undefined;
|
|
434
430
|
if (!this.isUserDraft && userPersonalisation) {
|
|
435
431
|
const { model } = await applyUserPersonalisationToBrandPageModelAsync(userPersonalisation, new BrandPageModel(brandPageModel));
|
|
436
|
-
// Preserve newColors before overwriting styles
|
|
437
|
-
const originalNewColors = brandPageModel.styles.newColors;
|
|
438
432
|
brandPageModel.styles = model.styles;
|
|
439
433
|
brandPageModel.pages = model.pages;
|
|
440
|
-
// Restore newColors if they were lost in the transformation
|
|
441
|
-
if (originalNewColors &&
|
|
442
|
-
(!brandPageModel.styles.newColors ||
|
|
443
|
-
(Array.isArray(brandPageModel.styles.newColors) &&
|
|
444
|
-
brandPageModel.styles.newColors.length === 0))) {
|
|
445
|
-
brandPageModel.styles.newColors = originalNewColors;
|
|
446
|
-
}
|
|
447
434
|
}
|
|
448
435
|
if (!userStore.isAdmin) {
|
|
449
436
|
const { model } = applyLogoThemeToBrandPageModel(logoTheme, new BrandPageModel(brandPageModel));
|
|
450
|
-
// Preserve newColors before overwriting styles
|
|
451
|
-
const originalNewColors = brandPageModel.styles.newColors;
|
|
452
437
|
brandPageModel.styles = model.styles;
|
|
453
438
|
brandPageModel.pageHeaderMobile = model.pageHeaderMobile;
|
|
454
439
|
brandPageModel.pageHeaderDesktop = model.pageHeaderDesktop;
|
|
455
440
|
brandPageModel.pageFooterMobile = model.pageFooterMobile;
|
|
456
441
|
brandPageModel.pageFooterDesktop = model.pageFooterDesktop;
|
|
457
442
|
brandPageModel.pages = model.pages;
|
|
458
|
-
// Restore newColors if they were lost in the transformation
|
|
459
|
-
if (originalNewColors &&
|
|
460
|
-
(!brandPageModel.styles.newColors ||
|
|
461
|
-
(Array.isArray(brandPageModel.styles.newColors) &&
|
|
462
|
-
brandPageModel.styles.newColors.length === 0) ||
|
|
463
|
-
(typeof brandPageModel.styles.newColors === 'object' &&
|
|
464
|
-
!Array.isArray(brandPageModel.styles.newColors) &&
|
|
465
|
-
Object.keys(brandPageModel.styles.newColors).length === 0))) {
|
|
466
|
-
brandPageModel.styles.newColors = originalNewColors;
|
|
467
|
-
}
|
|
468
443
|
}
|
|
469
444
|
styleSettingsStore.initialise({
|
|
470
445
|
reset: false,
|
|
@@ -574,14 +549,13 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
574
549
|
},
|
|
575
550
|
};
|
|
576
551
|
backgroundSettingsStore.setState(backgroundSetStatePayload);
|
|
577
|
-
const { buttonStyles, logoStyles, textStyles, galleryStyles
|
|
552
|
+
const { buttonStyles, logoStyles, textStyles, galleryStyles } = brandPageModel.styles;
|
|
578
553
|
styleSettingsStore.setState({
|
|
579
554
|
newState: {
|
|
580
555
|
buttonStyles,
|
|
581
556
|
logoStyles,
|
|
582
557
|
textStyles,
|
|
583
558
|
galleryStyles,
|
|
584
|
-
newColors: Array.isArray(newColors) ? newColors : [],
|
|
585
559
|
},
|
|
586
560
|
});
|
|
587
561
|
navigationStyleSettingsStore.setState({
|
|
@@ -790,7 +764,6 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
790
764
|
const buttonStyles = styleSettingsStore.buttonStyles;
|
|
791
765
|
const textStyles = styleSettingsStore.textStyles;
|
|
792
766
|
const galleryStyles = styleSettingsStore.galleryStyles;
|
|
793
|
-
const newColors = styleSettingsStore.newColors;
|
|
794
767
|
const navigation = navigationStyleSettingsStore.navigation;
|
|
795
768
|
return {
|
|
796
769
|
v: GetLatestModelVersion(),
|
|
@@ -801,7 +774,6 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
801
774
|
backgroundStyles,
|
|
802
775
|
textStyles,
|
|
803
776
|
galleryStyles,
|
|
804
|
-
newColors,
|
|
805
777
|
},
|
|
806
778
|
pageHeaderDesktop: Object.assign({}, pageSettingsStore.sections[PAGE_SECTIONS.header][VIEWPORTS.desktop], { navigation: navigation[PAGE_SECTIONS.header][VIEWPORTS.desktop] }),
|
|
807
779
|
pageHeaderMobile: Object.assign({}, pageSettingsStore.sections[PAGE_SECTIONS.header][VIEWPORTS.mobile], { navigation: navigation[PAGE_SECTIONS.header][VIEWPORTS.mobile] }),
|
|
@@ -847,7 +819,6 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
847
819
|
const buttonStyles = styleSettingsStore.buttonStyles;
|
|
848
820
|
const textStyles = styleSettingsStore.textStyles;
|
|
849
821
|
const galleryStyles = styleSettingsStore.galleryStyles;
|
|
850
|
-
const newColors = styleSettingsStore.newColors;
|
|
851
822
|
const navigation = navigationStyleSettingsStore.navigation;
|
|
852
823
|
return {
|
|
853
824
|
v: GetLatestModelVersion(),
|
|
@@ -857,7 +828,6 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
857
828
|
backgroundStyles,
|
|
858
829
|
textStyles,
|
|
859
830
|
galleryStyles,
|
|
860
|
-
newColors,
|
|
861
831
|
},
|
|
862
832
|
pageHeaderMobile: Object.assign({}, pageSettingsStore.sections[PAGE_SECTIONS.header][VIEWPORTS.mobile], {
|
|
863
833
|
navigation: navigation[PAGE_SECTIONS.header][VIEWPORTS.mobile],
|
|
@@ -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';
|