@designcrowd/library.brand-page 5.18.4-ast-ai-tab-1 → 5.18.4
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-CV6k3V69.js → CreatedOnBrandCrowd-de-de-DQLtpdLe.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-DEA_Ztd6.js → CreatedOnBrandCrowd-en-us-CvEhlADd.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-WZxoi95g.js → CreatedOnBrandCrowd-es-es-pYQeTTC0.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-BCK-Vc76.js → CreatedOnBrandCrowd-fr-ca-CcE-iCEq.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-BCK-Vc76.js → CreatedOnBrandCrowd-fr-fr-CcE-iCEq.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-4T1moa-7.js → CreatedOnBrandCrowd-pt-br-OyhWWWyO.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-4T1moa-7.js → CreatedOnBrandCrowd-pt-pt-OyhWWWyO.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-B4r4wmi3.js → CreatedOnDcom-de-de-DH98FFLS.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-CK3bt1WC.js → CreatedOnDcom-en-us-DK67NN1r.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-pujNCmOB.js → CreatedOnDcom-es-es-9-QU4BU6.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-Ch5a9cLg.js → CreatedOnDcom-fr-ca-U9J9H9VB.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-CsM_6d0N.js → CreatedOnDcom-fr-fr-DqdzB1DJ.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-VASGTLyG.js → CreatedOnDcom-pt-br-c4UiWtkB.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-BWnMajwo.js → CreatedOnDcom-pt-pt-Do2qJsYp.js} +1 -1
- package/lib/src/brand-page/models/index.d.ts +0 -1
- package/lib/src/brand-page/models/index.js +0 -4
- package/lib/src/brand-page/models/navigation-styles.model.d.ts +0 -7
- package/lib/src/brand-page/models/navigation-styles.model.js +2 -25
- package/lib/src/brand-page/utils/migration.util.js +0 -7
- package/lib/src/brand-page/utils/personalisation.util.js +14 -76
- package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/admin-background-settings/AdminBackgroundSettings.mixin.d.ts +0 -6
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +1 -12
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +0 -2
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.js +0 -1
- 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 +3 -2
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.js +4 -16
- package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +0 -6
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +0 -1
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.js +0 -3
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.d.ts +1 -3
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +10 -6
- package/lib/src/brand-page-maker/stores/ui/ui-store.d.ts +0 -6
- package/lib/src/brand-page-maker/stores/ui/ui-store.js +0 -8
- package/lib/src/clients/design-template-client.d.ts +0 -3
- package/lib/src/clients/models.d.ts +0 -2
- package/lib/src/css/library.brand-page-brandCrowd.min.css +74 -76
- package/lib/src/css/library.brand-page-brandPage.min.css +74 -76
- package/lib/src/css/library.brand-page-designCom.min.css +74 -76
- package/lib/src/css/library.brand-page-preview.min.css +74 -76
- package/lib/src/index.mjs +60 -62
- package/lib/src/{lib-D8jC8i6U.js → lib-BI3J4Mbk.js} +17708 -17839
- 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 -7
- package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.d.ts +0 -9
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +1 -1
- package/lib/src/shared/logo-versions/LogoVersions.mixin.d.ts +0 -6
- package/lib/src/shared/models.d.ts +0 -2
- package/lib/src/shared/my-designs/MyDesigns.mixin.d.ts +0 -6
- package/lib/src/shared/my-uploads/MyMedia.mixin.d.ts +0 -6
- package/lib/src/shared/my-uploads/MyUploads.mixin.d.ts +0 -6
- package/lib/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.js +8 -10
- package/lib/src/shared/navigation-style-settings/store/index.js +12 -1
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +1 -7
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +1 -7
- 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 -7
- package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.d.ts +439 -10
- package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.js +2 -2
- package/lib/src/shared/template-settings/store/template-settings-store.d.ts +0 -4
- package/lib/src/shared/template-settings/store/template-settings-store.js +11 -84
- package/lib/src/shared/unsplash-library/UnsplashLibrary.mixin.d.ts +0 -6
- package/package.json +1 -1
- package/src/brand-page/components/button/Button.vue +10 -2
- package/src/brand-page/components/contact-form/ContactForm.vue +2 -2
- package/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.vue +1 -4
- package/src/brand-page/models/index.ts +0 -5
- package/src/brand-page/models/navigation-styles.model.ts +1 -39
- 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/migration.util.ts +0 -8
- package/src/brand-page/utils/personalisation.util.test.ts +0 -35
- package/src/brand-page/utils/personalisation.util.ts +23 -123
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +0 -4
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.ts +0 -1
- package/src/brand-page-maker/components/color-palette/BpColorPalette.vue +7 -9
- package/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.ts +7 -22
- package/src/brand-page-maker/components/template-preview/TemplatePreview.vue +10 -5
- package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.ts +0 -5
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.test.ts +0 -43
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +14 -10
- package/src/brand-page-maker/stores/ui/ui-store.ts +0 -16
- package/src/clients/design-template-client.ts +0 -3
- package/src/clients/models.ts +0 -2
- package/src/shared/content-settings/components/color-field/ColorField.vue +5 -10
- package/src/shared/models.ts +0 -6
- package/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.ts +11 -17
- package/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.vue +1 -4
- package/src/shared/navigation-style-settings/store/index.ts +21 -1
- package/src/shared/template-settings/components/TemplatesSettings.mixin.ts +2 -2
- package/src/shared/template-settings/store/template-settings-store.ts +18 -110
- package/lib/src/brand-page/utils/migration/migration-16.d.ts +0 -2
- package/lib/src/brand-page/utils/migration/migration-16.js +0 -47
- package/src/brand-page/utils/migration/migration-16.test.ts +0 -319
- package/src/brand-page/utils/migration/migration-16.ts +0 -75
- package/src/brand-page-maker/components/template-preview/TemplatePreviewAiBadge.vue +0 -12
|
@@ -400,10 +400,6 @@ export class PageFooterMobile extends AbstractPageFooterStyles {
|
|
|
400
400
|
export class BrandPageModel {
|
|
401
401
|
// Model version
|
|
402
402
|
v;
|
|
403
|
-
// Pre-purchase AI personalisation content key, persisted with the draft so the
|
|
404
|
-
// personalised AI template previews survive login / checkout-back / refresh - the
|
|
405
|
-
// content is retrieved by this token (user-agnostic), not regenerated (bp-5742).
|
|
406
|
-
userPromptContentKey;
|
|
407
403
|
styles;
|
|
408
404
|
/** @deprecated */
|
|
409
405
|
headerStyles;
|
|
@@ -8,13 +8,6 @@ export declare class NavigationMenuStyles {
|
|
|
8
8
|
subNavBackgroundColor?: string;
|
|
9
9
|
constructor(options: Partial<NavigationMenuStyles>, defaultOptions: Partial<NavigationMenuStyles>);
|
|
10
10
|
}
|
|
11
|
-
export declare const getDefaultSubNavBackgroundColor: (defaultTextColor: string | undefined) => string | undefined;
|
|
12
|
-
/**
|
|
13
|
-
* The hamburger sub nav background colour is auto color-matched only when the
|
|
14
|
-
* user has not deliberately set it - i.e. it has no value or is transparent.
|
|
15
|
-
* Any explicit colour (a hex) or an already color-matched key is preserved.
|
|
16
|
-
*/
|
|
17
|
-
export declare const isUnsetOrTransparentColor: (color: string | undefined | null) => boolean;
|
|
18
11
|
type NavigationStylesOptionType = Partial<Omit<NavigationDesktop | NavigationMobile, 'hamburgerMenuStyle'>> & {
|
|
19
12
|
hamburgerMenuStyle?: Partial<NavigationMenuStyles>;
|
|
20
13
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_FONT_FAMILY_KEY, DEFAULT_FONT_STYLE, DEFAULT_TEXT_ALIGN, DEFAULT_TEXT_DECORATION, FONT_FAMILY_CONFIGS, FONT_SIZE_BODY, FONT_WEIGHT_NORMAL,
|
|
1
|
+
import { DEFAULT_FONT_FAMILY_KEY, DEFAULT_FONT_STYLE, DEFAULT_TEXT_ALIGN, DEFAULT_TEXT_DECORATION, FONT_FAMILY_CONFIGS, FONT_SIZE_BODY, FONT_WEIGHT_NORMAL, defaultHamburgerNavigation, NAVIGATION_DISPLAY, } from '../constants';
|
|
2
2
|
import { VIEWPORTS } from './index';
|
|
3
3
|
import { TEXT_STYLE_TYPES } from './index';
|
|
4
4
|
import cloneDeep from 'lodash.clonedeep';
|
|
@@ -15,29 +15,6 @@ export class NavigationMenuStyles {
|
|
|
15
15
|
options.subNavBackgroundColor ?? defaultOptions.subNavBackgroundColor;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
export const getDefaultSubNavBackgroundColor = (defaultTextColor) => {
|
|
19
|
-
if (defaultTextColor === STYLE_THEME_KEYS.LogoTextColor ||
|
|
20
|
-
defaultTextColor === STYLE_THEME_KEYS.LogoTextMultiColor) {
|
|
21
|
-
return STYLE_THEME_KEYS.LogoBackgroundColor;
|
|
22
|
-
}
|
|
23
|
-
if (defaultTextColor === STYLE_THEME_KEYS.LogoBackgroundColor ||
|
|
24
|
-
defaultTextColor === STYLE_THEME_KEYS.LogoBackgroundMultiColor) {
|
|
25
|
-
return STYLE_THEME_KEYS.LogoTextColor;
|
|
26
|
-
}
|
|
27
|
-
return undefined;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* The hamburger sub nav background colour is auto color-matched only when the
|
|
31
|
-
* user has not deliberately set it - i.e. it has no value or is transparent.
|
|
32
|
-
* Any explicit colour (a hex) or an already color-matched key is preserved.
|
|
33
|
-
*/
|
|
34
|
-
export const isUnsetOrTransparentColor = (color) => {
|
|
35
|
-
if (color == null) {
|
|
36
|
-
return true;
|
|
37
|
-
}
|
|
38
|
-
const normalised = color.trim().toLowerCase();
|
|
39
|
-
return normalised === '' || normalised === 'transparent';
|
|
40
|
-
};
|
|
41
18
|
class NavigationStyles {
|
|
42
19
|
displayType;
|
|
43
20
|
renderAfterLogo;
|
|
@@ -102,7 +79,7 @@ class NavigationStyles {
|
|
|
102
79
|
color: theme?.secondaryColor,
|
|
103
80
|
backgroundColor: theme?.primaryColor,
|
|
104
81
|
},
|
|
105
|
-
|
|
82
|
+
subNavBackgroundColor: theme?.secondaryColor,
|
|
106
83
|
});
|
|
107
84
|
}
|
|
108
85
|
}
|
|
@@ -18,7 +18,6 @@ import { migration12_1 } from './migration/migration-12_1';
|
|
|
18
18
|
import { migration13 } from './migration/migration-13';
|
|
19
19
|
import { migration14 } from './migration/migration-14';
|
|
20
20
|
import { migration15 } from './migration/migration-15';
|
|
21
|
-
import { migration16 } from './migration/migration-16';
|
|
22
21
|
const MIGRATION_TABLE = [
|
|
23
22
|
{
|
|
24
23
|
version: 1,
|
|
@@ -116,12 +115,6 @@ const MIGRATION_TABLE = [
|
|
|
116
115
|
migrateFn: migration15,
|
|
117
116
|
description: 'Adding default mediaOverlayStyle to background styles',
|
|
118
117
|
},
|
|
119
|
-
{
|
|
120
|
-
version: 16,
|
|
121
|
-
migrateFn: migration16,
|
|
122
|
-
runAlways: true,
|
|
123
|
-
description: 'Default sub nav background color to color match on for TAB_2 and hamburger navs depending on font color only on first load flow',
|
|
124
|
-
},
|
|
125
118
|
];
|
|
126
119
|
export const GetLatestModelVersion = () => Math.max(...MIGRATION_TABLE.map((x) => x.version));
|
|
127
120
|
export const migrateBrandPageModel = async (brandPageModel, options) => {
|
|
@@ -206,61 +206,15 @@ const getPersonalisationValueAsync = async (section, property) => {
|
|
|
206
206
|
}
|
|
207
207
|
return { value: propertyValue, section };
|
|
208
208
|
};
|
|
209
|
-
// The userPrompt AI content generation only populates these content-bearing sections
|
|
210
|
-
// (see GenerateAiDesignMakerContentService / GenerateWebsiteContentService - About,
|
|
211
|
-
// Information, Profile, Media). Sections like email/website/phone are never generated, so
|
|
212
|
-
// blocks whose role points at an ungenerated section fall back to this pool.
|
|
213
|
-
const PERSONALISATION_FALLBACK_ROLES = [
|
|
214
|
-
'profile',
|
|
215
|
-
'about',
|
|
216
|
-
'information',
|
|
217
|
-
'media',
|
|
218
|
-
];
|
|
219
|
-
// A section is "effectively empty" when it carries no renderable content. The userPrompt
|
|
220
|
-
// AI content leaves ungenerated sections (e.g. email/website/phone) as empty objects (null
|
|
221
|
-
// sections are normalised to `{ ...indices }` upstream), and those are what we fall back
|
|
222
|
-
// from. A section that has data but lacks one specific property (e.g. no items, or an
|
|
223
|
-
// invalid shape) is NOT empty - those intentionally keep the original content.
|
|
224
|
-
const isSectionEffectivelyEmpty = (section) => {
|
|
225
|
-
if (!section) {
|
|
226
|
-
return true;
|
|
227
|
-
}
|
|
228
|
-
return (!section.title &&
|
|
229
|
-
!section.name &&
|
|
230
|
-
!section.url &&
|
|
231
|
-
!section.description &&
|
|
232
|
-
!section.descriptionShort &&
|
|
233
|
-
!section.ctaTitle &&
|
|
234
|
-
!section.imageUrls?.length &&
|
|
235
|
-
!section.shapes?.length &&
|
|
236
|
-
!section.items?.length &&
|
|
237
|
-
!section.mainShapesCollection?.tall?.length &&
|
|
238
|
-
!section.mainShapesCollection?.square?.length &&
|
|
239
|
-
!section.mainShapesCollection?.wide?.length);
|
|
240
|
-
};
|
|
241
|
-
// Resolve a property from a specific role's section. Returns null when that section is
|
|
242
|
-
// ungenerated (effectively empty) or cannot supply the property, so the caller can try the
|
|
243
|
-
// next role.
|
|
244
|
-
const resolvePersonalisationValueForRoleAsync = async (role, property, personalisation) => {
|
|
245
|
-
const key = `${role}Section`;
|
|
246
|
-
const section = personalisation[key];
|
|
247
|
-
if (isSectionEffectivelyEmpty(section)) {
|
|
248
|
-
return null;
|
|
249
|
-
}
|
|
250
|
-
const { value, section: updatedSection, valuesToUpdate, } = await getPersonalisationValueAsync(section, property);
|
|
251
|
-
if (value === undefined || value === null) {
|
|
252
|
-
return null;
|
|
253
|
-
}
|
|
254
|
-
return {
|
|
255
|
-
value,
|
|
256
|
-
personalisation: { ...personalisation, [key]: updatedSection },
|
|
257
|
-
valuesToUpdate,
|
|
258
|
-
};
|
|
259
|
-
};
|
|
260
209
|
const getPersonalisationValueFromPropertyAsync = async (propertyKey, propertyValue, personalisationRole, personalisationOverride, personalisation, contentType) => {
|
|
261
210
|
if (!personalisationRole || personalisationOverride === 'none') {
|
|
262
211
|
return { value: undefined, personalisation };
|
|
263
212
|
}
|
|
213
|
+
const matchingValue = Object.entries(personalisation).find(([key]) => key === `${personalisationRole}Section`);
|
|
214
|
+
if (!matchingValue) {
|
|
215
|
+
return { value: undefined, personalisation };
|
|
216
|
+
}
|
|
217
|
+
const section = matchingValue[1];
|
|
264
218
|
const mapping = getPersonalisationMappingForContentType(contentType);
|
|
265
219
|
const matchingProperty = Object.entries(mapping).find(([, value]) => value.includes(propertyKey));
|
|
266
220
|
if (!matchingProperty) {
|
|
@@ -271,31 +225,15 @@ const getPersonalisationValueFromPropertyAsync = async (propertyKey, propertyVal
|
|
|
271
225
|
brandPageType: personalisation.type,
|
|
272
226
|
isSvgShape: typeof propertyValue === 'string' && propertyValue.endsWith('.svg'),
|
|
273
227
|
});
|
|
274
|
-
const
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
personalisation: { ...personalisation, [primaryKey]: updatedSection },
|
|
284
|
-
valuesToUpdate,
|
|
285
|
-
};
|
|
286
|
-
}
|
|
287
|
-
// The block's section was never generated (e.g. email/website/phone in the userPrompt
|
|
288
|
-
// content). Fall back to the first populated content section that can supply this
|
|
289
|
-
// property, so the block doesn't render the designer's "should be AI generated"
|
|
290
|
-
// placeholder. When the section exists (handled above) or every section is populated
|
|
291
|
-
// (e.g. the AI Website Builder), this fallback is never reached.
|
|
292
|
-
for (const role of PERSONALISATION_FALLBACK_ROLES) {
|
|
293
|
-
const resolved = await resolvePersonalisationValueForRoleAsync(role, property, personalisation);
|
|
294
|
-
if (resolved) {
|
|
295
|
-
return resolved;
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
return { value: undefined, personalisation };
|
|
228
|
+
const { value, section: updatedSection, valuesToUpdate, } = await getPersonalisationValueAsync(section, property);
|
|
229
|
+
return {
|
|
230
|
+
value,
|
|
231
|
+
personalisation: {
|
|
232
|
+
...personalisation,
|
|
233
|
+
[`${personalisationRole}Section`]: updatedSection,
|
|
234
|
+
},
|
|
235
|
+
valuesToUpdate,
|
|
236
|
+
};
|
|
299
237
|
};
|
|
300
238
|
const applyPersonalisationToBrandPageContentsRecursiveAsync = async (personalisation, mappingType, content, personalisationRole) => {
|
|
301
239
|
let isApplied = false;
|
|
@@ -122,7 +122,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
122
122
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
123
123
|
}): void;
|
|
124
124
|
initialiseStoresByBrandPageModelAsync(brandPageModel: import("@brand-page/models").BrandPageModel): Promise<void>;
|
|
125
|
-
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled,
|
|
125
|
+
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
|
|
126
126
|
initialisePages({ pages, sections, }: {
|
|
127
127
|
pages: import("@brand-page/models").PageModel[];
|
|
128
128
|
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
@@ -251,12 +251,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
251
251
|
setUserPersonalisationData({ personalisationData, }: {
|
|
252
252
|
personalisationData: import("../../../brand-page").UserPersonalisationContent[];
|
|
253
253
|
}): void;
|
|
254
|
-
setUserPromptContentKey({ userPromptContentKey, }: {
|
|
255
|
-
userPromptContentKey: string | undefined;
|
|
256
|
-
}): void;
|
|
257
|
-
setShowAiTemplatesTab({ showAiTemplatesTab, }: {
|
|
258
|
-
showAiTemplatesTab: boolean;
|
|
259
|
-
}): void;
|
|
260
254
|
onBackgroundChanged(): void;
|
|
261
255
|
onContentChanged(): void;
|
|
262
256
|
onStyleChanged(): void;
|
|
@@ -20,8 +20,6 @@ export interface BrandPageMakerViewModel {
|
|
|
20
20
|
initialCategories: InitialCategories;
|
|
21
21
|
personalisation?: UserPersonalisationContent[];
|
|
22
22
|
isPersonalisationEnabled?: boolean;
|
|
23
|
-
userPromptContentKey?: string;
|
|
24
|
-
showAiTemplatesTab?: boolean;
|
|
25
23
|
brandPageType?: BrandPageType;
|
|
26
24
|
businessName?: string;
|
|
27
25
|
industry?: string;
|
|
@@ -169,7 +167,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
169
167
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
170
168
|
}): void;
|
|
171
169
|
initialiseStoresByBrandPageModelAsync(brandPageModel: import("@brand-page").BrandPageModel): Promise<void>;
|
|
172
|
-
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled,
|
|
170
|
+
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
|
|
173
171
|
initialisePages({ pages, sections, }: {
|
|
174
172
|
pages: import("@brand-page").PageModel[];
|
|
175
173
|
sections: import("@shared/page-settings/store").PageSettingsStateSections;
|
|
@@ -938,12 +936,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
938
936
|
setUserPersonalisationData({ personalisationData, }: {
|
|
939
937
|
personalisationData: UserPersonalisationContent[];
|
|
940
938
|
}): void;
|
|
941
|
-
setUserPromptContentKey({ userPromptContentKey, }: {
|
|
942
|
-
userPromptContentKey: string | undefined;
|
|
943
|
-
}): void;
|
|
944
|
-
setShowAiTemplatesTab({ showAiTemplatesTab, }: {
|
|
945
|
-
showAiTemplatesTab: boolean;
|
|
946
|
-
}): void;
|
|
947
939
|
onBackgroundChanged(): void;
|
|
948
940
|
onContentChanged(): void;
|
|
949
941
|
onStyleChanged(): void;
|
|
@@ -1090,9 +1082,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1090
1082
|
initialSearchTerm: string;
|
|
1091
1083
|
onSearchTermChanged?: import("@shared/template-settings/store").OnSearchTermChangedCallback | undefined;
|
|
1092
1084
|
}): void;
|
|
1093
|
-
setAiTemplateKeywords(payload: {
|
|
1094
|
-
aiTemplateKeywords: string;
|
|
1095
|
-
}): void;
|
|
1096
1085
|
notifySearchTermChanged(searchTerm: string | undefined): void;
|
|
1097
1086
|
clearTemplates(): void;
|
|
1098
1087
|
getTemplateByTemplateId(id: string): import("@shared/template-settings/models").TemplateSettingsTemplate | undefined;
|
|
@@ -148,8 +148,6 @@ export default defineComponent({
|
|
|
148
148
|
templateCategories: this.viewModel.templateCategories,
|
|
149
149
|
personalisationData: this.viewModel.personalisation,
|
|
150
150
|
isPersonalisationEnabled: this.viewModel.isPersonalisationEnabled || false,
|
|
151
|
-
userPromptContentKey: this.viewModel.userPromptContentKey,
|
|
152
|
-
showAiTemplatesTab: this.viewModel.showAiTemplatesTab || false,
|
|
153
151
|
brandPageType: this.viewModel.brandPageType,
|
|
154
152
|
businessName: this.viewModel.businessName,
|
|
155
153
|
industry: this.viewModel.industry,
|
|
@@ -111,7 +111,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
111
111
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
112
112
|
}): void;
|
|
113
113
|
initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../lib").BrandPageModel): Promise<void>;
|
|
114
|
-
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled,
|
|
114
|
+
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
|
|
115
115
|
initialisePages({ pages, sections, }: {
|
|
116
116
|
pages: import("../../../lib").PageModel[];
|
|
117
117
|
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts
CHANGED
|
@@ -617,7 +617,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
617
617
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
618
618
|
}): void;
|
|
619
619
|
initialiseStoresByBrandPageModelAsync(brandPageModel: import("@brand-page").BrandPageModel): Promise<void>;
|
|
620
|
-
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled,
|
|
620
|
+
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
|
|
621
621
|
initialisePages({ pages, sections, }: {
|
|
622
622
|
pages: import("@brand-page").PageModel[];
|
|
623
623
|
sections: import("@shared/page-settings/store").PageSettingsStateSections;
|
|
@@ -117,7 +117,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
117
117
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
118
118
|
}): void;
|
|
119
119
|
initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../brand-page").BrandPageModel): Promise<void>;
|
|
120
|
-
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled,
|
|
120
|
+
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
|
|
121
121
|
initialisePages({ pages, sections, }: {
|
|
122
122
|
pages: import("../../../brand-page").PageModel[];
|
|
123
123
|
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
@@ -395,7 +395,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
395
395
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
396
396
|
}): void;
|
|
397
397
|
initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../brand-page").BrandPageModel): Promise<void>;
|
|
398
|
-
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled,
|
|
398
|
+
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
|
|
399
399
|
initialisePages({ pages, sections, }: {
|
|
400
400
|
pages: import("../../../brand-page").PageModel[];
|
|
401
401
|
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
@@ -396,7 +396,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
396
396
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
397
397
|
}): void;
|
|
398
398
|
initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../brand-page").BrandPageModel): Promise<void>;
|
|
399
|
-
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled,
|
|
399
|
+
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
|
|
400
400
|
initialisePages({ pages, sections, }: {
|
|
401
401
|
pages: import("../../../brand-page").PageModel[];
|
|
402
402
|
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
@@ -127,7 +127,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
127
127
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
128
128
|
}): void;
|
|
129
129
|
initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../brand-page").BrandPageModel): Promise<void>;
|
|
130
|
-
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled,
|
|
130
|
+
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
|
|
131
131
|
initialisePages({ pages, sections, }: {
|
|
132
132
|
pages: import("../../../brand-page").PageModel[];
|
|
133
133
|
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="types/lodash-shims" />
|
|
2
2
|
import type { PropType } from 'vue';
|
|
3
3
|
import type { BrandPageContext, BrandPageViewModel, LogoImageModel, LogoTemplateImageModel, LogoTheme, UserPersonalisation } from '@brand-page';
|
|
4
|
-
import type
|
|
4
|
+
import { type TemplateSettingsTemplate } from '@shared/template-settings/models';
|
|
5
5
|
import type { DebounceHandle } from 'lodash.debounce';
|
|
6
6
|
interface TemplatePreviewData {
|
|
7
7
|
containerStyle: BrandPageCssStyle;
|
|
@@ -68,6 +68,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
68
68
|
isAdmin: import("vue").ComputedRef<boolean>;
|
|
69
69
|
userToken: import("vue").ComputedRef<string | undefined>;
|
|
70
70
|
isBrandSite: import("vue").ComputedRef<boolean>;
|
|
71
|
+
selectedTab: import("vue").ComputedRef<string>;
|
|
71
72
|
renderAsImage: import("vue").ComputedRef<boolean>;
|
|
72
73
|
brandPageMakerUserStore: import("pinia").Store<"brandPageMakerUser", import("@brand-page-maker/stores").UserState, {}, {
|
|
73
74
|
setUserState(payload: {
|
|
@@ -446,7 +447,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
446
447
|
brandPageType: "default" | "brandSite" | "brandContact";
|
|
447
448
|
}): void;
|
|
448
449
|
initialiseStoresByBrandPageModelAsync(brandPageModel: import("@brand-page").BrandPageModel): Promise<void>;
|
|
449
|
-
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled,
|
|
450
|
+
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
|
|
450
451
|
initialisePages({ pages, sections, }: {
|
|
451
452
|
pages: import("@brand-page").PageModel[];
|
|
452
453
|
sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
|
|
@@ -2,6 +2,7 @@ import { computed, defineComponent } from 'vue';
|
|
|
2
2
|
import { BRAND_PAGE_TYPES, MEDIA_SIZES, VIEWPORTS } from '@brand-page';
|
|
3
3
|
import { applyLogoThemeToBrandPageModel, applyUserPersonalisationToBrandPageModelAsync, getBrandPageViewModelFromBrandPageModel, } from '@brand-page/utils';
|
|
4
4
|
import { STYLE_THEME_KEYS } from '@brand-page/constants';
|
|
5
|
+
import { TEMPLATE_TABS, } from '@shared/template-settings/models';
|
|
5
6
|
import debounce from 'lodash.debounce';
|
|
6
7
|
import { MOBILE_HEIGHT, MOBILE_WIDTH } from '@brand-page-maker/constants';
|
|
7
8
|
import { useBrandPageContainerStore, useBrandPageMakerStore, useBrandPageMakerUserStore, } from '@brand-page-maker/stores';
|
|
@@ -23,6 +24,7 @@ export default defineComponent({
|
|
|
23
24
|
isAdmin: computed(() => brandPageMakerUserStore.isAdmin),
|
|
24
25
|
userToken: computed(() => brandPageMakerUserStore.userToken),
|
|
25
26
|
isBrandSite: computed(() => brandPageMakerStore.brandPageType === BRAND_PAGE_TYPES.brandSite),
|
|
27
|
+
selectedTab: computed(() => templateSettingsStore.selectedTab.key),
|
|
26
28
|
renderAsImage: computed(() => templateSettingsStore.renderAsImage),
|
|
27
29
|
brandPageMakerUserStore,
|
|
28
30
|
brandPageContainerStore,
|
|
@@ -169,23 +171,9 @@ export default defineComponent({
|
|
|
169
171
|
if (!previewImageUrl) {
|
|
170
172
|
return '';
|
|
171
173
|
}
|
|
172
|
-
|
|
173
|
-
// baked into the URL by the backend. Appending our own (hash-derived) key
|
|
174
|
-
// on top produces a second, mismatched key and breaks the preview, so only
|
|
175
|
-
// append when the backend hasn't already personalised the URL.
|
|
176
|
-
const isAlreadyPersonalised = previewImageUrl.includes('contentKey=') ||
|
|
177
|
-
previewImageUrl.includes('userPromptContentKey=');
|
|
178
|
-
if (this.isPersonalisable &&
|
|
179
|
-
this.template.contentKey &&
|
|
180
|
-
!isAlreadyPersonalised) {
|
|
174
|
+
if (this.selectedTab === TEMPLATE_TABS.AI && this.template.contentKey) {
|
|
181
175
|
if (this.userToken) {
|
|
182
|
-
previewImageUrl += `&contentKey=${this.template.contentKey}`;
|
|
183
|
-
// The backend already bakes userToken into brand-site preview URLs. Only add
|
|
184
|
-
// it when missing - two userToken params parse as an array and the preview
|
|
185
|
-
// renderer rejects it ("userToken must be a string type") (bp-5765).
|
|
186
|
-
if (!previewImageUrl.includes('userToken=')) {
|
|
187
|
-
previewImageUrl += `&userToken=${this.userToken}`;
|
|
188
|
-
}
|
|
176
|
+
previewImageUrl += `&contentKey=${this.template.contentKey}&userToken=${this.userToken}`;
|
|
189
177
|
}
|
|
190
178
|
else {
|
|
191
179
|
previewImageUrl += `&userPromptContentKey=${this.template.contentKey}`;
|
|
@@ -8,7 +8,6 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
|
|
|
8
8
|
userMessageId: string;
|
|
9
9
|
model: {
|
|
10
10
|
v: number;
|
|
11
|
-
userPromptContentKey?: string | undefined;
|
|
12
11
|
styles: {
|
|
13
12
|
backgroundStyles: {
|
|
14
13
|
style: {
|
|
@@ -5115,7 +5114,6 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
|
|
|
5115
5114
|
userMessageId: string;
|
|
5116
5115
|
model: {
|
|
5117
5116
|
v: number;
|
|
5118
|
-
userPromptContentKey?: string | undefined;
|
|
5119
5117
|
styles: {
|
|
5120
5118
|
backgroundStyles: {
|
|
5121
5119
|
style: {
|
|
@@ -10228,7 +10226,6 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
|
|
|
10228
10226
|
userMessageId: string;
|
|
10229
10227
|
model: {
|
|
10230
10228
|
v: number;
|
|
10231
|
-
userPromptContentKey?: string | undefined;
|
|
10232
10229
|
styles: {
|
|
10233
10230
|
backgroundStyles: {
|
|
10234
10231
|
style: {
|
|
@@ -15335,7 +15332,6 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
|
|
|
15335
15332
|
userMessageId: string;
|
|
15336
15333
|
model: {
|
|
15337
15334
|
v: number;
|
|
15338
|
-
userPromptContentKey?: string | undefined;
|
|
15339
15335
|
styles: {
|
|
15340
15336
|
backgroundStyles: {
|
|
15341
15337
|
style: {
|
|
@@ -20448,7 +20444,6 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
|
|
|
20448
20444
|
userMessageId: string;
|
|
20449
20445
|
model: {
|
|
20450
20446
|
v: number;
|
|
20451
|
-
userPromptContentKey?: string | undefined;
|
|
20452
20447
|
styles: {
|
|
20453
20448
|
backgroundStyles: {
|
|
20454
20449
|
style: {
|
|
@@ -25555,7 +25550,6 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
|
|
|
25555
25550
|
userMessageId: string;
|
|
25556
25551
|
model: {
|
|
25557
25552
|
v: number;
|
|
25558
|
-
userPromptContentKey?: string | undefined;
|
|
25559
25553
|
styles: {
|
|
25560
25554
|
backgroundStyles: {
|
|
25561
25555
|
style: {
|
|
@@ -75,7 +75,6 @@ export type InitialisePayload = Omit<BrandPageContainerState, 'customDomain' | '
|
|
|
75
75
|
logoDraftAssets: LogoDraftAsset[];
|
|
76
76
|
gettyVideos: GettyVideoEditorViewModelResponse[];
|
|
77
77
|
templateSearchTerm: string | undefined;
|
|
78
|
-
aiTemplateKeywords: string | undefined;
|
|
79
78
|
onSearchTermChanged?: OnSearchTermChangedCallback;
|
|
80
79
|
};
|
|
81
80
|
export declare const BRANDPAGE_STATUS: Readonly<{
|
|
@@ -137,9 +137,6 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
|
|
|
137
137
|
initialSearchTerm: payload.templateSearchTerm ?? '',
|
|
138
138
|
onSearchTermChanged: payload.onSearchTermChanged,
|
|
139
139
|
});
|
|
140
|
-
templateSettingsStore.setAiTemplateKeywords({
|
|
141
|
-
aiTemplateKeywords: payload.aiTemplateKeywords ?? '',
|
|
142
|
-
});
|
|
143
140
|
brandPageMakerStore.setSelectedTemplateId({
|
|
144
141
|
templateId: this.designTemplateToken,
|
|
145
142
|
});
|