@designcrowd/library.brand-page 5.15.3 → 5.15.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-P6321XBu.js → CreatedOnBrandCrowd-de-de-D-JqIBXF.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-CB2Vbc_1.js → CreatedOnBrandCrowd-en-us-rj1RdP3D.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-BUzOkzZ1.js → CreatedOnBrandCrowd-es-es-CQjoXEVn.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-BGhklGg-.js → CreatedOnBrandCrowd-fr-ca-BLfDC22k.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-BGhklGg-.js → CreatedOnBrandCrowd-fr-fr-BLfDC22k.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-DjkF8yHg.js → CreatedOnBrandCrowd-pt-br-DA4HMlpw.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-DjkF8yHg.js → CreatedOnBrandCrowd-pt-pt-DA4HMlpw.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-Blsa8CUj.js → CreatedOnDcom-de-de-DcSzC02I.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-CBk25ntF.js → CreatedOnDcom-en-us-Cj099v1g.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-D1ghG1-O.js → CreatedOnDcom-es-es-BLMAaoWm.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-C0igjVq3.js → CreatedOnDcom-fr-ca-DT5jxd5X.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-BAO9DjJx.js → CreatedOnDcom-fr-fr-BVT8h3pj.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-DIq8gG3f.js → CreatedOnDcom-pt-br-DP4jKxkV.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-De83jTtG.js → CreatedOnDcom-pt-pt-B6K9BtIo.js} +1 -1
  15. package/lib/src/brand-page/utils/migration/migration-07.js +2 -1
  16. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +3 -1
  17. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.js +0 -1
  18. package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.js +0 -2
  19. package/lib/src/brand-page-maker/constants/config-settings-constant.js +2 -2
  20. package/lib/src/brand-page-maker/constants/index.js +0 -2
  21. package/lib/src/brand-page-maker/stores/user/user-store.js +0 -1
  22. package/lib/src/{bundled-translations-Gwpp-xB6.js → bundled-translations-C35ICQCS.js} +16 -18
  23. package/lib/src/{bundled-translations.de-DE-CB4KkNf3.js → bundled-translations.de-DE-B3sIK6Yw.js} +11 -13
  24. package/lib/src/{bundled-translations.es-ES-27tfJoU5.js → bundled-translations.es-ES-CJCflztK.js} +13 -15
  25. package/lib/src/{bundled-translations.fr-CA-SDhUJ5C0.js → bundled-translations.fr-CA-CtlwKcDs.js} +16 -18
  26. package/lib/src/{bundled-translations.fr-FR-_THRUXSu.js → bundled-translations.fr-FR-CjDBsRhl.js} +20 -22
  27. package/lib/src/{bundled-translations.pt-BR-Cet1bnj3.js → bundled-translations.pt-BR-CNuFzR0R.js} +17 -19
  28. package/lib/src/{bundled-translations.pt-PT-BWuPalqF.js → bundled-translations.pt-PT-D2Ak5M-w.js} +4 -6
  29. package/lib/src/bundles/bundled-translations.de-DE.json +0 -7
  30. package/lib/src/bundles/bundled-translations.es-ES.json +0 -7
  31. package/lib/src/bundles/bundled-translations.fr-CA.json +0 -7
  32. package/lib/src/bundles/bundled-translations.fr-FR.json +0 -7
  33. package/lib/src/bundles/bundled-translations.json +0 -7
  34. package/lib/src/bundles/bundled-translations.pt-BR.json +0 -7
  35. package/lib/src/bundles/bundled-translations.pt-PT.json +0 -7
  36. package/lib/src/composables/useTranslate.d.ts +1 -2
  37. package/lib/src/composables/useTranslate.js +1 -2
  38. package/lib/src/constants/ui.d.ts +0 -1
  39. package/lib/src/css/library.brand-page-brandCrowd.min.css +22 -68
  40. package/lib/src/css/library.brand-page-brandPage.min.css +22 -68
  41. package/lib/src/css/library.brand-page-designCom.min.css +22 -68
  42. package/lib/src/css/library.brand-page-preview.min.css +22 -68
  43. package/lib/src/index.mjs +1 -1
  44. package/lib/src/{lib-B3T2jOqU.js → lib-DV-z72zv.js} +9928 -10096
  45. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.stories.js +0 -1
  46. package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +3 -1
  47. package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.js +3 -1
  48. package/lib/src/shared/content-settings/components/replace-image-base-settings/ReplaceImageBaseSettings.mixin.d.ts +112 -0
  49. package/lib/src/shared/content-settings/components/replace-image-base-settings/ReplaceImageBaseSettings.mixin.js +135 -0
  50. package/lib/src/shared/content-settings/models.d.ts +0 -1
  51. package/lib/src/shared/content-settings/models.js +0 -1
  52. package/lib/src/shared/ecommerce-settings/store/shop-settings-store.d.ts +3 -1
  53. package/lib/src/shared/ecommerce-settings/store/shop-settings-store.js +2 -2
  54. package/lib/src/shared/models.d.ts +0 -1
  55. package/lib/src/shared/my-uploads/MyMedia.stories.js +0 -1
  56. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +0 -1
  57. package/package.json +1 -1
  58. package/src/brand-page/components/logo/LogoRender.vue +1 -0
  59. package/src/brand-page/components/shop/FeaturedDisplay.vue +6 -7
  60. package/src/brand-page/components/shop/PaymentModal.vue +2 -0
  61. package/src/brand-page/components/shop/ProductDetailModal.vue +1 -2
  62. package/src/brand-page/components/shop/Shop.vue +31 -12
  63. package/src/brand-page/components/shop/TextDisplay.vue +6 -7
  64. package/src/brand-page/components/shop/ThumbnailDisplay.vue +6 -7
  65. package/src/brand-page/utils/migration/migration-07.ts +2 -1
  66. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.ts +0 -1
  67. package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.ts +0 -2
  68. package/src/brand-page-maker/components/shop/AddOrEditProductContainer.vue +8 -3
  69. package/src/brand-page-maker/constants/config-settings-constant.ts +2 -2
  70. package/src/brand-page-maker/constants/index.ts +0 -2
  71. package/src/brand-page-maker/stores/user/user-store.ts +0 -1
  72. package/src/bundles/bundled-translations.de-DE.json +0 -7
  73. package/src/bundles/bundled-translations.es-ES.json +0 -7
  74. package/src/bundles/bundled-translations.fr-CA.json +0 -7
  75. package/src/bundles/bundled-translations.fr-FR.json +0 -7
  76. package/src/bundles/bundled-translations.json +0 -7
  77. package/src/bundles/bundled-translations.pt-BR.json +0 -7
  78. package/src/bundles/bundled-translations.pt-PT.json +0 -7
  79. package/src/composables/useTranslate.ts +0 -2
  80. package/src/constants/ui.ts +0 -1
  81. package/src/shared/content-settings/components/content-settings/ContentSettings.stories.ts +0 -1
  82. package/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.ts +3 -1
  83. package/src/shared/content-settings/components/replace-image-base-settings/ReplaceImageBaseSettings.mixin.ts +168 -0
  84. package/src/shared/content-settings/components/replace-image-base-settings/ReplaceImageBaseSettings.vue +19 -215
  85. package/src/shared/content-settings/components/replace-image-base-settings/i18n/replace-image-setting.de-DE.json +0 -1
  86. package/src/shared/content-settings/components/replace-image-base-settings/i18n/replace-image-setting.es-ES.json +0 -1
  87. package/src/shared/content-settings/components/replace-image-base-settings/i18n/replace-image-setting.fr-CA.json +0 -1
  88. package/src/shared/content-settings/components/replace-image-base-settings/i18n/replace-image-setting.fr-FR.json +0 -1
  89. package/src/shared/content-settings/components/replace-image-base-settings/i18n/replace-image-setting.json +0 -1
  90. package/src/shared/content-settings/components/replace-image-base-settings/i18n/replace-image-setting.pt-BR.json +0 -1
  91. package/src/shared/content-settings/components/replace-image-base-settings/i18n/replace-image-setting.pt-PT.json +0 -1
  92. package/src/shared/content-settings/models.ts +0 -1
  93. package/src/shared/ecommerce-settings/components/product-config-field/ProductConfigOption.vue +2 -4
  94. package/src/shared/ecommerce-settings/store/shop-settings-store.ts +4 -2
  95. package/src/shared/models.ts +0 -1
  96. package/src/shared/my-uploads/MyMedia.stories.ts +0 -1
  97. package/src/shared/video-library/VideoLibrary.vue +0 -374
  98. package/src/shared/video-library/i18n/video-library.de-DE.json +0 -8
  99. package/src/shared/video-library/i18n/video-library.es-ES.json +0 -8
  100. package/src/shared/video-library/i18n/video-library.fr-CA.json +0 -8
  101. package/src/shared/video-library/i18n/video-library.fr-FR.json +0 -8
  102. package/src/shared/video-library/i18n/video-library.json +0 -8
  103. package/src/shared/video-library/i18n/video-library.pt-BR.json +0 -8
  104. package/src/shared/video-library/i18n/video-library.pt-PT.json +0 -8
