@designcrowd/library.brand-page 5.15.21-gettyfinal → 5.15.21
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-K-AgT_7y.js → CreatedOnBrandCrowd-de-de-DZ5Vucii.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-DX-eOXIJ.js → CreatedOnBrandCrowd-en-us-DknGL3Zu.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-solPysq-.js → CreatedOnBrandCrowd-es-es-NwtO4oKe.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-DCdRbub4.js → CreatedOnBrandCrowd-fr-ca-DfUf3ajR.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-DCdRbub4.js → CreatedOnBrandCrowd-fr-fr-DfUf3ajR.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-CWy-ZMjD.js → CreatedOnBrandCrowd-pt-br-TjO5ceZp.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-CWy-ZMjD.js → CreatedOnBrandCrowd-pt-pt-TjO5ceZp.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-CZNGEnA1.js → CreatedOnDcom-de-de-CiEaeern.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-C9XDF01U.js → CreatedOnDcom-en-us-BsQTy39u.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-BXZyfuHJ.js → CreatedOnDcom-es-es-BgUs8RD2.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-zOsQivrO.js → CreatedOnDcom-fr-ca-5Rt16LTN.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-DAtyVaxQ.js → CreatedOnDcom-fr-fr-DRajgiLq.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-aZ6Ws1mJ.js → CreatedOnDcom-pt-br-CpGsGCmj.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-DytMZG1X.js → CreatedOnDcom-pt-pt-C1CjD8Ks.js} +1 -1
- package/lib/src/brand-page/components/media/Media.mixin.d.ts +0 -12
- package/lib/src/brand-page/components/media/Media.mixin.js +0 -5
- package/lib/src/brand-page/components/page/Page.stories.js +1 -1
- package/lib/src/brand-page/components/payment/__fixtures__/request-payment.d.ts +0 -1
- package/lib/src/brand-page/components/payment/__fixtures__/support-me.d.ts +0 -1
- package/lib/src/brand-page/models/brand-page-context.model.d.ts +0 -1
- package/lib/src/brand-page/models/index.d.ts +0 -16
- package/lib/src/brand-page/models/index.js +0 -19
- package/lib/src/brand-page/utils/view-model.util.d.ts +5 -16
- package/lib/src/brand-page/utils/view-model.util.js +8 -48
- package/lib/src/brand-page/view-models.d.ts +1 -19
- package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +0 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +0 -3
- 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 +0 -1
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +0 -3
- package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.d.ts +0 -1
- package/lib/src/brand-page-maker/components/preview/Preview.mixin.js +0 -1
- package/lib/src/brand-page-maker/components/preview/Preview.stories.js +1 -1
- package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +0 -1
- package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +0 -1
- package/lib/src/brand-page-maker/components/social-share/SocialShare.mixin.d.ts +0 -1
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +0 -1
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.js +1 -7
- package/lib/src/brand-page-maker/constants/config-settings-constant.js +11 -28
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +0 -12
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.js +3 -20
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.d.ts +0 -1
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +3 -24
- package/lib/src/brand-page-maker/stores/index.d.ts +0 -1
- package/lib/src/brand-page-maker/stores/index.js +0 -1
- package/lib/src/{bundled-translations-D9iHE5G9.js → bundled-translations-wzmaFfsm.js} +1 -1
- package/lib/src/bundles/bundled-translations.json +0 -4
- package/lib/src/clients/brand-page-client.js +1 -2
- package/lib/src/clients/gettyimages-client.js +1 -1
- package/lib/src/css/library.brand-page-brandCrowd.min.css +20 -20
- package/lib/src/css/library.brand-page-brandPage.min.css +20 -20
- package/lib/src/css/library.brand-page-designCom.min.css +20 -20
- package/lib/src/css/library.brand-page-preview.min.css +20 -20
- package/lib/src/helpers/ts.helper.d.ts +0 -1
- package/lib/src/helpers/ts.helper.js +0 -22
- package/lib/src/index.d.ts +1 -1
- package/lib/src/index.mjs +180 -183
- package/lib/src/{lib-Cwr-7uws.js → lib-BpQH-xbj.js} +17615 -17908
- package/lib/src/lib.js +1 -1
- package/lib/src/shared/content-settings/components/GenericTextInput.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +0 -3
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +1 -5
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.js +0 -4
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +0 -2
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.js +0 -1
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +0 -3
- package/lib/src/shared/content-settings/components/email-field/EmailField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +0 -2
- package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.js +0 -1
- package/lib/src/shared/content-settings/components/image-field/ImageField.mixin.d.ts +1 -23
- package/lib/src/shared/content-settings/components/image-field/ImageField.mixin.js +1 -25
- package/lib/src/shared/content-settings/components/tel-field/TelField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/text-field/TextField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/textarea-field/TextareaField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/url-field/UrlField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/youtube-video-field/YoutubeVideoField.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/models.d.ts +0 -2
- package/lib/src/shared/content-settings/store/content-settings-store.d.ts +0 -3
- package/lib/src/shared/content-settings/store/content-settings-store.js +1 -37
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +0 -1
- package/lib/src/shared/my-uploads/models.d.ts +0 -12
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +0 -3
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +0 -3
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +0 -1
- package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +0 -1
- package/package.json +1 -1
- package/src/brand-page/components/banner-section/BannerSection.vue +1 -6
- package/src/brand-page/components/media/Media.mixin.ts +0 -6
- package/src/brand-page/components/media/Media.vue +3 -18
- package/src/brand-page/components/page/Page.stories.ts +0 -1
- package/src/brand-page/models/brand-page-context.model.ts +0 -1
- package/src/brand-page/models/index.ts +0 -34
- package/src/brand-page/utils/view-model.util.test.ts +2 -10
- package/src/brand-page/utils/view-model.util.ts +7 -93
- package/src/brand-page/view-models.ts +0 -24
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.ts +0 -1
- package/src/brand-page-maker/components/preview/Preview.mixin.ts +0 -1
- package/src/brand-page-maker/components/preview/Preview.stories.ts +0 -1
- package/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.ts +0 -8
- package/src/brand-page-maker/constants/config-settings-constant.ts +10 -30
- package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.ts +1 -46
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +0 -25
- package/src/brand-page-maker/stores/index.ts +0 -1
- package/src/bundles/bundled-translations.json +0 -4
- package/src/clients/brand-page-client.ts +1 -2
- package/src/clients/gettyimages-client.js +1 -1
- package/src/helpers/ts.helper.ts +0 -30
- package/src/lib.ts +0 -1
- package/src/shared/common/i18n/common.json +0 -2
- package/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.ts +1 -12
- package/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.vue +0 -1
- package/src/shared/content-settings/components/content-settings/i18n/content-settings.json +0 -4
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.ts +0 -1
- package/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.ts +0 -1
- package/src/shared/content-settings/components/image-field/ImageField.mixin.ts +1 -31
- package/src/shared/content-settings/components/replace-image-base-settings/ReplaceImageBaseSettings.vue +2 -10
- package/src/shared/content-settings/models.ts +0 -3
- package/src/shared/content-settings/store/content-settings-store.ts +0 -68
- package/src/shared/my-uploads/models.ts +0 -16
- package/src/shared/video-library/VideoLibrary.vue +11 -32
- package/lib/src/brand-page-maker/stores/video/index.d.ts +0 -1
- package/lib/src/brand-page-maker/stores/video/index.js +0 -1
- package/lib/src/brand-page-maker/stores/video/video-store.d.ts +0 -27
- package/lib/src/brand-page-maker/stores/video/video-store.js +0 -27
- package/src/brand-page/components/media/Video.vue +0 -62
- package/src/brand-page-maker/stores/video/index.ts +0 -1
- package/src/brand-page-maker/stores/video/video-store.ts +0 -47
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
2
|
import type { BrandPageContext, ColorReplacement } from '../../models';
|
|
3
|
-
import type { MediaViewModel } from '../../../lib';
|
|
4
3
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
4
|
mediaType: {
|
|
6
5
|
type: StringConstructor;
|
|
@@ -60,11 +59,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
60
59
|
required: false;
|
|
61
60
|
default: undefined;
|
|
62
61
|
};
|
|
63
|
-
media: {
|
|
64
|
-
type: PropType<MediaViewModel>;
|
|
65
|
-
required: false;
|
|
66
|
-
default: undefined;
|
|
67
|
-
};
|
|
68
62
|
}>, {}, {
|
|
69
63
|
type: string | undefined;
|
|
70
64
|
isImageBroken: boolean;
|
|
@@ -129,13 +123,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
129
123
|
required: false;
|
|
130
124
|
default: undefined;
|
|
131
125
|
};
|
|
132
|
-
media: {
|
|
133
|
-
type: PropType<MediaViewModel>;
|
|
134
|
-
required: false;
|
|
135
|
-
default: undefined;
|
|
136
|
-
};
|
|
137
126
|
}>> & Readonly<{}>, {
|
|
138
|
-
media: MediaViewModel;
|
|
139
127
|
colorReplacements: ColorReplacement[];
|
|
140
128
|
mediaType: string;
|
|
141
129
|
size: string;
|
|
@@ -12,7 +12,7 @@ const pages = brandPageModel.pages.map((p) => ({
|
|
|
12
12
|
...p,
|
|
13
13
|
isHidden: false,
|
|
14
14
|
contents: p.contents
|
|
15
|
-
.map(mapToViewModel(brandPageModel.styles, brandPageModel.brandPageType || BRAND_PAGE_TYPES.default
|
|
15
|
+
.map(mapToViewModel(brandPageModel.styles, brandPageModel.brandPageType || BRAND_PAGE_TYPES.default))
|
|
16
16
|
.filter((x) => x !== undefined),
|
|
17
17
|
}));
|
|
18
18
|
const viewModel = {
|
|
@@ -22,7 +22,6 @@ export declare const context: {
|
|
|
22
22
|
options?: {
|
|
23
23
|
disableNavigationSideMenu?: boolean | undefined;
|
|
24
24
|
mediaSizes?: "size1x" | "size2x" | "sizeThumb" | undefined;
|
|
25
|
-
renderVideoAsImage?: boolean | undefined;
|
|
26
25
|
} | undefined;
|
|
27
26
|
abTests?: import("../../../models").AbTest | undefined;
|
|
28
27
|
isCapturingPreview: boolean;
|
|
@@ -22,7 +22,6 @@ export declare const context: {
|
|
|
22
22
|
options?: {
|
|
23
23
|
disableNavigationSideMenu?: boolean | undefined;
|
|
24
24
|
mediaSizes?: "size1x" | "size2x" | "sizeThumb" | undefined;
|
|
25
|
-
renderVideoAsImage?: boolean | undefined;
|
|
26
25
|
} | undefined;
|
|
27
26
|
abTests?: import("../../../models").AbTest | undefined;
|
|
28
27
|
isCapturingPreview: boolean;
|
|
@@ -271,7 +271,6 @@ export interface BannerSectionContent extends Content {
|
|
|
271
271
|
overlayColor: BrandPageCssStyle;
|
|
272
272
|
overlayOpacity: number;
|
|
273
273
|
aspectRatio?: number | null;
|
|
274
|
-
media?: AbstractMedia;
|
|
275
274
|
}
|
|
276
275
|
export declare const MEDIA_TYPES: {
|
|
277
276
|
readonly image: "image";
|
|
@@ -494,21 +493,6 @@ export declare abstract class AbstractPageFooterStyles {
|
|
|
494
493
|
logoImageWidth: string | undefined;
|
|
495
494
|
protected constructor(options?: AbstractPageFooterStylesType);
|
|
496
495
|
}
|
|
497
|
-
export type MediaTypes = 'getty-video' | 'user-upload-video' | 'image';
|
|
498
|
-
export declare abstract class AbstractMedia {
|
|
499
|
-
abstract type: MediaTypes;
|
|
500
|
-
}
|
|
501
|
-
type GettyVideoMediaType = Partial<GettyVideoMedia>;
|
|
502
|
-
export declare class GettyVideoMedia extends AbstractMedia {
|
|
503
|
-
type: MediaTypes;
|
|
504
|
-
gettyToken: string;
|
|
505
|
-
gettyAssetId: string;
|
|
506
|
-
mimeType: string;
|
|
507
|
-
settings: {
|
|
508
|
-
autoPlay?: boolean;
|
|
509
|
-
};
|
|
510
|
-
constructor(options?: GettyVideoMediaType);
|
|
511
|
-
}
|
|
512
496
|
export declare class PageFooterDesktop extends AbstractPageFooterStyles {
|
|
513
497
|
constructor(options?: AbstractPageFooterStylesType);
|
|
514
498
|
}
|
|
@@ -351,25 +351,6 @@ export class AbstractPageFooterStyles {
|
|
|
351
351
|
this.textFontFamily = options.textFontFamily;
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
|
-
export class AbstractMedia {
|
|
355
|
-
}
|
|
356
|
-
export class GettyVideoMedia extends AbstractMedia {
|
|
357
|
-
type = 'getty-video';
|
|
358
|
-
gettyToken;
|
|
359
|
-
gettyAssetId;
|
|
360
|
-
mimeType;
|
|
361
|
-
settings;
|
|
362
|
-
constructor(options = {}) {
|
|
363
|
-
options = cloneDeep(options);
|
|
364
|
-
super();
|
|
365
|
-
this.type = 'getty-video';
|
|
366
|
-
this.gettyToken = options.gettyToken || '';
|
|
367
|
-
this.gettyAssetId = options.gettyAssetId || '';
|
|
368
|
-
this.mimeType = options.mimeType || '';
|
|
369
|
-
this.settings = options.settings || {};
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
//jyao: END of media related entities and classes
|
|
373
354
|
export class PageFooterDesktop extends AbstractPageFooterStyles {
|
|
374
355
|
constructor(options = {}) {
|
|
375
356
|
options = cloneDeep(options);
|
|
@@ -5,25 +5,15 @@ export declare const mapToImageViewModel: (content: ImageContent) => ImageViewMo
|
|
|
5
5
|
export declare const mapToImageGalleryViewModel: (content: ImageGalleryContent, globalStyles: GalleryStyles) => ImageGalleryViewModel;
|
|
6
6
|
export declare const mapToProfileViewModel: (content: ProfileContent, styles: PageStyles) => ProfileViewModel;
|
|
7
7
|
export declare const mapToTextViewModel: (content: TextContent, styles: PageStyles, brandPageType: BrandPageType) => TextViewModel;
|
|
8
|
-
export declare const mapToBannerSectionViewModel: (content: BannerSectionContent, styles: PageStyles
|
|
8
|
+
export declare const mapToBannerSectionViewModel: (content: BannerSectionContent, styles: PageStyles) => 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
11
|
export declare const mapToPageHeaderViewModel: (pageHeader: PageHeaderDesktop | PageHeaderMobile, pageStyles: PageStyles, pages: PageViewModel[], useOldLogoRenderSize?: boolean) => PageHeaderViewModel;
|
|
12
12
|
export declare const mapToPageFooterViewModel: (pageFooter: PageFooterDesktop | PageFooterMobile, pageStyles: PageStyles, useOldLogoRenderSize?: boolean) => PageFooterViewModel;
|
|
13
|
-
export declare const mapToViewModel: (styles: PageStyles, brandPageType: BrandPageType, options
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
videoUrl: string;
|
|
18
|
-
previewImageUrl: string;
|
|
19
|
-
};
|
|
20
|
-
getS3VideoUrls?: (token: string) => {
|
|
21
|
-
videoUrl: string;
|
|
22
|
-
previewImageUrl: string;
|
|
23
|
-
};
|
|
24
|
-
setVideoUrlsWithToken?: (token: string, videoUrl: string, previewImageUrl: string, assetId: string) => void;
|
|
25
|
-
}
|
|
26
|
-
export declare const getBrandPageViewModelFromBrandPageModel: (model: BrandPageModel, brandPageToken: string | undefined, showBrandCrowdLogo: boolean | undefined, options: ViewModelMappingOptions) => BrandPageViewModel;
|
|
13
|
+
export declare const mapToViewModel: (styles: PageStyles, brandPageType: BrandPageType, options?: {
|
|
14
|
+
useOldLogoRenderSize: boolean;
|
|
15
|
+
}) => (content: Content) => ContentViewModel | undefined;
|
|
16
|
+
export declare const getBrandPageViewModelFromBrandPageModel: (model: BrandPageModel, brandPageToken: string | undefined, showBrandCrowdLogo?: boolean, useOldLogoRenderSize?: boolean) => BrandPageViewModel;
|
|
27
17
|
export declare const isLogoViewModel: (viewModel: ContentViewModel) => viewModel is LogoViewModel;
|
|
28
18
|
/** for service.brand-page website preview by logo draft token */
|
|
29
19
|
export declare const applyLogoImageToBrandPageViewModel: (viewModel: BrandPageViewModel, logoImage: LogoImageModel) => BrandPageViewModel;
|
|
@@ -39,4 +29,3 @@ export interface CriticalResourceURLs {
|
|
|
39
29
|
* For service.brand-page to preload critical resources
|
|
40
30
|
*/
|
|
41
31
|
export declare const getCriticalResourceURLs: (viewModel: BrandPageViewModel) => CriticalResourceURLs;
|
|
42
|
-
export {};
|
|
@@ -391,43 +391,7 @@ const mapToContactFormViewModel = (content, styles, brandPageType) => {
|
|
|
391
391
|
content.layoutStyle !== '',
|
|
392
392
|
}, styles);
|
|
393
393
|
};
|
|
394
|
-
const
|
|
395
|
-
if (!options.getVideoUrls?.(media.gettyToken)) {
|
|
396
|
-
const s3Urls = options.getS3VideoUrls?.(media.gettyToken);
|
|
397
|
-
if (s3Urls && s3Urls?.videoUrl) {
|
|
398
|
-
options.setVideoUrlsWithToken?.(media.gettyToken, s3Urls.videoUrl, s3Urls.previewImageUrl, media.gettyAssetId);
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
const videoUrls = options.getVideoUrls?.(media.gettyToken) || {
|
|
402
|
-
videoUrl: undefined,
|
|
403
|
-
previewImageUrl: undefined,
|
|
404
|
-
};
|
|
405
|
-
return {
|
|
406
|
-
type: 'getty-video',
|
|
407
|
-
gettyToken: media.gettyToken,
|
|
408
|
-
gettyAssetId: media.gettyAssetId,
|
|
409
|
-
mimeType: media.mimeType,
|
|
410
|
-
videoUrl: videoUrls.videoUrl,
|
|
411
|
-
previewImageUrl: videoUrls.previewImageUrl,
|
|
412
|
-
settings: {
|
|
413
|
-
autoPlay: media.settings?.autoPlay || false,
|
|
414
|
-
},
|
|
415
|
-
};
|
|
416
|
-
};
|
|
417
|
-
const mapMediaToContentViewModel = ({ media, options, }) => {
|
|
418
|
-
if (!media) {
|
|
419
|
-
return undefined;
|
|
420
|
-
}
|
|
421
|
-
switch (media.type) {
|
|
422
|
-
case 'getty-video':
|
|
423
|
-
return mapGettyVideoToGettyVideoViewModel(media, options);
|
|
424
|
-
case 'image':
|
|
425
|
-
// TODO(jyao): Implement later
|
|
426
|
-
default:
|
|
427
|
-
throw new Error(`Unsupported media type: ${media.type}`);
|
|
428
|
-
}
|
|
429
|
-
};
|
|
430
|
-
export const mapToBannerSectionViewModel = (content, styles, options) => {
|
|
394
|
+
export const mapToBannerSectionViewModel = (content, styles) => {
|
|
431
395
|
return applyViewModelTextStyles({
|
|
432
396
|
...content,
|
|
433
397
|
role: content.type,
|
|
@@ -446,10 +410,6 @@ export const mapToBannerSectionViewModel = (content, styles, options) => {
|
|
|
446
410
|
isFullWidth: true,
|
|
447
411
|
imageUrl: mapToBannerSectionImageUrl(content),
|
|
448
412
|
isBigImageType: isBigImageType(content.displayStyle),
|
|
449
|
-
mediaViewModel: mapMediaToContentViewModel({
|
|
450
|
-
media: content.media,
|
|
451
|
-
options,
|
|
452
|
-
}),
|
|
453
413
|
}, styles);
|
|
454
414
|
};
|
|
455
415
|
const mapToAboutSectionViewModel = (content, styles) => {
|
|
@@ -715,7 +675,7 @@ export const mapToViewModel = (styles, brandPageType, options) => (content) => {
|
|
|
715
675
|
case 'contact-form':
|
|
716
676
|
return mapToContactFormViewModel(content, styles, brandPageType);
|
|
717
677
|
case 'banner-section':
|
|
718
|
-
return mapToBannerSectionViewModel(content, styles
|
|
678
|
+
return mapToBannerSectionViewModel(content, styles);
|
|
719
679
|
case 'booking-section':
|
|
720
680
|
return mapToBookingSectionViewModel(content, styles);
|
|
721
681
|
case 'about-section':
|
|
@@ -749,10 +709,10 @@ export const mapToViewModel = (styles, brandPageType, options) => (content) => {
|
|
|
749
709
|
assertUnreachable();
|
|
750
710
|
}
|
|
751
711
|
};
|
|
752
|
-
export const getBrandPageViewModelFromBrandPageModel = (model, brandPageToken, showBrandCrowdLogo = true,
|
|
712
|
+
export const getBrandPageViewModelFromBrandPageModel = (model, brandPageToken, showBrandCrowdLogo = true, useOldLogoRenderSize = false) => {
|
|
753
713
|
const pages = model.pages.map((p) => {
|
|
754
714
|
const contents = p.contents
|
|
755
|
-
.map(mapToViewModel(model.styles, model.brandPageType || BRAND_PAGE_TYPES.default,
|
|
715
|
+
.map(mapToViewModel(model.styles, model.brandPageType || BRAND_PAGE_TYPES.default, { useOldLogoRenderSize }))
|
|
756
716
|
.filter((c) => c !== undefined);
|
|
757
717
|
return {
|
|
758
718
|
title: p.title,
|
|
@@ -766,10 +726,10 @@ export const getBrandPageViewModelFromBrandPageModel = (model, brandPageToken, s
|
|
|
766
726
|
pages,
|
|
767
727
|
showBrandCrowdLogo,
|
|
768
728
|
styles: model.styles,
|
|
769
|
-
headerViewModelDesktop: mapToPageHeaderViewModel(model.pageHeaderDesktop, model.styles, pages,
|
|
770
|
-
headerViewModelMobile: mapToPageHeaderViewModel(model.pageHeaderMobile, model.styles, pages,
|
|
771
|
-
footerViewModelDesktop: mapToPageFooterViewModel(model.pageFooterDesktop, model.styles,
|
|
772
|
-
footerViewModelMobile: mapToPageFooterViewModel(model.pageFooterMobile, model.styles,
|
|
729
|
+
headerViewModelDesktop: mapToPageHeaderViewModel(model.pageHeaderDesktop, model.styles, pages, useOldLogoRenderSize),
|
|
730
|
+
headerViewModelMobile: mapToPageHeaderViewModel(model.pageHeaderMobile, model.styles, pages, useOldLogoRenderSize),
|
|
731
|
+
footerViewModelDesktop: mapToPageFooterViewModel(model.pageFooterDesktop, model.styles, useOldLogoRenderSize),
|
|
732
|
+
footerViewModelMobile: mapToPageFooterViewModel(model.pageFooterMobile, model.styles, useOldLogoRenderSize),
|
|
773
733
|
brandPageType: model.brandPageType || BRAND_PAGE_TYPES.default,
|
|
774
734
|
faviconUrl: model.faviconUrl,
|
|
775
735
|
ogImageUrl: model.ogImageUrl,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PageStyles, ButtonWithModalContent, ProfileContent, TextContent, VideoContent, ImageContent, ContentType, ButtonStyles, LogoStyles, MapContent, ImageGalleryContent, GalleryStyles, MailingListContent, RequestPaymentContent, ShopContent, SupportMeContent, ContactFormContent, BannerSectionContent, BrandPageType, SocialLinksContent, TestimonialSectionContent, AboutSectionContent, DividerSectionContent, ShapesSectionContent, ButtonLinkType, PageHeaderMobile, PageHeaderDesktop, PageFooterMobile, PageFooterDesktop, TextMediaItem, TextShapeItem, TextStyleDeclaration, AspectRatio, LogoImageModel, LogoTemplateImageModel, CookieOptions, BookingSectionContent
|
|
1
|
+
import type { PageStyles, ButtonWithModalContent, ProfileContent, TextContent, VideoContent, ImageContent, ContentType, ButtonStyles, LogoStyles, MapContent, ImageGalleryContent, GalleryStyles, MailingListContent, RequestPaymentContent, ShopContent, SupportMeContent, ContactFormContent, BannerSectionContent, BrandPageType, SocialLinksContent, TestimonialSectionContent, AboutSectionContent, DividerSectionContent, ShapesSectionContent, ButtonLinkType, PageHeaderMobile, PageHeaderDesktop, PageFooterMobile, PageFooterDesktop, TextMediaItem, TextShapeItem, TextStyleDeclaration, AspectRatio, LogoImageModel, LogoTemplateImageModel, CookieOptions, BookingSectionContent } from './models';
|
|
2
2
|
import type { ImagesSectionContentDisplayStyle } from './constants';
|
|
3
3
|
export type ViewModelType = 'button' | 'image' | 'image-gallery' | 'logo' | 'map' | 'mailing-list' | 'profile' | 'support-me' | 'request-payment' | 'text' | 'video' | 'contact-form' | 'banner-section' | 'images-section' | 'about-section' | 'divider-section' | 'testimonial-section' | 'social-links' | 'shapes-section' | 'shop-section' | 'booking-section';
|
|
4
4
|
export interface ContentViewModel {
|
|
@@ -70,24 +70,6 @@ export interface BannerSectionViewModel extends ContentViewModel, Omit<BannerSec
|
|
|
70
70
|
buttonViewModel: ButtonViewModel;
|
|
71
71
|
isFullWidth: boolean;
|
|
72
72
|
isBigImageType: boolean;
|
|
73
|
-
mediaViewModel?: MediaViewModel;
|
|
74
|
-
}
|
|
75
|
-
export interface MediaViewModel {
|
|
76
|
-
type: MediaTypes;
|
|
77
|
-
}
|
|
78
|
-
export interface GettyVideoViewModel extends MediaViewModel {
|
|
79
|
-
type: 'getty-video';
|
|
80
|
-
gettyToken: string;
|
|
81
|
-
gettyAssetId: string;
|
|
82
|
-
mimeType: string;
|
|
83
|
-
videoUrl: string | undefined;
|
|
84
|
-
previewImageUrl: string | undefined;
|
|
85
|
-
settings: {
|
|
86
|
-
autoPlay: boolean;
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
export interface ImageMediaViewModel extends MediaViewModel {
|
|
90
|
-
type: 'image';
|
|
91
73
|
}
|
|
92
74
|
export interface TextImageSectionViewModel {
|
|
93
75
|
id: string;
|
|
@@ -23,7 +23,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
23
23
|
brandPageTemplate(): any;
|
|
24
24
|
brandPageTitle(): string;
|
|
25
25
|
brandPageViewModel(): import("../../../brand-page").BrandPageViewModel;
|
|
26
|
-
gettyVideoIds(): string[];
|
|
27
26
|
isInteractivePreviewEnabled(): boolean;
|
|
28
27
|
isProduction(): boolean;
|
|
29
28
|
isPublishButtonEnabled(): boolean;
|
|
@@ -66,7 +66,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
66
66
|
brandPageTemplate(): any;
|
|
67
67
|
brandPageTitle(): string;
|
|
68
68
|
brandPageViewModel(): import("../../../brand-page").BrandPageViewModel;
|
|
69
|
-
gettyVideoIds(): string[];
|
|
70
69
|
isInteractivePreviewEnabled(): boolean;
|
|
71
70
|
isProduction(): boolean;
|
|
72
71
|
isPublishButtonEnabled(): boolean;
|
|
@@ -753,7 +752,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
753
752
|
colorReplacements?: import("../../../brand-page").ColorReplacement[] | undefined;
|
|
754
753
|
aspectRatio?: number | null | undefined;
|
|
755
754
|
}): void;
|
|
756
|
-
_setSelectedItemMedia(selectedItemId: string | null, mediaPayload: import("../../../shared/my-uploads/models").MediaBaseSelectedPayload): void;
|
|
757
755
|
_setItems({ items }: {
|
|
758
756
|
items: import("../../../shared/content-settings/models").ContentItem<any>[];
|
|
759
757
|
}): void;
|
|
@@ -829,7 +827,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
829
827
|
colorReplacements?: import("../../../brand-page").ColorReplacement[] | undefined;
|
|
830
828
|
aspectRatio?: number | null | undefined;
|
|
831
829
|
}): void;
|
|
832
|
-
setSelectedItemMedia(selectedItemId: string | null, mediaPayload: import("../../../shared/my-uploads/models").MediaBaseSelectedPayload): void;
|
|
833
830
|
setItems(payload: {
|
|
834
831
|
items: import("../../../shared/content-settings/models").ContentItem<import("../../../brand-page").Content>[];
|
|
835
832
|
}): void;
|
|
@@ -174,7 +174,6 @@ const InitialiseMakerStores = (options) => {
|
|
|
174
174
|
triggerSaveSuccessMessage: false,
|
|
175
175
|
abTests: {},
|
|
176
176
|
isSubsequentPublish: false,
|
|
177
|
-
gettyVideos: [],
|
|
178
177
|
});
|
|
179
178
|
userStore.setIsAdmin({ isAdmin: options.isAdmin || false });
|
|
180
179
|
userStore.setHasBrandPagePremiumSubscription(false);
|
|
@@ -13,7 +13,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
13
13
|
brandPageTemplate(): any;
|
|
14
14
|
brandPageTitle(): string;
|
|
15
15
|
brandPageViewModel(): import("../../../lib").BrandPageViewModel;
|
|
16
|
-
gettyVideoIds(): string[];
|
|
17
16
|
isInteractivePreviewEnabled(): boolean;
|
|
18
17
|
isProduction(): boolean;
|
|
19
18
|
isPublishButtonEnabled(): boolean;
|
package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts
CHANGED
|
@@ -408,7 +408,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
408
408
|
colorReplacements?: import("../../../brand-page").ColorReplacement[] | undefined;
|
|
409
409
|
aspectRatio?: number | null | undefined;
|
|
410
410
|
}): void;
|
|
411
|
-
_setSelectedItemMedia(selectedItemId: string | null, mediaPayload: import("../../../shared/my-uploads/models").MediaBaseSelectedPayload): void;
|
|
412
411
|
_setItems({ items }: {
|
|
413
412
|
items: ContentItem<any>[];
|
|
414
413
|
}): void;
|
|
@@ -484,7 +483,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
484
483
|
colorReplacements?: import("../../../brand-page").ColorReplacement[] | undefined;
|
|
485
484
|
aspectRatio?: number | null | undefined;
|
|
486
485
|
}): void;
|
|
487
|
-
setSelectedItemMedia(selectedItemId: string | null, mediaPayload: import("../../../shared/my-uploads/models").MediaBaseSelectedPayload): void;
|
|
488
486
|
setItems(payload: {
|
|
489
487
|
items: ContentItem<Content>[];
|
|
490
488
|
}): void;
|
|
@@ -520,7 +518,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
520
518
|
brandPageTemplate(): any;
|
|
521
519
|
brandPageTitle(): string;
|
|
522
520
|
brandPageViewModel(): import("../../../brand-page").BrandPageViewModel;
|
|
523
|
-
gettyVideoIds(): string[];
|
|
524
521
|
isInteractivePreviewEnabled(): boolean;
|
|
525
522
|
isProduction(): boolean;
|
|
526
523
|
isPublishButtonEnabled(): boolean;
|
|
@@ -20,7 +20,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
20
20
|
brandPageTemplate(): any;
|
|
21
21
|
brandPageTitle(): string;
|
|
22
22
|
brandPageViewModel(): import("../../../brand-page").BrandPageViewModel;
|
|
23
|
-
gettyVideoIds(): string[];
|
|
24
23
|
isInteractivePreviewEnabled(): boolean;
|
|
25
24
|
isProduction(): boolean;
|
|
26
25
|
isPublishButtonEnabled(): boolean;
|
|
@@ -15,7 +15,7 @@ const pages = [
|
|
|
15
15
|
slug: '',
|
|
16
16
|
isHidden: false,
|
|
17
17
|
contents: brandPageData
|
|
18
|
-
.contents.map(mapToViewModel(pageStyles, brandPageData.brandPageType || BRAND_PAGE_TYPES.default
|
|
18
|
+
.contents.map(mapToViewModel(pageStyles, brandPageData.brandPageType || BRAND_PAGE_TYPES.default))
|
|
19
19
|
.filter((x) => x !== undefined),
|
|
20
20
|
},
|
|
21
21
|
];
|
|
@@ -257,7 +257,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
257
257
|
brandPageTemplate(): any;
|
|
258
258
|
brandPageTitle(): string;
|
|
259
259
|
brandPageViewModel(): import("../../../brand-page").BrandPageViewModel;
|
|
260
|
-
gettyVideoIds(): string[];
|
|
261
260
|
isInteractivePreviewEnabled(): boolean;
|
|
262
261
|
isProduction(): boolean;
|
|
263
262
|
isPublishButtonEnabled(): boolean;
|
|
@@ -256,7 +256,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
256
256
|
brandPageTemplate(): any;
|
|
257
257
|
brandPageTitle(): string;
|
|
258
258
|
brandPageViewModel(): import("../../../brand-page").BrandPageViewModel;
|
|
259
|
-
gettyVideoIds(): string[];
|
|
260
259
|
isInteractivePreviewEnabled(): boolean;
|
|
261
260
|
isProduction(): boolean;
|
|
262
261
|
isPublishButtonEnabled(): boolean;
|
|
@@ -30,7 +30,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
30
30
|
brandPageTemplate(): any;
|
|
31
31
|
brandPageTitle(): string;
|
|
32
32
|
brandPageViewModel(): import("../../../brand-page").BrandPageViewModel;
|
|
33
|
-
gettyVideoIds(): string[];
|
|
34
33
|
isInteractivePreviewEnabled(): boolean;
|
|
35
34
|
isProduction(): boolean;
|
|
36
35
|
isPublishButtonEnabled(): boolean;
|
|
@@ -72,7 +72,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
72
72
|
brandPageTemplate(): any;
|
|
73
73
|
brandPageTitle(): string;
|
|
74
74
|
brandPageViewModel(): BrandPageViewModel;
|
|
75
|
-
gettyVideoIds(): string[];
|
|
76
75
|
isInteractivePreviewEnabled(): boolean;
|
|
77
76
|
isProduction(): boolean;
|
|
78
77
|
isPublishButtonEnabled(): boolean;
|
|
@@ -6,7 +6,6 @@ import debounce from 'lodash.debounce';
|
|
|
6
6
|
import { MOBILE_HEIGHT, MOBILE_WIDTH } from '../../constants';
|
|
7
7
|
import { useBrandPageMakerStore } from '../../stores';
|
|
8
8
|
import { applyLogoImageBase64UrlToBrandPageTemplateModel, applyLogoImageToBrandPageTemplateModel, applyLogoTemplateImageToBrandPageTemplateModel, } from '../../../brand-page/utils/logo.util';
|
|
9
|
-
import { useVideoStore } from '../../../lib';
|
|
10
9
|
const DEBOUNCE_IN_MS = 250;
|
|
11
10
|
export default defineComponent({
|
|
12
11
|
emits: ['template-selected'],
|
|
@@ -101,7 +100,6 @@ export default defineComponent({
|
|
|
101
100
|
options: {
|
|
102
101
|
disableNavigationSideMenu: true,
|
|
103
102
|
mediaSizes: MEDIA_SIZES.sizeThumb,
|
|
104
|
-
renderVideoAsImage: true,
|
|
105
103
|
},
|
|
106
104
|
isCapturingPreview: false,
|
|
107
105
|
};
|
|
@@ -198,7 +196,6 @@ export default defineComponent({
|
|
|
198
196
|
this.rootStyles = styles;
|
|
199
197
|
},
|
|
200
198
|
async updateViewModel(forceUpdate = true) {
|
|
201
|
-
const videoStore = useVideoStore();
|
|
202
199
|
let model = this.template.brandPageModel;
|
|
203
200
|
if (this.logoImageBase64Url) {
|
|
204
201
|
model = applyLogoImageBase64UrlToBrandPageTemplateModel(model, this.logoImageBase64Url);
|
|
@@ -214,10 +211,7 @@ export default defineComponent({
|
|
|
214
211
|
model = result.model;
|
|
215
212
|
}
|
|
216
213
|
model = applyLogoThemeToBrandPageModel(this.logoTheme, model).model;
|
|
217
|
-
this.viewModel = await getBrandPageViewModelFromBrandPageModel(model, undefined, false
|
|
218
|
-
useOldLogoRenderSize: false,
|
|
219
|
-
getVideoUrls: videoStore.getS3VideoUrlsForToken,
|
|
220
|
-
});
|
|
214
|
+
this.viewModel = await getBrandPageViewModelFromBrandPageModel(model, undefined, false);
|
|
221
215
|
if (forceUpdate) {
|
|
222
216
|
this.$forceUpdate();
|
|
223
217
|
}
|