@designcrowd/library.brand-page 5.17.17 → 5.17.18-ast-layout
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-C9P2zdPv.js → CreatedOnBrandCrowd-de-de-B3Kzl17t.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-DBtTxqeM.js → CreatedOnBrandCrowd-en-us-DELbE7_X.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-DC5aFDcN.js → CreatedOnBrandCrowd-es-es-rZtjzBFS.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-CNiUorYS.js → CreatedOnBrandCrowd-fr-ca-Db56MNkl.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-CNiUorYS.js → CreatedOnBrandCrowd-fr-fr-Db56MNkl.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-CuqWCZLB.js → CreatedOnBrandCrowd-pt-br-BgyU_-LR.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-CuqWCZLB.js → CreatedOnBrandCrowd-pt-pt-BgyU_-LR.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-DRyCl_4J.js → CreatedOnDcom-de-de-DC1SfcCh.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-CV2aCrWr.js → CreatedOnDcom-en-us-4nXZjUop.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-2db-EVNQ.js → CreatedOnDcom-es-es-zbJx7K9T.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-hK0aCeAJ.js → CreatedOnDcom-fr-ca-Bql0VfNS.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-cXZK46sf.js → CreatedOnDcom-fr-fr-B-b5k54k.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-DxjyLWyi.js → CreatedOnDcom-pt-br-B9KQtWm7.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-C4KIe_Nv.js → CreatedOnDcom-pt-pt-D4T1u4a1.js} +1 -1
- package/lib/src/brand-page/constants/font.constants.js +1 -1
- package/lib/src/brand-page/models/logo.model.d.ts +1 -0
- package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +2 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +1 -0
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/social-share/SocialShare.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.js +5 -0
- package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.js +3 -2
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.d.ts +2 -1
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +2 -1
- package/lib/src/clients/fabric-render-client.d.ts +7 -0
- package/lib/src/clients/fabric-render-client.js +4 -1
- package/lib/src/css/library.brand-page-brandCrowd.min.css +5 -5
- package/lib/src/css/library.brand-page-brandPage.min.css +5 -5
- package/lib/src/css/library.brand-page-designCom.min.css +5 -5
- package/lib/src/css/library.brand-page-preview.min.css +5 -5
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-DD0QNGsz.js → lib-CXA7tc7k.js} +3493 -3468
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +1 -1
- package/lib/src/shared/font-family-selector/FontFamilySelector.mixin.js +2 -1
- package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.d.ts +5 -3
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +6 -4
- package/lib/src/shared/logo-settings/store/editable-logo-store.d.ts +5 -3
- package/lib/src/shared/logo-settings/store/editable-logo-store.js +52 -21
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +5 -1
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +10 -4
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +1 -1
- package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +1 -1
- package/package.json +1 -1
- package/src/brand-page/components/shop/ProductDetailModal.vue +3 -1
- package/src/brand-page/constants/font.constants.ts +1 -1
- package/src/brand-page/models/logo.model.ts +1 -0
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +2 -0
- package/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.ts +5 -0
- package/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.ts +4 -2
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +3 -0
- package/src/clients/fabric-render-client.ts +12 -1
- package/src/shared/font-family-selector/FontFamilySelector.mixin.ts +5 -1
- package/src/shared/font-family-selector/FontPicker.vue +4 -3
- package/src/shared/logo-settings/store/editable-logo-store.ts +67 -18
package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts
CHANGED
|
@@ -149,7 +149,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
149
149
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
150
150
|
}): void;
|
|
151
151
|
initialiseStoresByBrandPageModelAsync(brandPageModel: import("@brand-page").BrandPageModel): Promise<void>;
|
|
152
|
-
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
|
|
152
|
+
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
|
|
153
153
|
initialisePages({ pages, sections, }: {
|
|
154
154
|
pages: import("@brand-page").PageModel[];
|
|
155
155
|
sections: import("../../../page-settings/store").PageSettingsStateSections;
|
|
@@ -665,7 +665,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
665
665
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
666
666
|
}): void;
|
|
667
667
|
initialiseStoresByBrandPageModelAsync(brandPageModel: import("@brand-page").BrandPageModel): Promise<void>;
|
|
668
|
-
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
|
|
668
|
+
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
|
|
669
669
|
initialisePages({ pages, sections, }: {
|
|
670
670
|
pages: import("@brand-page").PageModel[];
|
|
671
671
|
sections: import("../../../page-settings/store").PageSettingsStateSections;
|
|
@@ -612,7 +612,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
612
612
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
613
613
|
}): void;
|
|
614
614
|
initialiseStoresByBrandPageModelAsync(brandPageModel: import("@brand-page").BrandPageModel): Promise<void>;
|
|
615
|
-
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
|
|
615
|
+
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
|
|
616
616
|
initialisePages({ pages, sections, }: {
|
|
617
617
|
pages: import("@brand-page").PageModel[];
|
|
618
618
|
sections: import("../../../page-settings/store").PageSettingsStateSections;
|
|
@@ -37,7 +37,8 @@ export default defineComponent({
|
|
|
37
37
|
},
|
|
38
38
|
methods: {
|
|
39
39
|
getCategoryForFont(fontName) {
|
|
40
|
-
const
|
|
40
|
+
const strippedFontName = fontName?.replace(/^['"]|['"]$/g, '');
|
|
41
|
+
const fontConfig = Object.values(FONT_FAMILY_CONFIGS).find((config) => config.name === strippedFontName);
|
|
41
42
|
return fontConfig?.categories[0] || null;
|
|
42
43
|
},
|
|
43
44
|
onFontFamilyButtonClick(fontFamilyOption) {
|
|
@@ -98,6 +98,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
98
98
|
setStateAsync(payload: {
|
|
99
99
|
newState: import("../store/editable-logo-store").SetStateAsyncPayload;
|
|
100
100
|
defaultPrimaryText?: string | undefined;
|
|
101
|
+
defaultLayout?: string | undefined;
|
|
101
102
|
}): Promise<void>;
|
|
102
103
|
resetLogoEdits(): void;
|
|
103
104
|
setLogoDraftToken(logoDraftToken: string): void;
|
|
@@ -108,9 +109,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
108
109
|
updateLogoEdit(templateMetaString: string, draftMetaString: string | null): void;
|
|
109
110
|
getEditableLogoVariationByVariationId(id: number): any;
|
|
110
111
|
getEditableLogoVariationByBase64(base64: string): any;
|
|
111
|
-
updateEditableLogoImageUrlAsync(defaultPrimaryText?: string | undefined, overrideLogoVariation?: number | undefined): Promise<void>;
|
|
112
|
-
updateMetadataAsync(defaultPrimaryText?: string | undefined, resetLogoTemplateMetadata?: boolean): Promise<void>;
|
|
113
|
-
updateEditableLogoImageByVariationAsync(editableLogoVariation: import("../store/editable-logo-store").EditableLogoVariation, defaultPrimaryText?: string | undefined): Promise<import("../../../clients/fabric-render-client").ModifyLogoDataResponse | null>;
|
|
112
|
+
updateEditableLogoImageUrlAsync(defaultPrimaryText?: string | undefined, overrideLogoVariation?: number | undefined, layout?: string | undefined): Promise<void>;
|
|
113
|
+
updateMetadataAsync(defaultPrimaryText?: string | undefined, resetLogoTemplateMetadata?: boolean, layout?: string | undefined): Promise<void>;
|
|
114
|
+
updateEditableLogoImageByVariationAsync(editableLogoVariation: import("../store/editable-logo-store").EditableLogoVariation, defaultPrimaryText?: string | undefined, layout?: string | undefined): Promise<import("../../../clients/fabric-render-client").ModifyLogoDataResponse | null>;
|
|
114
115
|
getDraftMetadata(logoDraftToken: string): string | undefined;
|
|
115
116
|
upsertDraftMetadata(metadata: string): void;
|
|
116
117
|
isS3TokenExpired(expiryDate: string | undefined): boolean;
|
|
@@ -120,6 +121,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
120
121
|
dimensionType: string;
|
|
121
122
|
variationType: string;
|
|
122
123
|
defaultPrimaryText?: string | undefined;
|
|
124
|
+
layout?: string | undefined;
|
|
123
125
|
}): Promise<import("../../../clients/fabric-render-client").ModifyLogoDataResponse | null>;
|
|
124
126
|
}>;
|
|
125
127
|
logoStore: import("pinia").Store<"uiLogoSettings", import("../store/logo-settings-store").LogoSettingsState, {
|
|
@@ -139,7 +139,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
139
139
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
140
140
|
}): void;
|
|
141
141
|
initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../brand-page").BrandPageModel): Promise<void>;
|
|
142
|
-
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
|
|
142
|
+
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
|
|
143
143
|
initialisePages({ pages, sections, }: {
|
|
144
144
|
pages: import("../../../brand-page").PageModel[];
|
|
145
145
|
sections: import("@shared/page-settings/store").PageSettingsStateSections;
|
|
@@ -282,6 +282,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
282
282
|
setStateAsync(payload: {
|
|
283
283
|
newState: import("../store").SetStateAsyncPayload;
|
|
284
284
|
defaultPrimaryText?: string | undefined;
|
|
285
|
+
defaultLayout?: string | undefined;
|
|
285
286
|
}): Promise<void>;
|
|
286
287
|
resetLogoEdits(): void;
|
|
287
288
|
setLogoDraftToken(logoDraftToken: string): void;
|
|
@@ -292,9 +293,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
292
293
|
updateLogoEdit(templateMetaString: string, draftMetaString: string | null): void;
|
|
293
294
|
getEditableLogoVariationByVariationId(id: number): any;
|
|
294
295
|
getEditableLogoVariationByBase64(base64: string): any;
|
|
295
|
-
updateEditableLogoImageUrlAsync(defaultPrimaryText?: string | undefined, overrideLogoVariation?: number | undefined): Promise<void>;
|
|
296
|
-
updateMetadataAsync(defaultPrimaryText?: string | undefined, resetLogoTemplateMetadata?: boolean): Promise<void>;
|
|
297
|
-
updateEditableLogoImageByVariationAsync(editableLogoVariation: import("../store").EditableLogoVariation, defaultPrimaryText?: string | undefined): Promise<import("../../../clients/fabric-render-client").ModifyLogoDataResponse | null>;
|
|
296
|
+
updateEditableLogoImageUrlAsync(defaultPrimaryText?: string | undefined, overrideLogoVariation?: number | undefined, layout?: string | undefined): Promise<void>;
|
|
297
|
+
updateMetadataAsync(defaultPrimaryText?: string | undefined, resetLogoTemplateMetadata?: boolean, layout?: string | undefined): Promise<void>;
|
|
298
|
+
updateEditableLogoImageByVariationAsync(editableLogoVariation: import("../store").EditableLogoVariation, defaultPrimaryText?: string | undefined, layout?: string | undefined): Promise<import("../../../clients/fabric-render-client").ModifyLogoDataResponse | null>;
|
|
298
299
|
getDraftMetadata(logoDraftToken: string): string | undefined;
|
|
299
300
|
upsertDraftMetadata(metadata: string): void;
|
|
300
301
|
isS3TokenExpired(expiryDate: string | undefined): boolean;
|
|
@@ -304,6 +305,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
304
305
|
dimensionType: string;
|
|
305
306
|
variationType: string;
|
|
306
307
|
defaultPrimaryText?: string | undefined;
|
|
308
|
+
layout?: string | undefined;
|
|
307
309
|
}): Promise<import("../../../clients/fabric-render-client").ModifyLogoDataResponse | null>;
|
|
308
310
|
}>;
|
|
309
311
|
containerStore: import("pinia").Store<"brandPageContainer", import("@brand-page-maker/stores").BrandPageContainerState, {
|
|
@@ -172,6 +172,7 @@ export declare const useUiEditableLogoStore: import("pinia").StoreDefinition<"ui
|
|
|
172
172
|
setStateAsync(payload: {
|
|
173
173
|
newState: SetStateAsyncPayload;
|
|
174
174
|
defaultPrimaryText?: string;
|
|
175
|
+
defaultLayout?: string;
|
|
175
176
|
}): Promise<void>;
|
|
176
177
|
resetLogoEdits(): void;
|
|
177
178
|
setLogoDraftToken(logoDraftToken: string): void;
|
|
@@ -182,9 +183,9 @@ export declare const useUiEditableLogoStore: import("pinia").StoreDefinition<"ui
|
|
|
182
183
|
updateLogoEdit(templateMetaString: string, draftMetaString: string | null): void;
|
|
183
184
|
getEditableLogoVariationByVariationId(id: number): any;
|
|
184
185
|
getEditableLogoVariationByBase64(base64: string): any;
|
|
185
|
-
updateEditableLogoImageUrlAsync(defaultPrimaryText?: string, overrideLogoVariation?: number | undefined): Promise<void>;
|
|
186
|
-
updateMetadataAsync(defaultPrimaryText?: string, resetLogoTemplateMetadata?: boolean): Promise<void>;
|
|
187
|
-
updateEditableLogoImageByVariationAsync(editableLogoVariation: EditableLogoVariation, defaultPrimaryText?: string): Promise<ModifyLogoDataResponse | null>;
|
|
186
|
+
updateEditableLogoImageUrlAsync(defaultPrimaryText?: string, overrideLogoVariation?: number | undefined, layout?: string): Promise<void>;
|
|
187
|
+
updateMetadataAsync(defaultPrimaryText?: string, resetLogoTemplateMetadata?: boolean, layout?: string): Promise<void>;
|
|
188
|
+
updateEditableLogoImageByVariationAsync(editableLogoVariation: EditableLogoVariation, defaultPrimaryText?: string, layout?: string): Promise<ModifyLogoDataResponse | null>;
|
|
188
189
|
getDraftMetadata(logoDraftToken: string): string | undefined;
|
|
189
190
|
upsertDraftMetadata(metadata: string): void;
|
|
190
191
|
isS3TokenExpired(expiryDate: string | undefined): boolean;
|
|
@@ -194,6 +195,7 @@ export declare const useUiEditableLogoStore: import("pinia").StoreDefinition<"ui
|
|
|
194
195
|
dimensionType: string;
|
|
195
196
|
variationType: string;
|
|
196
197
|
defaultPrimaryText?: string;
|
|
198
|
+
layout?: string;
|
|
197
199
|
}): Promise<ModifyLogoDataResponse | null>;
|
|
198
200
|
}>;
|
|
199
201
|
export {};
|
|
@@ -83,6 +83,7 @@ export const useUiEditableLogoStore = defineStore('uiEditableLogo', {
|
|
|
83
83
|
const templateMetaResult = await this.postEditableLogoRequestAsync({
|
|
84
84
|
returnJson: true,
|
|
85
85
|
defaultPrimaryText: payload?.defaultPrimaryText,
|
|
86
|
+
layout: payload?.defaultLayout,
|
|
86
87
|
});
|
|
87
88
|
this.logoTemplateMetadata = templateMetaResult.metadata;
|
|
88
89
|
const logoStore = useLogoStore();
|
|
@@ -100,8 +101,9 @@ export const useUiEditableLogoStore = defineStore('uiEditableLogo', {
|
|
|
100
101
|
const objects = JSON.parse(logoDraft?.metadata || this.logoTemplateMetadata).objects;
|
|
101
102
|
this.isTextOnlyLogo = !objects.find((x) => x.role === 'logo');
|
|
102
103
|
this.updateLogoEdit(this.logoTemplateMetadata, logoDraft?.metadata);
|
|
103
|
-
|
|
104
|
-
await this.
|
|
104
|
+
const defaultLayout = !logoDraft ? payload?.defaultLayout : undefined;
|
|
105
|
+
await this.updateEditableLogoImageUrlAsync(defaultPrimaryText, undefined, defaultLayout);
|
|
106
|
+
await this.updateMetadataAsync(defaultPrimaryText, false, defaultLayout);
|
|
105
107
|
// updated logoDraft can be found at this point
|
|
106
108
|
logoDraft = logoStore.getLogoDraftAssetByToken(this.logoDraftToken);
|
|
107
109
|
if (!logoDraft?.isByo) {
|
|
@@ -212,8 +214,8 @@ export const useUiEditableLogoStore = defineStore('uiEditableLogo', {
|
|
|
212
214
|
return (this.editableLogoVariations.find((x) => x.base64 === base64) ||
|
|
213
215
|
this.editableLogoVariations[0]);
|
|
214
216
|
},
|
|
215
|
-
async updateEditableLogoImageUrlAsync(defaultPrimaryText, overrideLogoVariation) {
|
|
216
|
-
const tasks = this.editableLogoVariations.map((x) => this.updateEditableLogoImageByVariationAsync(x, defaultPrimaryText));
|
|
217
|
+
async updateEditableLogoImageUrlAsync(defaultPrimaryText, overrideLogoVariation, layout) {
|
|
218
|
+
const tasks = this.editableLogoVariations.map((x) => this.updateEditableLogoImageByVariationAsync(x, defaultPrimaryText, layout));
|
|
217
219
|
await Promise.all(tasks);
|
|
218
220
|
const pageSettingStore = useUiPageSettingsStore();
|
|
219
221
|
[PAGE_SECTIONS.header, PAGE_SECTIONS.footer].forEach((section) => {
|
|
@@ -241,10 +243,11 @@ export const useUiEditableLogoStore = defineStore('uiEditableLogo', {
|
|
|
241
243
|
});
|
|
242
244
|
});
|
|
243
245
|
},
|
|
244
|
-
async updateMetadataAsync(defaultPrimaryText, resetLogoTemplateMetadata = false) {
|
|
246
|
+
async updateMetadataAsync(defaultPrimaryText, resetLogoTemplateMetadata = false, layout) {
|
|
245
247
|
const result = await this.postEditableLogoRequestAsync({
|
|
246
248
|
returnJson: true,
|
|
247
249
|
defaultPrimaryText,
|
|
250
|
+
layout,
|
|
248
251
|
});
|
|
249
252
|
if (resetLogoTemplateMetadata) {
|
|
250
253
|
this.logoTemplateMetadata = result.metadata;
|
|
@@ -252,12 +255,13 @@ export const useUiEditableLogoStore = defineStore('uiEditableLogo', {
|
|
|
252
255
|
this.upsertDraftMetadata(result.metadata);
|
|
253
256
|
this.updateLogoEdit(this.logoTemplateMetadata, result.metadata);
|
|
254
257
|
},
|
|
255
|
-
async updateEditableLogoImageByVariationAsync(editableLogoVariation, defaultPrimaryText) {
|
|
258
|
+
async updateEditableLogoImageByVariationAsync(editableLogoVariation, defaultPrimaryText, layout) {
|
|
256
259
|
const result = await this.postEditableLogoRequestAsync({
|
|
257
260
|
returnJson: false,
|
|
258
261
|
dimensionType: editableLogoVariation.dimensionType,
|
|
259
262
|
variationType: editableLogoVariation.variationType,
|
|
260
263
|
defaultPrimaryText,
|
|
264
|
+
layout,
|
|
261
265
|
});
|
|
262
266
|
if (result.base64 === 'data:,') {
|
|
263
267
|
// broken base64 image data
|
|
@@ -318,6 +322,13 @@ export const useUiEditableLogoStore = defineStore('uiEditableLogo', {
|
|
|
318
322
|
}
|
|
319
323
|
return false;
|
|
320
324
|
}
|
|
325
|
+
// Don't refresh while setStateAsync is still initializing —
|
|
326
|
+
// it resets textObjects to [] before repopulating them, so a
|
|
327
|
+
// refresh at that point sends empty changeRequest objects to
|
|
328
|
+
// the server, which returns placeholder text ("LOGO TEXT HERE").
|
|
329
|
+
if (this.logoEdits.textObjects.length === 0) {
|
|
330
|
+
return false;
|
|
331
|
+
}
|
|
321
332
|
await this.updateEditableLogoImageUrlAsync();
|
|
322
333
|
return true;
|
|
323
334
|
}
|
|
@@ -325,12 +336,12 @@ export const useUiEditableLogoStore = defineStore('uiEditableLogo', {
|
|
|
325
336
|
},
|
|
326
337
|
async postEditableLogoRequestAsync(payload) {
|
|
327
338
|
const logoStore = useLogoStore();
|
|
339
|
+
const hasLayout = !!payload?.layout;
|
|
328
340
|
const body = {
|
|
329
341
|
returnJson: payload?.returnJson || false,
|
|
330
342
|
generateS3Url: true,
|
|
331
343
|
dimensionsType: payload?.dimensionType,
|
|
332
344
|
variation: payload?.variationType,
|
|
333
|
-
primaryText: payload?.defaultPrimaryText,
|
|
334
345
|
logo: {
|
|
335
346
|
template: {
|
|
336
347
|
token: logoStore.logoTemplateAsset.token,
|
|
@@ -358,26 +369,46 @@ export const useUiEditableLogoStore = defineStore('uiEditableLogo', {
|
|
|
358
369
|
},
|
|
359
370
|
},
|
|
360
371
|
};
|
|
372
|
+
if (hasLayout) {
|
|
373
|
+
// template.placeholder + template.layout tell fabric-render's
|
|
374
|
+
// loadCanvasAsync to replace placeholder text and apply the 2-line
|
|
375
|
+
// split. These must be sent on EVERY call — without them the template
|
|
376
|
+
// loads with its original single-line structure.
|
|
377
|
+
//
|
|
378
|
+
// IMPORTANT: Do NOT set body.primaryText here. It goes through a
|
|
379
|
+
// separate code path (applyPrimaryText in applyChangeRequestAsync)
|
|
380
|
+
// that overrides the split result with the full business name.
|
|
381
|
+
body.logo.template.placeholder = {
|
|
382
|
+
primaryText: payload.defaultPrimaryText,
|
|
383
|
+
};
|
|
384
|
+
body.logo.template.layout = payload.layout;
|
|
385
|
+
body.changeRequest.layout = payload.layout;
|
|
386
|
+
}
|
|
387
|
+
else {
|
|
388
|
+
// No layout (standard logos): send primaryText normally.
|
|
389
|
+
body.primaryText = payload?.defaultPrimaryText;
|
|
390
|
+
}
|
|
361
391
|
// mapping ui object to fabric compatible objects
|
|
362
392
|
this.logoEdits.textObjects.forEach((o) => {
|
|
393
|
+
const updates = {
|
|
394
|
+
fontFamily: o.fontFamily,
|
|
395
|
+
fill: o.fill,
|
|
396
|
+
stroke: o.outlineColor,
|
|
397
|
+
strokeWidth: o.outlineEnabled ? o.outlineWidth : 0,
|
|
398
|
+
isUppercase: o.isUppercase,
|
|
399
|
+
shadow: {
|
|
400
|
+
...o.shadow,
|
|
401
|
+
blur: o.shadowEnabled ? o.shadow.blur : 0,
|
|
402
|
+
offsetX: o.shadowEnabled ? o.shadow.offsetX : 0,
|
|
403
|
+
offsetY: o.shadowEnabled ? o.shadow.offsetY : 0,
|
|
404
|
+
},
|
|
405
|
+
};
|
|
406
|
+
updates.textOriginal = o.text;
|
|
363
407
|
body.changeRequest.objects[o.id] = {
|
|
364
408
|
type: o.type,
|
|
365
409
|
role: o.role,
|
|
366
410
|
removed: !o.textEnabled || !o.text,
|
|
367
|
-
updates
|
|
368
|
-
fontFamily: o.fontFamily,
|
|
369
|
-
fill: o.fill,
|
|
370
|
-
textOriginal: o.text,
|
|
371
|
-
stroke: o.outlineColor,
|
|
372
|
-
strokeWidth: o.outlineEnabled ? o.outlineWidth : 0,
|
|
373
|
-
isUppercase: o.isUppercase,
|
|
374
|
-
shadow: {
|
|
375
|
-
...o.shadow,
|
|
376
|
-
blur: o.shadowEnabled ? o.shadow.blur : 0,
|
|
377
|
-
offsetX: o.shadowEnabled ? o.shadow.offsetX : 0,
|
|
378
|
-
offsetY: o.shadowEnabled ? o.shadow.offsetY : 0,
|
|
379
|
-
},
|
|
380
|
-
},
|
|
411
|
+
updates,
|
|
381
412
|
};
|
|
382
413
|
});
|
|
383
414
|
const client = FabricRenderClient.getInstance();
|
|
@@ -1261,6 +1261,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
1261
1261
|
logoTemplateToken: string;
|
|
1262
1262
|
logoTemplateText: string;
|
|
1263
1263
|
logoTemplateVersion: number;
|
|
1264
|
+
layout?: string | undefined;
|
|
1264
1265
|
} | undefined;
|
|
1265
1266
|
logoImageBase64Url?: string | undefined;
|
|
1266
1267
|
backgroundStyle: {
|
|
@@ -2544,6 +2545,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
2544
2545
|
logoTemplateToken: string;
|
|
2545
2546
|
logoTemplateText: string;
|
|
2546
2547
|
logoTemplateVersion: number;
|
|
2548
|
+
layout?: string | undefined;
|
|
2547
2549
|
} | undefined;
|
|
2548
2550
|
logoImageBase64Url?: string | undefined;
|
|
2549
2551
|
backgroundStyle: {
|
|
@@ -2839,6 +2841,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
2839
2841
|
logoTemplateToken: string;
|
|
2840
2842
|
logoTemplateText: string;
|
|
2841
2843
|
logoTemplateVersion: number;
|
|
2844
|
+
layout?: string | undefined;
|
|
2842
2845
|
} | undefined;
|
|
2843
2846
|
logoImageBase64Url?: string | undefined;
|
|
2844
2847
|
socialLinks: {
|
|
@@ -3062,6 +3065,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
3062
3065
|
logoTemplateToken: string;
|
|
3063
3066
|
logoTemplateText: string;
|
|
3064
3067
|
logoTemplateVersion: number;
|
|
3068
|
+
layout?: string | undefined;
|
|
3065
3069
|
} | undefined;
|
|
3066
3070
|
logoImageBase64Url?: string | undefined;
|
|
3067
3071
|
socialLinks: {
|
|
@@ -3827,7 +3831,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
3827
3831
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
3828
3832
|
}): void;
|
|
3829
3833
|
initialiseStoresByBrandPageModelAsync(brandPageModel: import("@brand-page").BrandPageModel): Promise<void>;
|
|
3830
|
-
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
|
|
3834
|
+
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
|
|
3831
3835
|
initialisePages({ pages, sections, }: {
|
|
3832
3836
|
pages: import("@brand-page").PageModel[];
|
|
3833
3837
|
sections: import("../../store").PageSettingsStateSections;
|
|
@@ -1223,6 +1223,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1223
1223
|
logoTemplateToken: string;
|
|
1224
1224
|
logoTemplateText: string;
|
|
1225
1225
|
logoTemplateVersion: number;
|
|
1226
|
+
layout?: string | undefined;
|
|
1226
1227
|
} | undefined;
|
|
1227
1228
|
logoImageBase64Url?: string | undefined;
|
|
1228
1229
|
backgroundStyle: {
|
|
@@ -2506,6 +2507,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
2506
2507
|
logoTemplateToken: string;
|
|
2507
2508
|
logoTemplateText: string;
|
|
2508
2509
|
logoTemplateVersion: number;
|
|
2510
|
+
layout?: string | undefined;
|
|
2509
2511
|
} | undefined;
|
|
2510
2512
|
logoImageBase64Url?: string | undefined;
|
|
2511
2513
|
backgroundStyle: {
|
|
@@ -2801,6 +2803,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
2801
2803
|
logoTemplateToken: string;
|
|
2802
2804
|
logoTemplateText: string;
|
|
2803
2805
|
logoTemplateVersion: number;
|
|
2806
|
+
layout?: string | undefined;
|
|
2804
2807
|
} | undefined;
|
|
2805
2808
|
logoImageBase64Url?: string | undefined;
|
|
2806
2809
|
socialLinks: {
|
|
@@ -3024,6 +3027,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
3024
3027
|
logoTemplateToken: string;
|
|
3025
3028
|
logoTemplateText: string;
|
|
3026
3029
|
logoTemplateVersion: number;
|
|
3030
|
+
layout?: string | undefined;
|
|
3027
3031
|
} | undefined;
|
|
3028
3032
|
logoImageBase64Url?: string | undefined;
|
|
3029
3033
|
socialLinks: {
|
|
@@ -4275,6 +4279,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
4275
4279
|
setStateAsync(payload: {
|
|
4276
4280
|
newState: import("@shared/logo-settings/store").SetStateAsyncPayload;
|
|
4277
4281
|
defaultPrimaryText?: string | undefined;
|
|
4282
|
+
defaultLayout?: string | undefined;
|
|
4278
4283
|
}): Promise<void>;
|
|
4279
4284
|
resetLogoEdits(): void;
|
|
4280
4285
|
setLogoDraftToken(logoDraftToken: string): void;
|
|
@@ -4285,9 +4290,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
4285
4290
|
updateLogoEdit(templateMetaString: string, draftMetaString: string | null): void;
|
|
4286
4291
|
getEditableLogoVariationByVariationId(id: number): any;
|
|
4287
4292
|
getEditableLogoVariationByBase64(base64: string): any;
|
|
4288
|
-
updateEditableLogoImageUrlAsync(defaultPrimaryText?: string | undefined, overrideLogoVariation?: number | undefined): Promise<void>;
|
|
4289
|
-
updateMetadataAsync(defaultPrimaryText?: string | undefined, resetLogoTemplateMetadata?: boolean): Promise<void>;
|
|
4290
|
-
updateEditableLogoImageByVariationAsync(editableLogoVariation: import("@shared/logo-settings/store").EditableLogoVariation, defaultPrimaryText?: string | undefined): Promise<import("../../../../clients/fabric-render-client").ModifyLogoDataResponse | null>;
|
|
4293
|
+
updateEditableLogoImageUrlAsync(defaultPrimaryText?: string | undefined, overrideLogoVariation?: number | undefined, layout?: string | undefined): Promise<void>;
|
|
4294
|
+
updateMetadataAsync(defaultPrimaryText?: string | undefined, resetLogoTemplateMetadata?: boolean, layout?: string | undefined): Promise<void>;
|
|
4295
|
+
updateEditableLogoImageByVariationAsync(editableLogoVariation: import("@shared/logo-settings/store").EditableLogoVariation, defaultPrimaryText?: string | undefined, layout?: string | undefined): Promise<import("../../../../clients/fabric-render-client").ModifyLogoDataResponse | null>;
|
|
4291
4296
|
getDraftMetadata(logoDraftToken: string): string | undefined;
|
|
4292
4297
|
upsertDraftMetadata(metadata: string): void;
|
|
4293
4298
|
isS3TokenExpired(expiryDate: string | undefined): boolean;
|
|
@@ -4297,6 +4302,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
4297
4302
|
dimensionType: string;
|
|
4298
4303
|
variationType: string;
|
|
4299
4304
|
defaultPrimaryText?: string | undefined;
|
|
4305
|
+
layout?: string | undefined;
|
|
4300
4306
|
}): Promise<import("../../../../clients/fabric-render-client").ModifyLogoDataResponse | null>;
|
|
4301
4307
|
}>;
|
|
4302
4308
|
brandPageMakerStore: import("pinia").Store<"brandPageMaker", import("@brand-page-maker/stores").BrandPageMakerState, {
|
|
@@ -4407,7 +4413,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
4407
4413
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
4408
4414
|
}): void;
|
|
4409
4415
|
initialiseStoresByBrandPageModelAsync(brandPageModel: import("@brand-page").BrandPageModel): Promise<void>;
|
|
4410
|
-
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
|
|
4416
|
+
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
|
|
4411
4417
|
initialisePages({ pages, sections, }: {
|
|
4412
4418
|
pages: import("@brand-page").PageModel[];
|
|
4413
4419
|
sections: import("../../store").PageSettingsStateSections;
|
package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts
CHANGED
|
@@ -202,7 +202,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
202
202
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
203
203
|
}): void;
|
|
204
204
|
initialiseStoresByBrandPageModelAsync(brandPageModel: import("@brand-page/models").BrandPageModel): Promise<void>;
|
|
205
|
-
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
|
|
205
|
+
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
|
|
206
206
|
initialisePages({ pages, sections, }: {
|
|
207
207
|
pages: import("@brand-page/models").PageModel[];
|
|
208
208
|
sections: import("../page-settings/store").PageSettingsStateSections;
|
|
@@ -580,7 +580,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
580
580
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
581
581
|
}): void;
|
|
582
582
|
initialiseStoresByBrandPageModelAsync(brandPageModel: import("@brand-page").BrandPageModel): Promise<void>;
|
|
583
|
-
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
|
|
583
|
+
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
|
|
584
584
|
initialisePages({ pages, sections, }: {
|
|
585
585
|
pages: import("@brand-page").PageModel[];
|
|
586
586
|
sections: import("../../page-settings/store").PageSettingsStateSections;
|
package/package.json
CHANGED
|
@@ -1409,7 +1409,7 @@ export const FONT_FAMILY_CONFIGS: Record<
|
|
|
1409
1409
|
categories: [FONT_FAMILY_CATEGORIES().unique.key],
|
|
1410
1410
|
},
|
|
1411
1411
|
playwriteOsterreich: {
|
|
1412
|
-
name: 'Playwrite
|
|
1412
|
+
name: 'Playwrite AT',
|
|
1413
1413
|
family: 'Playwrite AT',
|
|
1414
1414
|
isPremiumFont: false,
|
|
1415
1415
|
type: 'google',
|
|
@@ -71,6 +71,7 @@ export interface BrandPageMakerViewModel {
|
|
|
71
71
|
brandPageType?: BrandPageType;
|
|
72
72
|
businessName?: string;
|
|
73
73
|
industry?: string;
|
|
74
|
+
layout?: string;
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
const RESIZE_DEBOUNCE_WAIT_IN_MS = 100;
|
|
@@ -227,6 +228,7 @@ export default defineComponent({
|
|
|
227
228
|
brandPageType: this.viewModel.brandPageType,
|
|
228
229
|
businessName: this.viewModel.businessName,
|
|
229
230
|
industry: this.viewModel.industry,
|
|
231
|
+
layout: this.viewModel.layout,
|
|
230
232
|
logoVariationImageUrls: this.viewModel.logoVariationImageUrls,
|
|
231
233
|
shopConfigData,
|
|
232
234
|
});
|
|
@@ -274,6 +274,11 @@ export default defineComponent({
|
|
|
274
274
|
},
|
|
275
275
|
deep: true,
|
|
276
276
|
},
|
|
277
|
+
logoImageBase64Url() {
|
|
278
|
+
if (this.isAdmin) {
|
|
279
|
+
this.updateViewModel();
|
|
280
|
+
}
|
|
281
|
+
},
|
|
277
282
|
previewImageUrl() {
|
|
278
283
|
// Reset loading state whenever the preview URL changes
|
|
279
284
|
if (!this.isAdmin) {
|
|
@@ -508,8 +508,10 @@ export const useRichTextEditor = (
|
|
|
508
508
|
// retainStyleOnEmptyLine(editor, selection);
|
|
509
509
|
|
|
510
510
|
if (textStyleAttributes && textStyleAttributes.fontFamily) {
|
|
511
|
-
|
|
512
|
-
|
|
511
|
+
const font = textStyleAttributes.fontFamily.replace(/^['"]|['"]$/g, '');
|
|
512
|
+
|
|
513
|
+
selectedFont.value = font;
|
|
514
|
+
fontSettings.selectedFont = font;
|
|
513
515
|
} else {
|
|
514
516
|
selectedFont.value = 'Lato';
|
|
515
517
|
fontSettings.selectedFont = 'Lato';
|
|
@@ -121,6 +121,7 @@ export interface InitialisePayload {
|
|
|
121
121
|
isPersonalisationEnabled: boolean;
|
|
122
122
|
businessName: string | undefined;
|
|
123
123
|
industry: string | undefined;
|
|
124
|
+
layout?: string;
|
|
124
125
|
logoVariationImageUrls: string[];
|
|
125
126
|
shopConfigData: string | ShopConfigData;
|
|
126
127
|
isServerRenderOverride?: boolean;
|
|
@@ -788,6 +789,7 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
788
789
|
isPersonalisationEnabled,
|
|
789
790
|
businessName,
|
|
790
791
|
industry,
|
|
792
|
+
layout,
|
|
791
793
|
logoVariationImageUrls,
|
|
792
794
|
shopConfigData,
|
|
793
795
|
isServerRenderOverride = false,
|
|
@@ -948,6 +950,7 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
948
950
|
if (brandPageContainerStore.isPrePurchase) {
|
|
949
951
|
await editableLogoStore.setStateAsync({
|
|
950
952
|
defaultPrimaryText: businessName,
|
|
953
|
+
defaultLayout: layout,
|
|
951
954
|
newState: {
|
|
952
955
|
isTextOnlyLogo: false,
|
|
953
956
|
logoTemplateMetadata: '',
|
|
@@ -36,6 +36,10 @@ export interface ModifyLogoDataRequest {
|
|
|
36
36
|
template: {
|
|
37
37
|
token: string;
|
|
38
38
|
version: number;
|
|
39
|
+
placeholder?: {
|
|
40
|
+
primaryText?: string;
|
|
41
|
+
};
|
|
42
|
+
layout?: string;
|
|
39
43
|
};
|
|
40
44
|
draft: {
|
|
41
45
|
token: string;
|
|
@@ -51,6 +55,7 @@ export interface ModifyLogoDataRequest {
|
|
|
51
55
|
updates: Updates;
|
|
52
56
|
}
|
|
53
57
|
>;
|
|
58
|
+
layout?: string;
|
|
54
59
|
};
|
|
55
60
|
}
|
|
56
61
|
|
|
@@ -120,11 +125,16 @@ export class FabricRenderClient {
|
|
|
120
125
|
logoTemplateToken: string;
|
|
121
126
|
logoTemplateVersion: number;
|
|
122
127
|
logoTemplateText: string;
|
|
128
|
+
layout?: string;
|
|
123
129
|
},
|
|
124
130
|
outputFormat: LogoOutputFormat = 'base64svgjson',
|
|
125
131
|
logoColorPalette: string | undefined = undefined,
|
|
126
132
|
) {
|
|
127
|
-
let url = `${this.baseUrl}/asset/logotemplate/brand-page/${logoTemplateImage.logoTemplateToken}?dimensionsType=preview_image_transparent_no_buffer&outputFormat=${outputFormat}&logoTemplateVersion=${logoTemplateImage.logoTemplateVersion}&text=${encodeURIComponent(logoTemplateImage.logoTemplateText)}
|
|
133
|
+
let url = `${this.baseUrl}/asset/logotemplate/brand-page/${logoTemplateImage.logoTemplateToken}?dimensionsType=preview_image_transparent_no_buffer&outputFormat=${outputFormat}&logoTemplateVersion=${logoTemplateImage.logoTemplateVersion}&text=${encodeURIComponent(logoTemplateImage.logoTemplateText)}`;
|
|
134
|
+
|
|
135
|
+
if (logoTemplateImage.layout) {
|
|
136
|
+
url = `${url}&layout=${logoTemplateImage.layout}`;
|
|
137
|
+
}
|
|
128
138
|
|
|
129
139
|
if (logoColorPalette) {
|
|
130
140
|
url = `${url}&colorpalette=${logoColorPalette}`;
|
|
@@ -256,6 +266,7 @@ export class FabricRenderClient {
|
|
|
256
266
|
logoTemplateToken: string;
|
|
257
267
|
logoTemplateText: string;
|
|
258
268
|
logoTemplateVersion: number;
|
|
269
|
+
layout?: string;
|
|
259
270
|
}): Promise<{ data: string; width: number; height: number } | undefined> {
|
|
260
271
|
const logoSvgUrl = this.getLogoTemplateUrlByLogoTemplateImage(
|
|
261
272
|
logoTemplateImage,
|
|
@@ -45,8 +45,12 @@ export default defineComponent({
|
|
|
45
45
|
},
|
|
46
46
|
methods: {
|
|
47
47
|
getCategoryForFont(fontName: FontFamilyName): FontFamilyCategory | null {
|
|
48
|
+
const strippedFontName = fontName?.replace(
|
|
49
|
+
/^['"]|['"]$/g,
|
|
50
|
+
'',
|
|
51
|
+
) as FontFamilyName;
|
|
48
52
|
const fontConfig = Object.values(FONT_FAMILY_CONFIGS).find(
|
|
49
|
-
(config) => config.name ===
|
|
53
|
+
(config) => config.name === strippedFontName,
|
|
50
54
|
);
|
|
51
55
|
|
|
52
56
|
return fontConfig?.categories[0] || null;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
@click="togglePanel"
|
|
11
11
|
>
|
|
12
12
|
<div class="tw-py-3 tw-pl-3 tw-flex-auto tw-text-left tw-truncate">
|
|
13
|
-
{{ value }}
|
|
13
|
+
{{ stripQuotes(value) }}
|
|
14
14
|
</div>
|
|
15
15
|
<Icon
|
|
16
16
|
:name="isPanelOpen ? 'chevron-up' : 'chevron-down'"
|
|
@@ -130,7 +130,7 @@ const selectedCategoryLabel = computed(() => {
|
|
|
130
130
|
});
|
|
131
131
|
|
|
132
132
|
function isSelectedFont(option: StyleTextFontFamilyOption): boolean {
|
|
133
|
-
return FONT_FAMILY_CONFIGS[option.key].name === props.value;
|
|
133
|
+
return FONT_FAMILY_CONFIGS[option.key].name === stripQuotes(props.value);
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
function togglePanel(): void {
|
|
@@ -158,7 +158,7 @@ function scrollToSelectedFont(): void {
|
|
|
158
158
|
nextTick(() => {
|
|
159
159
|
if (!fontListRef.value) return;
|
|
160
160
|
const selectedKey = filteredFontOptions.value.find(
|
|
161
|
-
(o) => FONT_FAMILY_CONFIGS[o.key].name === props.value,
|
|
161
|
+
(o) => FONT_FAMILY_CONFIGS[o.key].name === stripQuotes(props.value),
|
|
162
162
|
)?.key;
|
|
163
163
|
if (!selectedKey) return;
|
|
164
164
|
const el = fontListRef.value.querySelector(
|
|
@@ -201,6 +201,7 @@ function handleClickOutside(): void {
|
|
|
201
201
|
function onSelectCategory(category: FontFamilyCategory | null): void {
|
|
202
202
|
selectedCategory.value = category;
|
|
203
203
|
categoryDropdownRef.value?.hideMenu();
|
|
204
|
+
scrollToSelectedFont();
|
|
204
205
|
}
|
|
205
206
|
|
|
206
207
|
function onFontClick(option: StyleTextFontFamilyOption): void {
|