@designcrowd/library.brand-page 5.15.6-getty-12 → 5.15.6

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.
Files changed (114) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-1qCtUO9E.js → CreatedOnBrandCrowd-de-de-58ejlewn.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-BWvP1nzf.js → CreatedOnBrandCrowd-en-us-DY3bPXtI.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-BnHQc2mf.js → CreatedOnBrandCrowd-es-es-C6PKONMO.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-1-KYGGHp.js → CreatedOnBrandCrowd-fr-ca-3TnrVeqQ.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-1-KYGGHp.js → CreatedOnBrandCrowd-fr-fr-3TnrVeqQ.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-l2Aizjkv.js → CreatedOnBrandCrowd-pt-br-CmdhjNhY.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-l2Aizjkv.js → CreatedOnBrandCrowd-pt-pt-CmdhjNhY.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-B5PvvHyd.js → CreatedOnDcom-de-de-aEFpuUMs.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-BkVkOoal.js → CreatedOnDcom-en-us-CgdLgAE-.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-Bq8X4bkP.js → CreatedOnDcom-es-es-BWhFpoSM.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-DtBSgVgC.js → CreatedOnDcom-fr-ca-Bo7o80t4.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-Dk54puyi.js → CreatedOnDcom-fr-fr-BvGigv3L.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-Bgde7r_t.js → CreatedOnDcom-pt-br-RBDZ7UHy.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-Dk9i1wTW.js → CreatedOnDcom-pt-pt-Bug8rNRV.js} +1 -1
  15. package/lib/src/brand-page/components/media/Media.mixin.d.ts +0 -12
  16. package/lib/src/brand-page/components/media/Media.mixin.js +0 -5
  17. package/lib/src/brand-page/components/page/Page.stories.js +1 -1
  18. package/lib/src/brand-page/components/payment/__fixtures__/request-payment.d.ts +0 -1
  19. package/lib/src/brand-page/components/payment/__fixtures__/support-me.d.ts +0 -1
  20. package/lib/src/brand-page/models/brand-page-context.model.d.ts +0 -1
  21. package/lib/src/brand-page/models/index.d.ts +0 -16
  22. package/lib/src/brand-page/models/index.js +0 -19
  23. package/lib/src/brand-page/utils/view-model.util.d.ts +5 -11
  24. package/lib/src/brand-page/utils/view-model.util.js +8 -42
  25. package/lib/src/brand-page/view-models.d.ts +1 -19
  26. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +0 -2
  27. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.js +0 -1
  28. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +0 -2
  29. package/lib/src/brand-page-maker/components/preview/Preview.mixin.js +0 -1
  30. package/lib/src/brand-page-maker/components/preview/Preview.stories.js +1 -1
  31. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.js +1 -7
  32. package/lib/src/brand-page-maker/constants/config-settings-constant.js +11 -28
  33. package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +0 -13
  34. package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.js +3 -16
  35. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +3 -14
  36. package/lib/src/brand-page-maker/stores/index.d.ts +0 -1
  37. package/lib/src/brand-page-maker/stores/index.js +0 -1
  38. package/lib/src/{bundled-translations-Cmyak1c7.js → bundled-translations-Gwpp-xB6.js} +1 -1
  39. package/lib/src/bundles/bundled-translations.json +0 -4
  40. package/lib/src/clients/gettyimages-client.js +1 -1
  41. package/lib/src/css/library.brand-page-brandCrowd.min.css +20 -20
  42. package/lib/src/css/library.brand-page-brandPage.min.css +20 -20
  43. package/lib/src/css/library.brand-page-designCom.min.css +20 -20
  44. package/lib/src/css/library.brand-page-preview.min.css +20 -20
  45. package/lib/src/helpers/ts.helper.d.ts +0 -1
  46. package/lib/src/helpers/ts.helper.js +0 -22
  47. package/lib/src/index.d.ts +1 -1
  48. package/lib/src/index.mjs +180 -183
  49. package/lib/src/{lib-B7IHSim2.js → lib-C5OPdyX-.js} +13262 -13533
  50. package/lib/src/lib.js +1 -1
  51. package/lib/src/shared/content-settings/components/GenericTextInput.mixin.d.ts +1 -1
  52. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +0 -2
  53. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +1 -4
  54. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.js +0 -4
  55. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +0 -2
  56. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.js +0 -1
  57. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +0 -2
  58. package/lib/src/shared/content-settings/components/email-field/EmailField.mixin.d.ts +1 -1
  59. package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +0 -2
  60. package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.js +0 -1
  61. package/lib/src/shared/content-settings/components/image-field/ImageField.mixin.d.ts +1 -23
  62. package/lib/src/shared/content-settings/components/image-field/ImageField.mixin.js +1 -25
  63. package/lib/src/shared/content-settings/components/tel-field/TelField.mixin.d.ts +1 -1
  64. package/lib/src/shared/content-settings/components/text-field/TextField.mixin.d.ts +1 -1
  65. package/lib/src/shared/content-settings/components/textarea-field/TextareaField.mixin.d.ts +1 -1
  66. package/lib/src/shared/content-settings/components/url-field/UrlField.mixin.d.ts +1 -1
  67. package/lib/src/shared/content-settings/components/youtube-video-field/YoutubeVideoField.mixin.d.ts +1 -1
  68. package/lib/src/shared/content-settings/models.d.ts +0 -2
  69. package/lib/src/shared/content-settings/store/content-settings-store.d.ts +0 -3
  70. package/lib/src/shared/content-settings/store/content-settings-store.js +1 -37
  71. package/lib/src/shared/my-uploads/models.d.ts +0 -12
  72. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +0 -2
  73. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +0 -2
  74. package/package.json +1 -1
  75. package/src/brand-page/components/banner-section/BannerSection.vue +1 -6
  76. package/src/brand-page/components/media/Media.mixin.ts +0 -6
  77. package/src/brand-page/components/media/Media.vue +3 -18
  78. package/src/brand-page/components/page/Page.stories.ts +0 -1
  79. package/src/brand-page/models/brand-page-context.model.ts +0 -1
  80. package/src/brand-page/models/index.ts +0 -34
  81. package/src/brand-page/utils/view-model.util.test.ts +2 -10
  82. package/src/brand-page/utils/view-model.util.ts +7 -70
  83. package/src/brand-page/view-models.ts +0 -24
  84. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.ts +0 -1
  85. package/src/brand-page-maker/components/preview/Preview.mixin.ts +0 -1
  86. package/src/brand-page-maker/components/preview/Preview.stories.ts +0 -1
  87. package/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.ts +0 -8
  88. package/src/brand-page-maker/constants/config-settings-constant.ts +10 -30
  89. package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.ts +1 -40
  90. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +0 -15
  91. package/src/brand-page-maker/stores/index.ts +0 -1
  92. package/src/bundles/bundled-translations.json +0 -4
  93. package/src/clients/gettyimages-client.js +1 -1
  94. package/src/helpers/ts.helper.ts +0 -30
  95. package/src/lib.ts +0 -1
  96. package/src/shared/common/i18n/common.json +0 -2
  97. package/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.ts +1 -12
  98. package/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.vue +0 -1
  99. package/src/shared/content-settings/components/content-settings/i18n/content-settings.json +0 -4
  100. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.ts +0 -1
  101. package/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.ts +0 -1
  102. package/src/shared/content-settings/components/image-field/ImageField.mixin.ts +1 -31
  103. package/src/shared/content-settings/components/replace-image-base-settings/ReplaceImageBaseSettings.vue +2 -10
  104. package/src/shared/content-settings/models.ts +0 -3
  105. package/src/shared/content-settings/store/content-settings-store.ts +0 -68
  106. package/src/shared/my-uploads/models.ts +0 -16
  107. package/src/shared/video-library/VideoLibrary.vue +7 -13
  108. package/lib/src/brand-page-maker/stores/video/index.d.ts +0 -1
  109. package/lib/src/brand-page-maker/stores/video/index.js +0 -1
  110. package/lib/src/brand-page-maker/stores/video/video-store.d.ts +0 -28
  111. package/lib/src/brand-page-maker/stores/video/video-store.js +0 -31
  112. package/src/brand-page/components/media/Video.vue +0 -62
  113. package/src/brand-page-maker/stores/video/index.ts +0 -1
  114. package/src/brand-page-maker/stores/video/video-store.ts +0 -51
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-B7IHSim2.js";
2
+ import { _ as t } from "./lib-C5OPdyX-.js";
3
3
  const i = {}, h = {
4
4
  width: "275",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-B7IHSim2.js";
2
+ import { _ as t } from "./lib-C5OPdyX-.js";
3
3
  const i = {}, h = {
4
4
  width: "251",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-B7IHSim2.js";
2
+ import { _ as t } from "./lib-C5OPdyX-.js";
3
3
  const i = {}, h = {
4
4
  width: "250",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-B7IHSim2.js";
2
+ import { _ as t } from "./lib-C5OPdyX-.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-B7IHSim2.js";
2
+ import { _ as t } from "./lib-C5OPdyX-.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-B7IHSim2.js";
2
+ import { _ as t } from "./lib-C5OPdyX-.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-B7IHSim2.js";
2
+ import { _ as t } from "./lib-C5OPdyX-.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-B7IHSim2.js";
2
+ import { _ as e } from "./lib-C5OPdyX-.js";
3
3
  const M = {}, Z = {
4
4
  width: "242",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-B7IHSim2.js";
2
+ import { _ as e } from "./lib-C5OPdyX-.js";
3
3
  const i = {}, M = {
4
4
  width: "231",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-B7IHSim2.js";
2
+ import { _ as e } from "./lib-C5OPdyX-.js";
3
3
  const M = {}, Z = {
4
4
  width: "230",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-B7IHSim2.js";
2
+ import { _ as e } from "./lib-C5OPdyX-.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-B7IHSim2.js";
2
+ import { _ as e } from "./lib-C5OPdyX-.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-B7IHSim2.js";
2
+ import { _ as M } from "./lib-C5OPdyX-.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-B7IHSim2.js";
2
+ import { _ as M } from "./lib-C5OPdyX-.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -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;
@@ -59,11 +59,6 @@ export default defineComponent({
59
59
  required: false,
60
60
  default: undefined,
61
61
  },
62
- media: {
63
- type: Object,
64
- required: false,
65
- default: undefined,
66
- },
67
62
  },
68
63
  data() {
69
64
  return {
@@ -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;
@@ -69,7 +69,6 @@ export interface BrandPageContext {
69
69
  options?: {
70
70
  disableNavigationSideMenu?: boolean;
71
71
  mediaSizes?: MediaSizes;
72
- renderVideoAsImage?: boolean;
73
72
  };
74
73
  abTests?: AbTest;
75
74
  /** Is brand page rendered for preview */
@@ -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,20 +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, options: ViewModelMappingOptions) => BannerSectionViewModel;
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: ViewModelMappingOptions) => (content: Content) => ContentViewModel | undefined;
14
- interface ViewModelMappingOptions {
15
- useOldLogoRenderSize?: boolean;
16
- getVideoUrls?: (token: string) => {
17
- videoUrl: string;
18
- previewImageUrl: string;
19
- };
20
- }
21
- 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;
22
17
  export declare const isLogoViewModel: (viewModel: ContentViewModel) => viewModel is LogoViewModel;
23
18
  /** for service.brand-page website preview by logo draft token */
24
19
  export declare const applyLogoImageToBrandPageViewModel: (viewModel: BrandPageViewModel, logoImage: LogoImageModel) => BrandPageViewModel;
@@ -34,4 +29,3 @@ export interface CriticalResourceURLs {
34
29
  * For service.brand-page to preload critical resources
35
30
  */
36
31
  export declare const getCriticalResourceURLs: (viewModel: BrandPageViewModel) => CriticalResourceURLs;
37
- export {};
@@ -391,37 +391,7 @@ const mapToContactFormViewModel = (content, styles, brandPageType) => {
391
391
  content.layoutStyle !== '',
392
392
  }, styles);
393
393
  };
394
- const mapGettyVideoToGettyVideoViewModel = (media, options) => {
395
- const videoUrls = options.getVideoUrls?.(media.gettyToken) || {
396
- videoUrl: undefined,
397
- previewImageUrl: undefined,
398
- };
399
- return {
400
- type: 'getty-video',
401
- gettyToken: media.gettyToken,
402
- gettyAssetId: media.gettyAssetId,
403
- mimeType: media.mimeType,
404
- videoUrl: videoUrls.videoUrl,
405
- previewImageUrl: videoUrls.previewImageUrl,
406
- settings: {
407
- autoPlay: media.settings?.autoPlay || false,
408
- },
409
- };
410
- };
411
- const mapMediaToContentViewModel = ({ media, options, }) => {
412
- if (!media) {
413
- return undefined;
414
- }
415
- switch (media.type) {
416
- case 'getty-video':
417
- return mapGettyVideoToGettyVideoViewModel(media, options);
418
- case 'image':
419
- // TODO(jyao): Implement later
420
- default:
421
- throw new Error(`Unsupported media type: ${media.type}`);
422
- }
423
- };
424
- export const mapToBannerSectionViewModel = (content, styles, options) => {
394
+ export const mapToBannerSectionViewModel = (content, styles) => {
425
395
  return applyViewModelTextStyles({
426
396
  ...content,
427
397
  role: content.type,
@@ -440,10 +410,6 @@ export const mapToBannerSectionViewModel = (content, styles, options) => {
440
410
  isFullWidth: true,
441
411
  imageUrl: mapToBannerSectionImageUrl(content),
442
412
  isBigImageType: isBigImageType(content.displayStyle),
443
- mediaViewModel: mapMediaToContentViewModel({
444
- media: content.media,
445
- options,
446
- }),
447
413
  }, styles);
448
414
  };
449
415
  const mapToAboutSectionViewModel = (content, styles) => {
@@ -709,7 +675,7 @@ export const mapToViewModel = (styles, brandPageType, options) => (content) => {
709
675
  case 'contact-form':
710
676
  return mapToContactFormViewModel(content, styles, brandPageType);
711
677
  case 'banner-section':
712
- return mapToBannerSectionViewModel(content, styles, options);
678
+ return mapToBannerSectionViewModel(content, styles);
713
679
  case 'booking-section':
714
680
  return mapToBookingSectionViewModel(content, styles);
715
681
  case 'about-section':
@@ -743,10 +709,10 @@ export const mapToViewModel = (styles, brandPageType, options) => (content) => {
743
709
  assertUnreachable();
744
710
  }
745
711
  };
746
- export const getBrandPageViewModelFromBrandPageModel = (model, brandPageToken, showBrandCrowdLogo = true, options) => {
712
+ export const getBrandPageViewModelFromBrandPageModel = (model, brandPageToken, showBrandCrowdLogo = true, useOldLogoRenderSize = false) => {
747
713
  const pages = model.pages.map((p) => {
748
714
  const contents = p.contents
749
- .map(mapToViewModel(model.styles, model.brandPageType || BRAND_PAGE_TYPES.default, options))
715
+ .map(mapToViewModel(model.styles, model.brandPageType || BRAND_PAGE_TYPES.default, { useOldLogoRenderSize }))
750
716
  .filter((c) => c !== undefined);
751
717
  return {
752
718
  title: p.title,
@@ -760,10 +726,10 @@ export const getBrandPageViewModelFromBrandPageModel = (model, brandPageToken, s
760
726
  pages,
761
727
  showBrandCrowdLogo,
762
728
  styles: model.styles,
763
- headerViewModelDesktop: mapToPageHeaderViewModel(model.pageHeaderDesktop, model.styles, pages, options.useOldLogoRenderSize),
764
- headerViewModelMobile: mapToPageHeaderViewModel(model.pageHeaderMobile, model.styles, pages, options.useOldLogoRenderSize),
765
- footerViewModelDesktop: mapToPageFooterViewModel(model.pageFooterDesktop, model.styles, options.useOldLogoRenderSize),
766
- footerViewModelMobile: mapToPageFooterViewModel(model.pageFooterMobile, model.styles, options.useOldLogoRenderSize),
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),
767
733
  brandPageType: model.brandPageType || BRAND_PAGE_TYPES.default,
768
734
  faviconUrl: model.faviconUrl,
769
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, MediaTypes } from './models';
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;
@@ -746,7 +746,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
746
746
  colorReplacements?: import("../../../brand-page").ColorReplacement[] | undefined;
747
747
  aspectRatio?: number | null | undefined;
748
748
  }): void;
749
- _setSelectedItemMedia(selectedItemId: string | null, mediaPayload: import("../../../shared/my-uploads/models").MediaBaseSelectedPayload): void;
750
749
  _setItems({ items }: {
751
750
  items: import("../../../shared/content-settings/models").ContentItem<any>[];
752
751
  }): void;
@@ -822,7 +821,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
822
821
  colorReplacements?: import("../../../brand-page").ColorReplacement[] | undefined;
823
822
  aspectRatio?: number | null | undefined;
824
823
  }): void;
825
- setSelectedItemMedia(selectedItemId: string | null, mediaPayload: import("../../../shared/my-uploads/models").MediaBaseSelectedPayload): void;
826
824
  setItems(payload: {
827
825
  items: import("../../../shared/content-settings/models").ContentItem<import("../../../brand-page").Content>[];
828
826
  }): void;
@@ -175,7 +175,6 @@ const InitialiseMakerStores = (options) => {
175
175
  triggerSaveSuccessMessage: false,
176
176
  abTests: {},
177
177
  isSubsequentPublish: false,
178
- gettyVideos: [],
179
178
  });
180
179
  userStore.setIsAdmin({ isAdmin: options.isAdmin || false });
181
180
  userStore.setHasBrandPagePremiumSubscription(false);
@@ -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;
@@ -77,7 +77,6 @@ export default defineComponent({
77
77
  isServerRender: false,
78
78
  options: {
79
79
  mediaSizes: MEDIA_SIZES.size1x,
80
- renderVideoAsImage: true,
81
80
  },
82
81
  stripePublishableKey: undefined,
83
82
  runtimeEnvironment: this.runtimeEnvironment,
@@ -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
  ];
@@ -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
  }
@@ -1,4 +1,4 @@
1
- import { SOCIAL_LINKS_ICON_DISPLAY_STYLES, BRAND_PAGE_TYPES, DIVIDER_STYLES, MEDIA_TYPES, BUTTON_LINK_TYPE, FONT_SIZE_BODY, LINE_HEIGHT_BODY, MIN_TEXT_SIZE_PX, MAX_TEXT_SIZE_PX, TEXT_COLUMNS, DEFAULT_SHAPE_SIZE, PAYMENT_OPTION_DISPLAY_TYPES, PAYMENT_OPTION_IMAGE_TYPES, GettyVideoMedia, } from '../../brand-page';
1
+ import { SOCIAL_LINKS_ICON_DISPLAY_STYLES, BRAND_PAGE_TYPES, DIVIDER_STYLES, MEDIA_TYPES, BUTTON_LINK_TYPE, FONT_SIZE_BODY, LINE_HEIGHT_BODY, MIN_TEXT_SIZE_PX, MAX_TEXT_SIZE_PX, TEXT_COLUMNS, DEFAULT_SHAPE_SIZE, PAYMENT_OPTION_DISPLAY_TYPES, PAYMENT_OPTION_IMAGE_TYPES, } from '../../brand-page';
2
2
  import { createInitialButtonContent, createInitialImageContent, createInitialProfileContent, createInitialTextContent, createInitialVideoContent, createInitialLogoContent, createInitialMapContent, createInitialImageGalleryContent, createInitialGeneralLinkContent, createInitialMailingListContent, createInitialRequestPaymentContent, createInitialSupportMeContent, createInitialContactFormContent, CONTENT_SETTINGS_DISPLAY_MODES, createInitialBannerSectionContent, createInitialSocialLinksContent, createInitialImagesSectionContent, createInitialTestimonialSectionContent, createInitialAboutSectionContent, createInitialDividerSectionContent, createInitialShapesSectionContent, VARIANT_DISPLAY_MODES, createInitialShopContent, createInitialBookingSectionContent, } from '../models';
3
3
  import { colorConvertor, backgroundColorConvertor, borderColorConvertor, displayStyleConvertor, galleryTypeConvertor, imageAspectRatioConvertor, textAlignmentOptionsConvertor, videoContentStateConvertor, fillColorConvertor, bannerAlignDisplayStyleConvertor, aboutDisplayStyleConvertor, dividerStyleConvertor, shapeSizeOptionsConvertor, buttonLinkStyleConvertor, textSizeValueConvertor, textColumnStyleConvertor, contactLayoutStyleConvertor, paymentLinkDisplayStyleConvertor, shopDisplayConvertor, shopAspectRatioConvertor, } from '../convertors';
4
4
  import { ALIGN_CENTERED, DISPLAY_STYLE_COLLAPSED, DISPLAY_STYLE_PREVIEW, } from '../../brand-page';
@@ -225,12 +225,11 @@ const shopReplaceImageSettings = () => ({
225
225
  desiredHeight: undefined,
226
226
  desiredWidth: undefined,
227
227
  });
228
- // TOOD(jyao): This should be reworked to bannerSectionReplaceMediaSettings
229
228
  const bannerSectionReplaceImageSettings = () => ({
230
229
  tabs: ['MY_UPLOADS', 'IMAGE_LIBRARY', 'VIDEO_LIBRARY', 'SHAPE_LIBRARY'],
231
- buttonTitleAdd: contentSettingsTr(`addMediaTitle`),
232
- titleAdd: contentSettingsTr(`addMediaTitle`),
233
- titleReplace: contentSettingsTr(`replaceMediaTitle`),
230
+ buttonTitleAdd: contentSettingsTr(`addImageButtonTitle`),
231
+ titleAdd: contentSettingsTr(`addImageHeaderTitle`),
232
+ titleReplace: contentSettingsTr(`imageReplaceTitle`),
234
233
  contentMediaFieldName: MediaFieldNames.avatarImageUrl,
235
234
  openByDefault: false,
236
235
  mediaType: MEDIA_TYPES.image,
@@ -239,28 +238,12 @@ const bannerSectionReplaceImageSettings = () => ({
239
238
  desiredHeight: undefined,
240
239
  desiredWidth: undefined,
241
240
  setContentMedia: (content, value) => {
242
- if (value.media && value.media.type === 'getty-video') {
243
- const gettyMedia = value.media;
244
- content.media = new GettyVideoMedia({
245
- gettyToken: gettyMedia.token,
246
- gettyAssetId: gettyMedia.assetId,
247
- mimeType: gettyMedia.mimeType,
248
- settings: {
249
- autoPlay: gettyMedia.autoPlay,
250
- },
251
- });
252
- content.imageUrl = '';
253
- }
254
- else {
255
- content.imageUrl = value.imageUrl;
256
- content.mediaType = MEDIA_TYPES.image;
257
- // Note(jyao): Temporarily here until we move all images/shapes to media
258
- content.media = undefined;
259
- if (isValidSvgUrl(content.imageUrl)) {
260
- content.size = DEFAULT_SHAPE_SIZE;
261
- content.mediaType = MEDIA_TYPES.shape;
262
- content.colorReplacements = value.colorReplacements || [];
263
- }
241
+ content.imageUrl = value.imageUrl;
242
+ content.mediaType = MEDIA_TYPES.image;
243
+ if (isValidSvgUrl(content.imageUrl)) {
244
+ content.size = DEFAULT_SHAPE_SIZE;
245
+ content.mediaType = MEDIA_TYPES.shape;
246
+ content.colorReplacements = value.colorReplacements || [];
264
247
  }
265
248
  },
266
249
  });
@@ -1853,7 +1836,7 @@ export const BANNER_SECTION_SETTINGS_CONFIG = () => ({
1853
1836
  imageUrl: {
1854
1837
  type: 'image',
1855
1838
  replaceImageSettings: bannerSectionReplaceImageSettings(),
1856
- title: contentSettingsTr(`media`),
1839
+ title: contentSettingsTr(`imageTitle`),
1857
1840
  groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.settings,
1858
1841
  },
1859
1842
  imageUrlOverride: {
@@ -48,24 +48,12 @@ export interface BrandPageContainerState {
48
48
  abTests: Record<string, string>;
49
49
  isSubsequentPublish: boolean;
50
50
  }
51
- type GettyVideoAdminEditorViewModelResponse = {
52
- assetId: string;
53
- token: string;
54
- isGettyAsset: string;
55
- videoPreviewAsset: {
56
- uri: string;
57
- };
58
- imagePreviewAsset: {
59
- uri: string;
60
- };
61
- };
62
51
  export type InitialisePayload = Omit<BrandPageContainerState, 'customDomain' | 'customDomainConfig'> & {
63
52
  logoDraftToken?: string;
64
53
  brandPageCustomDomain?: CustomDomainModel;
65
54
  isBrandPageCustomDomainEnabled: boolean;
66
55
  logoTemplateAsset: LogoTemplateAsset | undefined;
67
56
  logoDraftAssets: LogoDraftAsset[];
68
- gettyVideos: GettyVideoAdminEditorViewModelResponse[];
69
57
  };
70
58
  export declare const BRANDPAGE_STATUS: Readonly<{
71
59
  Published: "Published";
@@ -291,4 +279,3 @@ export declare const useBrandPageContainerStore: import("pinia").StoreDefinition
291
279
  isCustomDomainEnabled: any;
292
280
  }): Promise<void>;
293
281
  }>;
294
- export {};