@@ -23,7 +23,6 @@ export const Sample = () => {
23
23
  canUsePremiumFontFamily: true,
24
24
  canUseRichTextEditor: false,
25
25
  maxNumOfPages: DEFAULT_MAX_NUM_OF_PAGES,
26
- canUseGettyVideos: true,
27
26
  };
28
27
  const pinia = setupStoryPinia();
29
28
  const contentSettingsStore = useUiContentSettingsStore();
@@ -359,7 +359,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
359
359
  paymentConfig: BrandPagePaymentConfig | undefined;
360
360
  pages: import("../../../../brand-page").PageModel[];
361
361
  }): void;
362
- setPaymentConfig(value: BrandPagePaymentConfig): void;
362
+ setPaymentConfig(payload: {
363
+ paymentConfig: BrandPagePaymentConfig | undefined;
364
+ }): void;
363
365
  getProductById(id: string): import("../../../../brand-page/models/shop.model").ProductModel | undefined;
364
366
  addProduct(product: import("../../../../brand-page/models/shop.model").ProductModel): void;
365
367
  updateProduct(id: string, updatedProduct: import("../../../../brand-page/models/shop.model").ProductModel): void;
@@ -117,7 +117,9 @@ export default defineComponent({
117
117
  return;
118
118
  }
119
119
  if (this.isShop) {
120
- this.shopConfigStore.setPaymentConfig(paymentConfig);
120
+ this.shopConfigStore.setPaymentConfig({
121
+ paymentConfig: paymentConfig,
122
+ });
121
123
  }
122
124
  this.selectedPaymentConfig = paymentConfig;
123
125
  const value = {
@@ -0,0 +1,112 @@
1
+ import type { PropType } from 'vue';
2
+ import type { Tab, ReplaceImageSettingsBase } from '../../models';
3
+ import type { UserMediaItemWithDimensions } from '../../../my-uploads/models';
4
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
+ mediaSettings: {
6
+ type: PropType<ReplaceImageSettingsBase>;
7
+ required: false;
8
+ default: undefined;
9
+ };
10
+ imageExtension: {
11
+ type: PropType<string[]>;
12
+ required: false;
13
+ default: () => string[];
14
+ };
15
+ mode: {
16
+ type: PropType<"images" | "edit">;
17
+ required: true;
18
+ };
19
+ isAdmin: {
20
+ type: BooleanConstructor;
21
+ required: true;
22
+ default: boolean;
23
+ };
24
+ activeTabs: {
25
+ type: PropType<("ICON" | "IMAGE_LIBRARY" | "MY_UPLOADS" | "MY_DESIGNS" | "SHAPE_LIBRARY")[]>;
26
+ required: true;
27
+ };
28
+ mediaType: {
29
+ type: StringConstructor;
30
+ required: false;
31
+ default: string;
32
+ };
33
+ sectionTitle: {
34
+ type: StringConstructor;
35
+ required: false;
36
+ default: string;
37
+ };
38
+ transparentBg: {
39
+ type: BooleanConstructor;
40
+ required: true;
41
+ default: boolean;
42
+ };
43
+ stickyBackBtn: {
44
+ type: BooleanConstructor;
45
+ required: true;
46
+ default: boolean;
47
+ };
48
+ }>, {
49
+ isPrePurchase: import("vue").ComputedRef<boolean>;
50
+ }, {
51
+ tabs: Tab[];
52
+ }, {
53
+ enabledTabs(): Tab[];
54
+ isDeleteEnabled(): boolean;
55
+ }, {
56
+ onBack(): void;
57
+ onImageSelected(image: Pick<UserMediaItemWithDimensions, 'url' | 'minimisedUrl' | 'width' | 'height'>): void;
58
+ onDeleteImage(image: Pick<UserMediaItemWithDimensions, 'url' | 'minimisedUrl' | 'width' | 'height'>): void;
59
+ onDesignSelected(image: UserMediaItemWithDimensions): void;
60
+ switchActiveTab(id: string): void;
61
+ onShapeSelected(image: UserMediaItemWithDimensions): Promise<void>;
62
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
63
+ mediaSettings: {
64
+ type: PropType<ReplaceImageSettingsBase>;
65
+ required: false;
66
+ default: undefined;
67
+ };
68
+ imageExtension: {
69
+ type: PropType<string[]>;
70
+ required: false;
71
+ default: () => string[];
72
+ };
73
+ mode: {
74
+ type: PropType<"images" | "edit">;
75
+ required: true;
76
+ };
77
+ isAdmin: {
78
+ type: BooleanConstructor;
79
+ required: true;
80
+ default: boolean;
81
+ };
82
+ activeTabs: {
83
+ type: PropType<("ICON" | "IMAGE_LIBRARY" | "MY_UPLOADS" | "MY_DESIGNS" | "SHAPE_LIBRARY")[]>;
84
+ required: true;
85
+ };
86
+ mediaType: {
87
+ type: StringConstructor;
88
+ required: false;
89
+ default: string;
90
+ };
91
+ sectionTitle: {
92
+ type: StringConstructor;
93
+ required: false;
94
+ default: string;
95
+ };
96
+ transparentBg: {
97
+ type: BooleanConstructor;
98
+ required: true;
99
+ default: boolean;
100
+ };
101
+ stickyBackBtn: {
102
+ type: BooleanConstructor;
103
+ required: true;
104
+ default: boolean;
105
+ };
106
+ }>> & Readonly<{}>, {
107
+ mediaType: string;
108
+ mediaSettings: ReplaceImageSettingsBase;
109
+ sectionTitle: string;
110
+ imageExtension: string[];
111
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
112
+ export default _default;
@@ -0,0 +1,135 @@
1
+ import { computed, defineComponent } from 'vue';
2
+ import { useBrandPageContainerStore, } from '../../../../brand-page-maker/stores';
3
+ import axios from 'axios';
4
+ import { getColorReplacementsFromSvgString } from '../../../../brand-page/utils/svg-color.util';
5
+ import { tr } from '../../../../composables/useTranslate';
6
+ const imageSettingTr = (key) => tr(`replaceImageSetting.${key}`);
7
+ export default defineComponent({
8
+ props: {
9
+ mediaSettings: {
10
+ type: Object,
11
+ required: false,
12
+ default: undefined,
13
+ },
14
+ imageExtension: {
15
+ type: Array,
16
+ required: false,
17
+ default: () => ['.jpg', '.jpeg', '.png'],
18
+ },
19
+ mode: {
20
+ type: Object,
21
+ required: true,
22
+ },
23
+ isAdmin: {
24
+ type: Boolean,
25
+ required: true,
26
+ default: false,
27
+ },
28
+ activeTabs: {
29
+ type: Array,
30
+ required: true,
31
+ },
32
+ mediaType: {
33
+ type: String,
34
+ required: false,
35
+ default: '',
36
+ },
37
+ sectionTitle: {
38
+ type: String,
39
+ required: false,
40
+ default: '',
41
+ },
42
+ transparentBg: {
43
+ type: Boolean,
44
+ required: true,
45
+ default: false,
46
+ },
47
+ stickyBackBtn: {
48
+ type: Boolean,
49
+ required: true,
50
+ default: true,
51
+ },
52
+ },
53
+ setup() {
54
+ const containerStore = useBrandPageContainerStore();
55
+ return {
56
+ isPrePurchase: computed(() => containerStore.isPrePurchase),
57
+ };
58
+ },
59
+ data() {
60
+ return {
61
+ tabs: [
62
+ {
63
+ id: 'ICON',
64
+ label: imageSettingTr('icon'),
65
+ active: false,
66
+ },
67
+ {
68
+ id: 'MY_UPLOADS',
69
+ label: imageSettingTr('myUploads'),
70
+ active: false,
71
+ },
72
+ {
73
+ id: 'MY_DESIGNS',
74
+ label: imageSettingTr('myDesigns'),
75
+ active: false,
76
+ },
77
+ {
78
+ id: 'IMAGE_LIBRARY',
79
+ label: imageSettingTr('imageLibrary'),
80
+ active: false,
81
+ },
82
+ {
83
+ id: 'SHAPE_LIBRARY',
84
+ label: imageSettingTr('shapeLibrary'),
85
+ active: false,
86
+ },
87
+ ],
88
+ };
89
+ },
90
+ computed: {
91
+ enabledTabs() {
92
+ const value = this.tabs
93
+ .filter((x) => x.id !== 'MY_DESIGNS' || !this.isAdmin)
94
+ .filter((x) => this.activeTabs.some((y) => y === x.id) &&
95
+ (!this.isPrePurchase || x.id !== 'MY_DESIGNS'));
96
+ return value;
97
+ },
98
+ isDeleteEnabled() {
99
+ return true;
100
+ },
101
+ },
102
+ created() {
103
+ if (this.enabledTabs.length > 0) {
104
+ this.enabledTabs[0].active = true;
105
+ }
106
+ },
107
+ methods: {
108
+ onBack() {
109
+ this.$emit('on-back');
110
+ },
111
+ onImageSelected(image) {
112
+ this.$emit('on-image-picked', image, this.mediaType);
113
+ },
114
+ onDeleteImage(image) {
115
+ this.$emit('on-image-removed', image);
116
+ },
117
+ onDesignSelected(image) {
118
+ this.$emit('on-design-selected', image);
119
+ },
120
+ switchActiveTab(id) {
121
+ this.tabs.forEach((tab) => tab.id === id ? (tab.active = true) : (tab.active = false));
122
+ },
123
+ async onShapeSelected(image) {
124
+ const svgResponse = await axios.get(image.url);
125
+ const colorReplacements = getColorReplacementsFromSvgString(svgResponse.data);
126
+ this.$emit('on-shape-selected', {
127
+ imageUrl: image.url,
128
+ width: image.width,
129
+ height: image.height,
130
+ colorReplacements,
131
+ aspectRatio: image.aspectRatio,
132
+ });
133
+ },
134
+ },
135
+ });
@@ -15,7 +15,6 @@ export interface FieldSettingsBase {
15
15
  export declare const ReplaceImageSettingsTabIds: {
16
16
  readonly ICON: "ICON";
17
17
  readonly IMAGE_LIBRARY: "IMAGE_LIBRARY";
18
- readonly VIDEO_LIBRARY: "VIDEO_LIBRARY";
19
18
  readonly MY_UPLOADS: "MY_UPLOADS";
20
19
  readonly MY_DESIGNS: "MY_DESIGNS";
21
20
  readonly SHAPE_LIBRARY: "SHAPE_LIBRARY";
@@ -1,7 +1,6 @@
1
1
  export const ReplaceImageSettingsTabIds = {
2
2
  ICON: 'ICON',
3
3
  IMAGE_LIBRARY: 'IMAGE_LIBRARY',
4
- VIDEO_LIBRARY: 'VIDEO_LIBRARY',
5
4
  MY_UPLOADS: 'MY_UPLOADS',
6
5
  MY_DESIGNS: 'MY_DESIGNS',
7
6
  SHAPE_LIBRARY: 'SHAPE_LIBRARY',
@@ -99,7 +99,9 @@ export declare const useShopConfigStore: import("pinia").StoreDefinition<"shopCo
99
99
  paymentConfig: BrandPagePaymentConfig | undefined;
100
100
  pages: PageModel[];
101
101
  }): void;
102
- setPaymentConfig(value: BrandPagePaymentConfig): void;
102
+ setPaymentConfig(payload: {
103
+ paymentConfig: BrandPagePaymentConfig | undefined;
104
+ }): void;
103
105
  getProductById(id: string): ProductModel | undefined;
104
106
  addProduct(product: ProductModel): void;
105
107
  updateProduct(id: string, updatedProduct: ProductModel): void;
@@ -40,8 +40,8 @@ export const useShopConfigStore = defineStore('shopConfig', {
40
40
  Object.assign($state, newState);
41
41
  });
42
42
  },
43
- setPaymentConfig(value) {
44
- this.paymentConfig = value;
43
+ setPaymentConfig(payload) {
44
+ this.paymentConfig = payload.paymentConfig;
45
45
  },
46
46
  getProductById(id) {
47
47
  return this.products.find((x) => x.id === id);
@@ -23,7 +23,6 @@ export interface Endpoints {
23
23
  getAllUserMediaEndpoint: string;
24
24
  userPolicyDataEndpoint: string;
25
25
  getUnsplashMediaRootEndpoint: string;
26
- getGettyEndpoint: string;
27
26
  }
28
27
  export declare const UI_EVENT_SOURCES: {
29
28
  readonly contentSettings: "contentSettings";
@@ -12,7 +12,6 @@ const defaultUserEndpoints = {
12
12
  getAllUserMediaEndpoint: GET_ALL_USER_MEDIA_ENDPOINT,
13
13
  userPolicyDataEndpoint: USER_POLICY_DATA_ENDPOINT,
14
14
  getUnsplashMediaRootEndpoint: '',
15
- getGettyEndpoint: '',
16
15
  };
17
16
  const supportedFileExtensions = ['jpg', 'png', 'gif'];
18
17
  const mediaType = 'favicon';
@@ -3104,7 +3104,6 @@ declare const _default: import("vue").DefineComponent<{}, {
3104
3104
  canUsePremiumFontFamily: boolean;
3105
3105
  maxNumOfPages: number;
3106
3106
  canUseRichTextEditor: boolean;
3107
- canUseGettyVideos: boolean;
3108
3107
  }>;
3109
3108
  isAdmin: import("vue").ComputedRef<boolean>;
3110
3109
  isBrandSite: import("vue").ComputedRef<boolean>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@designcrowd/library.brand-page",
3
3
  "description": "A collection of Maker/Designer applications",
4
- "version": "5.15.3",
4
+ "version": "5.15.4",
5
5
  "author": "Design.com Eng",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",
@@ -110,6 +110,7 @@ const logoStyle = computed(() => {
110
110
  : ({
111
111
  width: '100%',
112
112
  height: '100%',
113
+ 'max-width': '20rem',
113
114
  } as any);
114
115
  });
115
116
 
@@ -65,10 +65,6 @@ import TextWrapper from '../text-wrapper/TextWrapper.vue';
65
65
  import { type PropType } from 'vue';
66
66
  import type { ShopViewModel } from '../../view-models';
67
67
  import type { ProductModel } from '../../models/shop.model';
68
- import { useShopConfigStore } from '../../../shared/ecommerce-settings/store/shop-settings-store';
69
- import { computed } from 'vue';
70
-
71
- const shopSettingStore = useShopConfigStore();
72
68
 
73
69
  const props = defineProps({
74
70
  context: {
@@ -79,6 +75,11 @@ const props = defineProps({
79
75
  type: Object as PropType<ShopViewModel>,
80
76
  required: true,
81
77
  },
78
+ currencySymbol: {
79
+ type: String,
80
+ required: false,
81
+ default: '$',
82
+ },
82
83
  aspectRatio: {
83
84
  type: String,
84
85
  required: true,
@@ -94,13 +95,11 @@ const props = defineProps({
94
95
  },
95
96
  });
96
97
 
97
- const currencySymbol = computed(() => shopSettingStore.currencySymbol);
98
-
99
98
  const renderCurrencyAmount = (product: ProductModel): string => {
100
99
  const variantPrice = product.variant?.[0]?.options?.[0]?.price;
101
100
  const finalPrice = variantPrice ?? product.defaultPrice ?? '0';
102
101
 
103
- return `${currencySymbol.value} ${finalPrice}`;
102
+ return `${props.currencySymbol} ${finalPrice}`;
104
103
  };
105
104
 
106
105
  const emit = defineEmits(['on-product-detail']);
@@ -145,6 +145,7 @@ const paymentState = {
145
145
  interface Props {
146
146
  context: BrandPageContext;
147
147
  isVisible: boolean;
148
+ currencySymbol: string;
148
149
  buttonStyle: ButtonStyles;
149
150
  shopPaymentConfig: BrandPagePaymentConfig;
150
151
  descriptionStyle: TextStyleDeclaration | undefined;
@@ -153,6 +154,7 @@ interface Props {
153
154
 
154
155
  const props = withDefaults(defineProps<Props>(), {
155
156
  isVisible: true,
157
+ currencySymbol: '$',
156
158
  });
157
159
 
158
160
  const uniformDescriptionStyle = computed<TextStyleDeclaration>(() => ({
@@ -30,7 +30,7 @@
30
30
  {{ currentProduct.name }}
31
31
  </h1>
32
32
  <p class="tw-text-left tw-text-md tw-text-grayscale-800">
33
- {{ currencySymbol }} {{ itemPrice }}
33
+ {{ shopSettingStore.currencySymbol }} {{ itemPrice }}
34
34
  </p>
35
35
  <div v-if="currentProduct.hasVariants">
36
36
  <div
@@ -185,7 +185,6 @@ const cartSettingsStore = useCartStore();
185
185
  const shopSettingStore = useShopConfigStore();
186
186
 
187
187
  const products = computed(() => shopSettingStore.products);
188
- const currencySymbol = computed(() => shopSettingStore.currencySymbol);
189
188
  const currentProduct = computed(() => {
190
189
  // Use the first product if currentProduct is not found
191
190
  return (
@@ -32,6 +32,7 @@
32
32
  :view-model="viewModel"
33
33
  :context="context"
34
34
  :item-style="itemStyle"
35
+ :currency-symbol="data.defaultCurrencySymbol"
35
36
  @on-product-detail="onShowProductDetailModal"
36
37
  />
37
38
  <ThumbnailDisplay
@@ -40,6 +41,7 @@
40
41
  :context="context"
41
42
  :aspect-ratio="aspectRatio"
42
43
  :item-style="itemStyle"
44
+ :currency-symbol="data.defaultCurrencySymbol"
43
45
  :content-index="contentIndex"
44
46
  @on-product-detail="onShowProductDetailModal"
45
47
  />
@@ -49,6 +51,7 @@
49
51
  :context="context"
50
52
  :aspect-ratio="aspectRatio"
51
53
  :item-style="itemStyle"
54
+ :currency-symbol="data.defaultCurrencySymbol"
52
55
  :content-index="contentIndex"
53
56
  @on-product-detail="onShowProductDetailModal"
54
57
  />
@@ -88,6 +91,7 @@
88
91
  class="modal-product-detail"
89
92
  :product="data.product"
90
93
  :button-style="buttonStyle"
94
+ :currency-symbol="currencySymbol"
91
95
  @on-close="onClose"
92
96
  @on-show-success="onShowSuccess"
93
97
  />
@@ -95,6 +99,7 @@
95
99
  class="modal-cart"
96
100
  :is-visible="data.isCartModalVisible"
97
101
  :button-style="buttonStyle"
102
+ :currency-symbol="currencySymbol"
98
103
  @on-close="onCloseCart"
99
104
  @on-show-payment="onShowPaymentModal"
100
105
  />
@@ -104,6 +109,7 @@
104
109
  :is-visible="data.isPaymentModalVisible"
105
110
  :button-style="buttonStyle"
106
111
  :description-style="viewModel.descriptionStyle"
112
+ :currency-symbol="currencySymbol"
107
113
  :shop-payment-config="shopPaymentConfig"
108
114
  :context="context"
109
115
  :success-message="viewModel.successMessage"
@@ -134,18 +140,24 @@ import PaymentModal from './PaymentModal.vue';
134
140
  import brandPageClient from '../../clients/brand-page.client';
135
141
  import raygunUtil from '../../utils/raygun.util';
136
142
  import { shopTr } from '../../../composables/useTranslate';
137
- import { useShopConfigStore } from '../../../shared/ecommerce-settings/store/shop-settings-store';
138
143
 
139
- const props = withDefaults(
140
- defineProps<{
141
- context: BrandPageContext;
142
- viewModel: ShopViewModel;
143
- contentIndex: number;
144
- }>(),
145
- {},
146
- );
144
+ const props = defineProps({
145
+ context: {
146
+ type: Object as PropType<BrandPageContext>,
147
+ required: true,
148
+ },
149
+ viewModel: {
150
+ type: Object as PropType<ShopViewModel>,
151
+ required: true,
152
+ },
153
+ contentIndex: {
154
+ type: Number,
155
+ required: false,
156
+ default: undefined,
157
+ },
158
+ });
159
+
147
160
  const cartSettingsStore = useCartStore();
148
- const shopSettingStore = useShopConfigStore();
149
161
 
150
162
  const cart = computed(() => cartSettingsStore.cartItems);
151
163
 
@@ -189,6 +201,9 @@ const data = reactive({
189
201
  isAddCartSuccess: false,
190
202
  product: {} as ProductModel,
191
203
  isActivePaymentProvider: false,
204
+ defaultCurrencySymbol:
205
+ props.viewModel.shopPaymentConfig?.paymentConfig?.defaultCurrencySymbol ??
206
+ '$',
192
207
  });
193
208
 
194
209
  const viewCartText = computed(() => {
@@ -259,11 +274,15 @@ const backgroundStyle = computed((): any => {
259
274
  return props.viewModel.backgroundStyle;
260
275
  });
261
276
 
277
+ const currencySymbol = computed((): any => {
278
+ return props.viewModel.shopPaymentConfig.paymentConfig?.defaultCurrencySymbol;
279
+ });
280
+
262
281
  const shopPaymentConfig = computed((): BrandPagePaymentConfig => {
263
- if (!shopSettingStore.paymentConfig) {
282
+ if (!props.viewModel.shopPaymentConfig.paymentConfig) {
264
283
  throw new Error('No Payment Config found');
265
284
  }
266
- return shopSettingStore.paymentConfig;
285
+ return props.viewModel.shopPaymentConfig.paymentConfig;
267
286
  });
268
287
 
269
288
  const isTextDisplayStyle = computed(() => {
@@ -34,10 +34,6 @@ import TextWrapper from '../text-wrapper/TextWrapper.vue';
34
34
  import type { PropType } from 'vue';
35
35
  import type { ShopViewModel } from '../../view-models';
36
36
  import type { ProductModel } from '../../models/shop.model';
37
- import { useShopConfigStore } from '../../../shared/ecommerce-settings/store/shop-settings-store';
38
- import { computed } from 'vue';
39
-
40
- const shopSettingStore = useShopConfigStore();
41
37
 
42
38
  const props = defineProps({
43
39
  context: {
@@ -48,19 +44,22 @@ const props = defineProps({
48
44
  type: Object as PropType<ShopViewModel>,
49
45
  required: true,
50
46
  },
47
+ currencySymbol: {
48
+ type: String,
49
+ required: false,
50
+ default: '$',
51
+ },
51
52
  itemStyle: {
52
53
  type: Object,
53
54
  required: true,
54
55
  },
55
56
  });
56
57
 
57
- const currencySymbol = computed(() => shopSettingStore.currencySymbol);
58
-
59
58
  const renderCurrencyAmount = (product: ProductModel): string => {
60
59
  const variantPrice = product.variant?.[0]?.options?.[0]?.price;
61
60
  const finalPrice = variantPrice ?? product.defaultPrice ?? '0';
62
61
 
63
- return `${currencySymbol.value} ${finalPrice}`;
62
+ return `${props.currencySymbol} ${finalPrice}`;
64
63
  };
65
64
 
66
65
  const emit = defineEmits(['on-product-detail']);
@@ -51,10 +51,6 @@ import TextWrapper from '../text-wrapper/TextWrapper.vue';
51
51
  import type { PropType } from 'vue';
52
52
  import type { ShopViewModel } from '../../view-models';
53
53
  import type { ProductModel } from '../../models/shop.model';
54
- import { useShopConfigStore } from '../../../shared/ecommerce-settings/store/shop-settings-store';
55
- import { computed } from 'vue';
56
-
57
- const shopSettingStore = useShopConfigStore();
58
54
 
59
55
  const props = defineProps({
60
56
  context: {
@@ -65,6 +61,11 @@ const props = defineProps({
65
61
  type: Object as PropType<ShopViewModel>,
66
62
  required: true,
67
63
  },
64
+ currencySymbol: {
65
+ type: String,
66
+ required: false,
67
+ default: '$',
68
+ },
68
69
  aspectRatio: {
69
70
  type: String,
70
71
  required: true,
@@ -80,13 +81,11 @@ const props = defineProps({
80
81
  },
81
82
  });
82
83
 
83
- const currencySymbol = computed(() => shopSettingStore.currencySymbol);
84
-
85
84
  const renderCurrencyAmount = (product: ProductModel): string => {
86
85
  const variantPrice = product.variant?.[0]?.options?.[0]?.price;
87
86
  const finalPrice = variantPrice ?? product.defaultPrice ?? '0';
88
87
 
89
- return `${currencySymbol.value} ${finalPrice}`;
88
+ return `${props.currencySymbol} ${finalPrice}`;
90
89
  };
91
90
 
92
91
  const emit = defineEmits(['on-product-detail']);
@@ -99,7 +99,8 @@ export const migration07 = async (
99
99
  !logoData &&
100
100
  (sectionName === 'pageFooterDesktop' ||
101
101
  sectionName === 'pageFooterMobile' ||
102
- sectionName === 'pageHeaderMobile')
102
+ sectionName === 'pageHeaderMobile' ||
103
+ sectionName === 'pageHeaderDesktop')
103
104
  ) {
104
105
  const currentMaxHeight = config.logoImageHeight || DEFAULT_LOGO_HEIGHT;
105
106
  const heightValue = parseFloat(currentMaxHeight);
@@ -1461,7 +1461,6 @@ export const SampleImageUpload = (): any => {
1461
1461
  userPolicyDataEndpoint:
1462
1462
  'http://localhost:3600/maker/api/users/policy-data',
1463
1463
  getUnsplashMediaRootEndpoint: 'http://staging.brandcrowd.com',
1464
- getGettyEndpoint: 'http://staging.brandcrowd.com',
1465
1464
  },
1466
1465
  }),
1467
1466
  };
@@ -86,7 +86,6 @@ export const userFeatures: UserFeatures = {
86
86
  canUseRichTextEditor: true,
87
87
  canUsePremiumFontFamily: true,
88
88
  maxNumOfPages: DEFAULT_MAX_NUM_OF_PAGES,
89
- canUseGettyVideos: false,
90
89
  };
91
90
 
92
91
  export const BRAND_PAGE: BrandPageData = {
@@ -2122,7 +2121,6 @@ export const INITIALISE_PAYLOAD: InitialisePayload = Object.freeze({
2122
2121
  canUseRichTextEditor: false,
2123
2122
  canUsePremiumFontFamily: true,
2124
2123
  maxNumOfPages: UNLIMITED_MAX_NUM_OF_PAGES,
2125
- canUseGettyVideos: true,
2126
2124
  },
2127
2125
  logoDraftDesignAttributes: simpleLogoDesignAttributes,
2128
2126
  backUrl: '',