@designcrowd/library.brand-page 5.16.42-nav-sync-8 → 5.16.42
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-BscmF-sS.js → CreatedOnBrandCrowd-de-de-2yOEYkJj.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-Cv1F3mRI.js → CreatedOnBrandCrowd-en-us-C3ZcstVb.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-DXIfZ_fT.js → CreatedOnBrandCrowd-es-es-CUVbeolm.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-CfYvT6mz.js → CreatedOnBrandCrowd-fr-ca-CWrEm5XF.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-CfYvT6mz.js → CreatedOnBrandCrowd-fr-fr-CWrEm5XF.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-BZVwRPjC.js → CreatedOnBrandCrowd-pt-br-5WAjD7l3.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-BZVwRPjC.js → CreatedOnBrandCrowd-pt-pt-5WAjD7l3.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-CdVwJsb6.js → CreatedOnDcom-de-de-B4b3caW2.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-AK0XouIT.js → CreatedOnDcom-en-us-DaLELZyT.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-B6t0ZBaO.js → CreatedOnDcom-es-es-p5JZJPXb.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-QtGHFspe.js → CreatedOnDcom-fr-ca-DcaNqreO.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-DwRKyc9d.js → CreatedOnDcom-fr-fr-DKzy6dez.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-D-y8prXm.js → CreatedOnDcom-pt-br-DXK8qDlO.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-D6P_Yh8g.js → CreatedOnDcom-pt-pt-ChGL1q2P.js} +1 -1
- package/lib/src/brand-page/components/page/Page.stories.js +0 -3
- package/lib/src/brand-page/models/index.d.ts +0 -18
- package/lib/src/brand-page/models/index.js +0 -12
- package/lib/src/brand-page/utils/index.d.ts +0 -1
- package/lib/src/brand-page/utils/index.js +0 -1
- package/lib/src/brand-page/utils/migration.util.js +0 -6
- package/lib/src/brand-page/utils/route.util.d.ts +1 -1
- package/lib/src/brand-page/utils/view-model.util.d.ts +2 -5
- package/lib/src/brand-page/utils/view-model.util.js +0 -26
- package/lib/src/brand-page/view-models.d.ts +0 -28
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.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/preview/Preview.stories.js +0 -4
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +2 -17
- package/lib/src/css/library.brand-page-brandCrowd.min.css +16 -16
- package/lib/src/css/library.brand-page-brandPage.min.css +16 -16
- package/lib/src/css/library.brand-page-designCom.min.css +16 -16
- package/lib/src/css/library.brand-page-preview.min.css +16 -16
- package/lib/src/index.d.ts +1 -1
- package/lib/src/index.mjs +121 -123
- package/lib/src/{lib-CYIzKhKU.js → lib-hXQaBPKF.js} +14692 -14930
- package/lib/src/lib.js +1 -1
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +1 -2
- 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/content-settings/components/page-dropdown-field/PageDropdownField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +1 -1
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +1 -1
- package/lib/src/shared/page-settings/components/new-page-modal/NewPageModal.mixin.d.ts +1 -15
- package/lib/src/shared/page-settings/components/new-page-modal/NewPageModal.mixin.js +1 -15
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +1 -15
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.js +0 -31
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +1 -2
- package/lib/src/shared/page-settings/models.d.ts +0 -1
- package/lib/src/shared/page-settings/store/page-settings-store.d.ts +1 -1
- package/lib/src/shared/page-settings/store/page-settings-store.js +1 -3
- package/package.json +4 -5
- package/src/brand-page/components/page/Page.stories.ts +0 -3
- package/src/brand-page/components/page/Page.vue +0 -1
- package/src/brand-page/components/social-links/SocialLinks.vue.test.ts +0 -1
- package/src/brand-page/components/text-wrapper/TextWrapper.vue +1 -1
- package/src/brand-page/models/index.ts +0 -30
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +3 -57
- package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +0 -4
- package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +0 -8
- package/src/brand-page/utils/index.ts +0 -1
- package/src/brand-page/utils/logo.util.test.ts +0 -5
- package/src/brand-page/utils/migration.util.test.ts +0 -15
- package/src/brand-page/utils/migration.util.ts +0 -6
- package/src/brand-page/utils/route.util.ts +1 -1
- package/src/brand-page/utils/view-model.util.ts +0 -81
- package/src/brand-page/view-models.ts +0 -33
- package/src/brand-page-maker/components/preview/Preview.stories.ts +0 -4
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.test.ts +2 -2
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +1 -22
- package/src/lib.ts +0 -1
- package/src/shared/logo-settings/store/logo-settings-store.test.ts +0 -2
- package/src/shared/page-settings/components/new-page-modal/NewPageModal.mixin.ts +1 -18
- package/src/shared/page-settings/components/page-settings/PageSettings.mixin.ts +0 -55
- package/src/shared/page-settings/models.ts +0 -1
- package/src/shared/page-settings/store/page-settings-store.test.ts +0 -1
- package/src/shared/page-settings/store/page-settings-store.ts +2 -6
- package/lib/src/brand-page/utils/migration/migration-12.d.ts +0 -2
- package/lib/src/brand-page/utils/migration/migration-12.js +0 -30
- package/lib/src/shared/page-navigation/store/page-navigation-store.d.ts +0 -18
- package/lib/src/shared/page-navigation/store/page-navigation-store.js +0 -118
- package/src/brand-page/utils/migration/migration-12.ts +0 -43
- package/src/shared/page-navigation/store/page-navigation-store.ts +0 -168
|
@@ -434,26 +434,9 @@ export declare class PageModel {
|
|
|
434
434
|
title: string;
|
|
435
435
|
slug: string;
|
|
436
436
|
contents: Content[];
|
|
437
|
-
id: string;
|
|
438
437
|
isHidden?: boolean;
|
|
439
438
|
constructor(options: Partial<Omit<PageModel, 'contents'>> & Partial<Pick<PageModel, 'contents'>>);
|
|
440
439
|
}
|
|
441
|
-
export interface NavRoute {
|
|
442
|
-
id: string;
|
|
443
|
-
pageId: string;
|
|
444
|
-
pageSlug: string;
|
|
445
|
-
isHidden: boolean;
|
|
446
|
-
displayName: string;
|
|
447
|
-
}
|
|
448
|
-
export interface NavOrder {
|
|
449
|
-
routeId: string;
|
|
450
|
-
subRoutes: NavOrder[];
|
|
451
|
-
}
|
|
452
|
-
export declare class NavModel {
|
|
453
|
-
orders: NavOrder[];
|
|
454
|
-
routes: NavRoute[];
|
|
455
|
-
constructor(options?: Partial<NavModel>);
|
|
456
|
-
}
|
|
457
440
|
type AbstractPageHeaderStylesType = Partial<AbstractPageHeaderStyles>;
|
|
458
441
|
export declare abstract class AbstractPageHeaderStyles {
|
|
459
442
|
displayStyle: HeaderDisplayStyle;
|
|
@@ -555,7 +538,6 @@ export declare class BrandPageModel {
|
|
|
555
538
|
pageFooterMobile: PageFooterMobile;
|
|
556
539
|
pageFooterDesktop: PageFooterDesktop;
|
|
557
540
|
pages: PageModel[];
|
|
558
|
-
nav: NavModel;
|
|
559
541
|
isModifiedAfterTemplateApplied?: boolean;
|
|
560
542
|
brandPageType?: BrandPageType;
|
|
561
543
|
faviconUrl?: string;
|
|
@@ -168,22 +168,12 @@ export class PageModel {
|
|
|
168
168
|
title;
|
|
169
169
|
slug;
|
|
170
170
|
contents;
|
|
171
|
-
id;
|
|
172
171
|
isHidden;
|
|
173
172
|
constructor(options) {
|
|
174
173
|
this.title = options.title ?? '';
|
|
175
174
|
this.slug = options.slug ?? '';
|
|
176
175
|
this.contents = options.contents || [];
|
|
177
176
|
this.isHidden = options.isHidden ?? false;
|
|
178
|
-
this.id = options.id || '';
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
export class NavModel {
|
|
182
|
-
orders;
|
|
183
|
-
routes;
|
|
184
|
-
constructor(options = {}) {
|
|
185
|
-
this.orders = options.orders || [];
|
|
186
|
-
this.routes = options.routes || [];
|
|
187
177
|
}
|
|
188
178
|
}
|
|
189
179
|
export class AbstractPageHeaderStyles {
|
|
@@ -413,7 +403,6 @@ export class BrandPageModel {
|
|
|
413
403
|
// @ts-expect-error should be initialised in constructor
|
|
414
404
|
pageFooterDesktop;
|
|
415
405
|
pages;
|
|
416
|
-
nav;
|
|
417
406
|
isModifiedAfterTemplateApplied;
|
|
418
407
|
brandPageType;
|
|
419
408
|
faviconUrl;
|
|
@@ -487,6 +476,5 @@ export class BrandPageModel {
|
|
|
487
476
|
this.cookieOptions = options.cookieOptions;
|
|
488
477
|
this.saveContactSettings = options.saveContactSettings;
|
|
489
478
|
this.paymentConfig = options.paymentConfig;
|
|
490
|
-
this.nav = new NavModel(options.nav);
|
|
491
479
|
}
|
|
492
480
|
}
|
|
@@ -8,7 +8,6 @@ export * from './image.util';
|
|
|
8
8
|
export * from './font-loader.util';
|
|
9
9
|
export * from './aspect-ratio.util';
|
|
10
10
|
export * from './context.util';
|
|
11
|
-
export * from './color.util';
|
|
12
11
|
export * from './personalisation.util';
|
|
13
12
|
export * from './migration.util';
|
|
14
13
|
export * from '../../utils/validator.util';
|
|
@@ -8,7 +8,6 @@ export * from './image.util';
|
|
|
8
8
|
export * from './font-loader.util';
|
|
9
9
|
export * from './aspect-ratio.util';
|
|
10
10
|
export * from './context.util';
|
|
11
|
-
export * from './color.util';
|
|
12
11
|
export * from './personalisation.util';
|
|
13
12
|
export * from './migration.util';
|
|
14
13
|
export * from '../../utils/validator.util';
|
|
@@ -13,7 +13,6 @@ import { migration08 } from './migration/migration-08';
|
|
|
13
13
|
import { migration09 } from './migration/migration-09';
|
|
14
14
|
import { migration10 } from './migration/migration-10';
|
|
15
15
|
import { migration11 } from './migration/migration-11';
|
|
16
|
-
import { migration12 } from './migration/migration-12';
|
|
17
16
|
const MIGRATION_TABLE = [
|
|
18
17
|
{
|
|
19
18
|
version: 1,
|
|
@@ -86,11 +85,6 @@ const MIGRATION_TABLE = [
|
|
|
86
85
|
migrateFn: migration11,
|
|
87
86
|
description: 'Remove backgroundColorEnabled flag from page headers',
|
|
88
87
|
},
|
|
89
|
-
{
|
|
90
|
-
version: 12,
|
|
91
|
-
migrateFn: migration12,
|
|
92
|
-
description: 'Migrating nav model to support sub nav feature',
|
|
93
|
-
},
|
|
94
88
|
];
|
|
95
89
|
export const GetLatestModelVersion = () => Math.max(...MIGRATION_TABLE.map((x) => x.version));
|
|
96
90
|
export const migrateBrandPageModel = async (brandPageModel, options) => {
|
|
@@ -5,4 +5,4 @@ export declare const getRouteParamsByPage: (isCustomDomain: boolean, brandPageSl
|
|
|
5
5
|
slug: string;
|
|
6
6
|
pageSlug: string;
|
|
7
7
|
};
|
|
8
|
-
export declare const getRouteNameByPageIndex: (isCustomDomain: boolean, pageIndex
|
|
8
|
+
export declare const getRouteNameByPageIndex: (isCustomDomain: boolean, pageIndex: number) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ImageContent, ProfileContent, TextContent, PageStyles, Content, BrandPageModel, ImageGalleryContent, GalleryStyles, BannerSectionContent, ImagesSectionContent, BrandPageType, PageHeaderDesktop, PageFooterDesktop, PageFooterMobile, PageHeaderMobile, LogoImageModel, LogoTemplateImageModel, BookingSectionContent
|
|
2
|
-
import type { ImageViewModel, LogoViewModel, ProfileViewModel, TextViewModel, ContentViewModel, BrandPageViewModel, ImageGalleryViewModel, PageViewModel, BannerSectionViewModel, PageHeaderViewModel, PageFooterViewModel, TextImageSectionViewModel, BookingSectionViewModel, PageStylesViewModel
|
|
1
|
+
import type { ImageContent, ProfileContent, TextContent, PageStyles, Content, BrandPageModel, ImageGalleryContent, GalleryStyles, BannerSectionContent, ImagesSectionContent, BrandPageType, PageHeaderDesktop, PageFooterDesktop, PageFooterMobile, PageHeaderMobile, LogoImageModel, LogoTemplateImageModel, BookingSectionContent } from '../models';
|
|
2
|
+
import type { ImageViewModel, LogoViewModel, ProfileViewModel, TextViewModel, ContentViewModel, BrandPageViewModel, ImageGalleryViewModel, PageViewModel, BannerSectionViewModel, PageHeaderViewModel, PageFooterViewModel, TextImageSectionViewModel, BookingSectionViewModel, PageStylesViewModel } from '../view-models';
|
|
3
3
|
export declare const applyViewModelTextStyles: <T extends ContentViewModel>(content: T, styles: PageStyles) => T;
|
|
4
4
|
export declare const mapToImageViewModel: (content: ImageContent) => ImageViewModel;
|
|
5
5
|
export declare const mapToImageGalleryViewModel: (content: ImageGalleryContent, globalStyles: GalleryStyles) => ImageGalleryViewModel;
|
|
@@ -8,15 +8,12 @@ export declare const mapToTextViewModel: (content: TextContent, styles: PageStyl
|
|
|
8
8
|
export declare const mapToBannerSectionViewModel: (content: BannerSectionContent, styles: PageStyles, options: ViewModelMappingOptions) => BannerSectionViewModel;
|
|
9
9
|
export declare const mapToImagesSectionViewModel: (content: ImagesSectionContent, styles: PageStyles, brandPageType: BrandPageType) => TextImageSectionViewModel;
|
|
10
10
|
export declare const mapToBookingSectionViewModel: (content: BookingSectionContent, styles: PageStyles) => BookingSectionViewModel;
|
|
11
|
-
export declare const mapToNavViewModel: (nav: NavModel, brandPageSlug?: string, isCustomDomain?: boolean) => NavViewModel;
|
|
12
11
|
export declare const mapToPageStyleViewModel: (pageStyles: PageStyles, options: ViewModelMappingOptions) => PageStylesViewModel;
|
|
13
12
|
export declare const mapToPageHeaderViewModel: (pageHeader: PageHeaderDesktop | PageHeaderMobile, pageStyles: PageStyles, pages: PageViewModel[], useOldLogoRenderSize?: boolean) => PageHeaderViewModel;
|
|
14
13
|
export declare const mapToPageFooterViewModel: (pageFooter: PageFooterDesktop | PageFooterMobile, pageStyles: PageStyles, useOldLogoRenderSize?: boolean) => PageFooterViewModel;
|
|
15
14
|
export declare const mapToViewModel: (styles: PageStyles, brandPageType: BrandPageType, options: ViewModelMappingOptions) => (content: Content) => ContentViewModel | undefined;
|
|
16
15
|
interface ViewModelMappingOptions {
|
|
17
16
|
useOldLogoRenderSize?: boolean;
|
|
18
|
-
isCustomDomain?: boolean;
|
|
19
|
-
brandPageSlug?: string;
|
|
20
17
|
getVideoUrls?: (token: string) => {
|
|
21
18
|
videoUrl: string;
|
|
22
19
|
previewImageUrl: string;
|
|
@@ -10,11 +10,9 @@ import { generateGoogleFontUrl } from './font-loader.util';
|
|
|
10
10
|
import { isValidSvgUrl } from './image.util';
|
|
11
11
|
import { isLogoContent } from './model.util';
|
|
12
12
|
import { getBoxShadowValue } from './button.util';
|
|
13
|
-
import { getRouteNameByPageIndex, getRouteParamsByPage } from './route.util';
|
|
14
13
|
const BUTTON_BORDER_RADIUS = '9999px';
|
|
15
14
|
const CONTENT_BORDER_RADIUS = '48px';
|
|
16
15
|
const PROFILE_PADDING_TOP = '1rem';
|
|
17
|
-
const MAX_SUB_NAV_DEPTH = 1;
|
|
18
16
|
const applyContentBorderRadius = (styles) => {
|
|
19
17
|
return {
|
|
20
18
|
...styles,
|
|
@@ -606,27 +604,6 @@ export const mapToBookingSectionViewModel = (content, styles) => {
|
|
|
606
604
|
isFullWidth: true,
|
|
607
605
|
}, styles);
|
|
608
606
|
};
|
|
609
|
-
// Recursively build the nav item view model for each page/sub page in the nav
|
|
610
|
-
const buildNavItemViewModel = (order, routes, parentPath, isFirstPage, brandPageSlug, isCustomDomain, depth = 0) => {
|
|
611
|
-
const route = routes.find((r) => r.id === order.routeId);
|
|
612
|
-
const pageSlug = route?.pageSlug ?? '';
|
|
613
|
-
const relativePath = parentPath ? `${parentPath}/${pageSlug}` : pageSlug;
|
|
614
|
-
return {
|
|
615
|
-
displayName: route?.displayName ?? '',
|
|
616
|
-
routeName: getRouteNameByPageIndex(Boolean(isCustomDomain), isFirstPage ? 0 : 9999),
|
|
617
|
-
routeParams: getRouteParamsByPage(Boolean(isCustomDomain), brandPageSlug ?? '', pageSlug),
|
|
618
|
-
relativePath,
|
|
619
|
-
isHidden: route?.isHidden ?? false,
|
|
620
|
-
nestedNavItems: depth >= MAX_SUB_NAV_DEPTH
|
|
621
|
-
? []
|
|
622
|
-
: order.subRoutes.map((subRoute) => buildNavItemViewModel(subRoute, routes, relativePath, false, brandPageSlug, isCustomDomain, depth + 1)),
|
|
623
|
-
};
|
|
624
|
-
};
|
|
625
|
-
export const mapToNavViewModel = (nav, brandPageSlug, isCustomDomain) => {
|
|
626
|
-
return {
|
|
627
|
-
navItems: nav.orders.map((order, idx) => buildNavItemViewModel(order, nav.routes, '', idx === 0, brandPageSlug, isCustomDomain)),
|
|
628
|
-
};
|
|
629
|
-
};
|
|
630
607
|
export const mapToPageStyleViewModel = (pageStyles, options) => {
|
|
631
608
|
return {
|
|
632
609
|
backgroundStylesViewModel: mapBackgroundStylesToViewModel(pageStyles.backgroundStyles, options),
|
|
@@ -804,17 +781,14 @@ export const getBrandPageViewModelFromBrandPageModel = (model, brandPageToken, s
|
|
|
804
781
|
return {
|
|
805
782
|
title: p.title,
|
|
806
783
|
slug: p.slug,
|
|
807
|
-
id: p.id,
|
|
808
784
|
contents,
|
|
809
785
|
isHidden: Boolean(p?.isHidden),
|
|
810
786
|
};
|
|
811
787
|
});
|
|
812
|
-
const nav = mapToNavViewModel(model.nav, options.brandPageSlug, options.isCustomDomain);
|
|
813
788
|
return {
|
|
814
789
|
brandPageToken,
|
|
815
790
|
pages,
|
|
816
791
|
showBrandCrowdLogo,
|
|
817
|
-
nav,
|
|
818
792
|
styles: mapToPageStyleViewModel(model.styles, options),
|
|
819
793
|
headerViewModelDesktop: mapToPageHeaderViewModel(model.pageHeaderDesktop, model.styles, pages, options.useOldLogoRenderSize),
|
|
820
794
|
headerViewModelMobile: mapToPageHeaderViewModel(model.pageHeaderMobile, model.styles, pages, options.useOldLogoRenderSize),
|
|
@@ -7,7 +7,6 @@ export interface ContentViewModel {
|
|
|
7
7
|
role: ContentType;
|
|
8
8
|
}
|
|
9
9
|
export interface PageViewModel {
|
|
10
|
-
id: string;
|
|
11
10
|
title: string;
|
|
12
11
|
slug: string;
|
|
13
12
|
contents: ContentViewModel[];
|
|
@@ -150,38 +149,11 @@ export interface PageStylesViewModel {
|
|
|
150
149
|
textStyles: TextStyles;
|
|
151
150
|
galleryStyles: GalleryStyles;
|
|
152
151
|
}
|
|
153
|
-
export interface NavRouteViewModel {
|
|
154
|
-
id: string;
|
|
155
|
-
pageId: string;
|
|
156
|
-
route: string;
|
|
157
|
-
}
|
|
158
|
-
export interface NavOrderViewModel {
|
|
159
|
-
routeId: string;
|
|
160
|
-
isHidden: boolean;
|
|
161
|
-
fullPath: string;
|
|
162
|
-
subRoutes: NavOrderViewModel[];
|
|
163
|
-
}
|
|
164
|
-
export interface NavItemRouteParams {
|
|
165
|
-
slug: string;
|
|
166
|
-
pageSlug?: string;
|
|
167
|
-
}
|
|
168
|
-
export interface NavItemViewModel {
|
|
169
|
-
displayName: string;
|
|
170
|
-
routeName: string;
|
|
171
|
-
routeParams: NavItemRouteParams;
|
|
172
|
-
isHidden: boolean;
|
|
173
|
-
relativePath: string;
|
|
174
|
-
nestedNavItems: NavItemViewModel[];
|
|
175
|
-
}
|
|
176
|
-
export interface NavViewModel {
|
|
177
|
-
navItems: NavItemViewModel[];
|
|
178
|
-
}
|
|
179
152
|
export interface BrandPageViewModel {
|
|
180
153
|
brandPageToken?: string;
|
|
181
154
|
showBrandCrowdLogo: boolean;
|
|
182
155
|
styles: PageStylesViewModel;
|
|
183
156
|
pages: PageViewModel[];
|
|
184
|
-
nav: NavViewModel;
|
|
185
157
|
brandPageType: BrandPageType;
|
|
186
158
|
headerViewModelDesktop: PageHeaderViewModel;
|
|
187
159
|
headerViewModelMobile: PageHeaderViewModel;
|
|
@@ -975,7 +975,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
975
975
|
}): void;
|
|
976
976
|
addNewPage(payload: {
|
|
977
977
|
title: string;
|
|
978
|
-
}):
|
|
978
|
+
}): void;
|
|
979
979
|
setSelectedSectionName({ sectionName, }: {
|
|
980
980
|
sectionName?: "footer" | "header" | "pages" | undefined;
|
|
981
981
|
}): void;
|
package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts
CHANGED
|
@@ -987,7 +987,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
987
987
|
}): void;
|
|
988
988
|
addNewPage(payload: {
|
|
989
989
|
title: string;
|
|
990
|
-
}):
|
|
990
|
+
}): void;
|
|
991
991
|
setSelectedSectionName({ sectionName, }: {
|
|
992
992
|
sectionName?: "footer" | "header" | "pages" | undefined;
|
|
993
993
|
}): void;
|
|
@@ -12,7 +12,6 @@ const pageStyles = new PageStyles();
|
|
|
12
12
|
const pages = [
|
|
13
13
|
{
|
|
14
14
|
title: '',
|
|
15
|
-
id: '',
|
|
16
15
|
slug: '',
|
|
17
16
|
isHidden: false,
|
|
18
17
|
contents: brandPageData
|
|
@@ -37,9 +36,6 @@ const viewModel = {
|
|
|
37
36
|
isSavingEnabled: true,
|
|
38
37
|
hideBranding: false,
|
|
39
38
|
},
|
|
40
|
-
nav: {
|
|
41
|
-
navItems: [],
|
|
42
|
-
},
|
|
43
39
|
};
|
|
44
40
|
export const SampleDesktop = () => {
|
|
45
41
|
const pinia = setupStoryPinia();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EMPTY_LOGO_IMAGE_MODEL, SENSITIVE_CONTENT_TYPES, VIEWPORTS, } from '../../../brand-page';
|
|
2
|
-
import { BackgroundStyles, BRAND_PAGE_TYPES, BrandPageModel, CONTENT_TYPES, NavigationDesktop, NavigationMobile,
|
|
2
|
+
import { BackgroundStyles, BRAND_PAGE_TYPES, BrandPageModel, CONTENT_TYPES, NavigationDesktop, NavigationMobile, } from '../../../brand-page';
|
|
3
3
|
import { useBrandPageMakerUserStore } from '../user';
|
|
4
4
|
import { defineStore } from 'pinia';
|
|
5
5
|
import { useUiStore } from '../ui';
|
|
@@ -8,7 +8,6 @@ import { useUiStyleSettingsStore } from '../../../shared/style-settings/store';
|
|
|
8
8
|
import { useUiNavigationStyleSettingsStore } from '../../../shared/navigation-style-settings/store';
|
|
9
9
|
import { useUiBackgroundSettingsStore } from '../../../shared/background-settings/store';
|
|
10
10
|
import { useShopConfigStore } from '../../../shared/ecommerce-settings/store/shop-settings-store';
|
|
11
|
-
import { usePageNavigationStore } from '../../../shared/page-navigation/store/page-navigation-store';
|
|
12
11
|
import { applyLogoThemeToBrandPageModel, migrateBrandPageModel, applyUserPersonalisationToBrandPageModelAsync, getBrandPageViewModelFromBrandPageModel, isLogoContent, parseLogoThemeToCssStyles, logoUtil, GetLatestModelVersion, } from '../../../brand-page/utils';
|
|
13
12
|
import { navigateToPageBySlug } from '../../routing';
|
|
14
13
|
import { BRANDPAGE_DEFAULT_ERROR_MESSAGE_DESCRIPTION, BRANDPAGE_DEFAULT_SAVE_MESSAGE_DESCRIPTION, MAKER_MOBILE_BREAKPOINT, MESSAGE_VISIBLE_DURATION, } from '../../constants';
|
|
@@ -292,8 +291,6 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
292
291
|
brandPageModel.pageFooterDesktop = model.pageFooterDesktop;
|
|
293
292
|
brandPageModel.pageFooterMobile = model.pageFooterMobile;
|
|
294
293
|
brandPageModel.pages = model.pages;
|
|
295
|
-
const pageNavigationStore = usePageNavigationStore();
|
|
296
|
-
pageNavigationStore.setNav({ nav: brandPageModel.nav });
|
|
297
294
|
navigationStyleSettingsStore.initialise({ reset: true });
|
|
298
295
|
styleSettingsStore.initialise({
|
|
299
296
|
reset: true,
|
|
@@ -649,8 +646,6 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
649
646
|
this.setCookiePreviewEnabled({
|
|
650
647
|
isCookiePreviewEnabled: brandPageModel.cookieOptions?.isCookiePreviewEnabled,
|
|
651
648
|
});
|
|
652
|
-
const pageNavigationStore = usePageNavigationStore();
|
|
653
|
-
pageNavigationStore.setNav({ nav: brandPageModel.nav });
|
|
654
649
|
this.setSavingEnabled({
|
|
655
650
|
isSavingEnabled: brandPageModel.saveContactSettings?.isSavingEnabled ?? true,
|
|
656
651
|
});
|
|
@@ -819,7 +814,6 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
819
814
|
const styleSettingsStore = useUiStyleSettingsStore();
|
|
820
815
|
const navigationStyleSettingsStore = useUiNavigationStyleSettingsStore();
|
|
821
816
|
const shopStore = useShopConfigStore();
|
|
822
|
-
const pageNavigationStore = usePageNavigationStore();
|
|
823
817
|
const pages = pageSettingsStore.pages.map((p) => ({
|
|
824
818
|
...p,
|
|
825
819
|
contents: p.contents
|
|
@@ -831,8 +825,7 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
831
825
|
const buttonStyles = styleSettingsStore.buttonStyles;
|
|
832
826
|
const textStyles = styleSettingsStore.textStyles;
|
|
833
827
|
const galleryStyles = styleSettingsStore.galleryStyles;
|
|
834
|
-
const navigation = navigationStyleSettingsStore.navigation;
|
|
835
|
-
const pageNavStructure = pageNavigationStore.nav;
|
|
828
|
+
const navigation = navigationStyleSettingsStore.navigation;
|
|
836
829
|
return {
|
|
837
830
|
v: GetLatestModelVersion(),
|
|
838
831
|
pages,
|
|
@@ -858,7 +851,6 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
858
851
|
cookieOptions: this.cookieOptions,
|
|
859
852
|
saveContactSettings: this.saveContactSettings,
|
|
860
853
|
paymentConfig: shopStore.paymentConfig,
|
|
861
|
-
nav: pageNavStructure,
|
|
862
854
|
};
|
|
863
855
|
},
|
|
864
856
|
brandPageToken() {
|
|
@@ -934,7 +926,6 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
934
926
|
const userStore = useBrandPageMakerUserStore();
|
|
935
927
|
const uiStore = useUiStore();
|
|
936
928
|
const videoStore = useVideoStore();
|
|
937
|
-
const brandPageContainerStore = useBrandPageContainerStore();
|
|
938
929
|
if (userStore.isAdmin && uiStore.logoTheme) {
|
|
939
930
|
const themedBrandPage = applyLogoThemeToBrandPageModel(uiStore.logoTheme, this.brandPageData).model;
|
|
940
931
|
return getBrandPageViewModelFromBrandPageModel(themedBrandPage, this.brandPageToken, undefined, {
|
|
@@ -942,8 +933,6 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
942
933
|
getVideoUrls: videoStore.getVideoUrlsForToken,
|
|
943
934
|
getS3VideoUrls: videoStore.getOptimisedS3VideoUrlsForToken,
|
|
944
935
|
setVideoUrlsWithToken: videoStore.setVideoUrlsWithToken,
|
|
945
|
-
isCustomDomain: brandPageContainerStore.isCustomDomainEnabled,
|
|
946
|
-
brandPageSlug: brandPageContainerStore.brandPageSlug,
|
|
947
936
|
});
|
|
948
937
|
}
|
|
949
938
|
const showBrandCrowdLogo = userStore.features.showBrandCrowdLogo;
|
|
@@ -957,8 +946,6 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
957
946
|
getVideoUrls: videoStore.getVideoUrlsForToken,
|
|
958
947
|
getS3VideoUrls: videoStore.getOptimisedS3VideoUrlsForToken,
|
|
959
948
|
setVideoUrlsWithToken: videoStore.setVideoUrlsWithToken,
|
|
960
|
-
isCustomDomain: brandPageContainerStore.isCustomDomainEnabled,
|
|
961
|
-
brandPageSlug: brandPageContainerStore.brandPageSlug,
|
|
962
949
|
});
|
|
963
950
|
}
|
|
964
951
|
return getBrandPageViewModelFromBrandPageModel(this.brandPageData, this.brandPageToken, showBrandCrowdLogo, {
|
|
@@ -966,8 +953,6 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
|
|
|
966
953
|
getVideoUrls: videoStore.getVideoUrlsForToken,
|
|
967
954
|
getS3VideoUrls: videoStore.getOptimisedS3VideoUrlsForToken,
|
|
968
955
|
setVideoUrlsWithToken: videoStore.setVideoUrlsWithToken,
|
|
969
|
-
isCustomDomain: brandPageContainerStore.isCustomDomainEnabled,
|
|
970
|
-
brandPageSlug: brandPageContainerStore.brandPageSlug,
|
|
971
956
|
});
|
|
972
957
|
},
|
|
973
958
|
gettyVideoIds() {
|
|
@@ -5377,7 +5377,7 @@ input[data-v-4cd691db]::-webkit-inner-spin-button {
|
|
|
5377
5377
|
max-height: 45vh;
|
|
5378
5378
|
}
|
|
5379
5379
|
|
|
5380
|
-
.empty-para[data-v-
|
|
5380
|
+
.empty-para[data-v-a22efdb4] p:empty::after {
|
|
5381
5381
|
content: '\00A0';
|
|
5382
5382
|
}
|
|
5383
5383
|
|
|
@@ -7312,14 +7312,14 @@ body {
|
|
|
7312
7312
|
line-height: 1.5;
|
|
7313
7313
|
}
|
|
7314
7314
|
|
|
7315
|
-
.brand-page-root[data-v-
|
|
7315
|
+
.brand-page-root[data-v-e7602e06] {
|
|
7316
7316
|
height: 100%;
|
|
7317
7317
|
}
|
|
7318
|
-
.sortable[data-v-
|
|
7318
|
+
.sortable[data-v-e7602e06] {
|
|
7319
7319
|
outline-color: #F7768C;
|
|
7320
7320
|
outline-width: 0.2rem;
|
|
7321
7321
|
}
|
|
7322
|
-
.brand-page[data-v-
|
|
7322
|
+
.brand-page[data-v-e7602e06] {
|
|
7323
7323
|
-webkit-box-sizing: border-box;
|
|
7324
7324
|
box-sizing: border-box;
|
|
7325
7325
|
display: -webkit-box;
|
|
@@ -7331,7 +7331,7 @@ body {
|
|
|
7331
7331
|
-ms-flex-direction: column;
|
|
7332
7332
|
flex-direction: column;
|
|
7333
7333
|
}
|
|
7334
|
-
.brand-page__inner--default[data-v-
|
|
7334
|
+
.brand-page__inner--default[data-v-e7602e06] {
|
|
7335
7335
|
position: relative;
|
|
7336
7336
|
z-index: 10;
|
|
7337
7337
|
display: -webkit-box;
|
|
@@ -7343,16 +7343,16 @@ body {
|
|
|
7343
7343
|
-ms-flex-direction: column;
|
|
7344
7344
|
flex-direction: column;
|
|
7345
7345
|
}
|
|
7346
|
-
.brand-page__inner--desktop[data-v-
|
|
7346
|
+
.brand-page__inner--desktop[data-v-e7602e06] {
|
|
7347
7347
|
min-height: 100vh;
|
|
7348
7348
|
}
|
|
7349
|
-
.brand-site__header[data-v-
|
|
7349
|
+
.brand-site__header[data-v-e7602e06] {
|
|
7350
7350
|
container-type: inline-size;
|
|
7351
7351
|
}
|
|
7352
|
-
.brand-page__header[data-v-
|
|
7352
|
+
.brand-page__header[data-v-e7602e06] {
|
|
7353
7353
|
padding-top: var(--page-padding);
|
|
7354
7354
|
}
|
|
7355
|
-
.brand-page__content--default[data-v-
|
|
7355
|
+
.brand-page__content--default[data-v-e7602e06] {
|
|
7356
7356
|
margin-left: auto;
|
|
7357
7357
|
margin-right: auto;
|
|
7358
7358
|
margin-bottom: 2.5rem;
|
|
@@ -7369,7 +7369,7 @@ body {
|
|
|
7369
7369
|
flex-direction: column;
|
|
7370
7370
|
max-width: var(--page-max-width);
|
|
7371
7371
|
}
|
|
7372
|
-
.brand-page__content--desktop[data-v-
|
|
7372
|
+
.brand-page__content--desktop[data-v-e7602e06] {
|
|
7373
7373
|
margin-left: auto;
|
|
7374
7374
|
margin-right: auto;
|
|
7375
7375
|
display: -webkit-box;
|
|
@@ -7385,15 +7385,15 @@ body {
|
|
|
7385
7385
|
flex-direction: column;
|
|
7386
7386
|
max-width: 100%;
|
|
7387
7387
|
}
|
|
7388
|
-
.brand-page__content--inner[data-v-
|
|
7388
|
+
.brand-page__content--inner[data-v-e7602e06] {
|
|
7389
7389
|
padding-left: var(--page-padding);
|
|
7390
7390
|
padding-right: var(--page-padding);
|
|
7391
7391
|
}
|
|
7392
|
-
.brand-page__content--inner--brandsite[data-v-
|
|
7392
|
+
.brand-page__content--inner--brandsite[data-v-e7602e06] {
|
|
7393
7393
|
max-width: var(--brandsite-max-width);
|
|
7394
7394
|
margin: 0 auto;
|
|
7395
7395
|
}
|
|
7396
|
-
.brand-page__content--outline-selected[data-v-
|
|
7396
|
+
.brand-page__content--outline-selected[data-v-e7602e06] {
|
|
7397
7397
|
position: relative;
|
|
7398
7398
|
z-index: 10;
|
|
7399
7399
|
outline-color: #F7768C;
|
|
@@ -7401,20 +7401,20 @@ body {
|
|
|
7401
7401
|
outline-style: dashed;
|
|
7402
7402
|
outline-offset: -0.25rem;
|
|
7403
7403
|
}
|
|
7404
|
-
.brand-page__content--outline-footer-selected[data-v-
|
|
7404
|
+
.brand-page__content--outline-footer-selected[data-v-e7602e06] {
|
|
7405
7405
|
outline-color: #f7768c;
|
|
7406
7406
|
outline-width: 0.2rem;
|
|
7407
7407
|
outline-style: dashed;
|
|
7408
7408
|
outline-offset: -0.25rem;
|
|
7409
7409
|
}
|
|
7410
7410
|
@media (max-width: 640px) {
|
|
7411
|
-
.brand-page__content--inner--full-width[data-v-
|
|
7411
|
+
.brand-page__content--inner--full-width[data-v-e7602e06] {
|
|
7412
7412
|
padding-left: 0;
|
|
7413
7413
|
padding-right: 0;
|
|
7414
7414
|
}
|
|
7415
7415
|
}
|
|
7416
7416
|
@media (min-width: 640px) {
|
|
7417
|
-
.brand-page__content--inner--full-width[data-v-
|
|
7417
|
+
.brand-page__content--inner--full-width[data-v-e7602e06] {
|
|
7418
7418
|
padding-left: var(--page-padding);
|
|
7419
7419
|
padding-right: var(--page-padding);
|
|
7420
7420
|
}
|