@designcrowd/library.brand-page 5.15.1 → 5.15.3
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-BIE9c3EL.js → CreatedOnBrandCrowd-de-de-P6321XBu.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-BE9PH8qL.js → CreatedOnBrandCrowd-en-us-CB2Vbc_1.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-DWiKnM6A.js → CreatedOnBrandCrowd-es-es-BUzOkzZ1.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-8eX1EXEv.js → CreatedOnBrandCrowd-fr-ca-BGhklGg-.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-8eX1EXEv.js → CreatedOnBrandCrowd-fr-fr-BGhklGg-.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-mCxUdC56.js → CreatedOnBrandCrowd-pt-br-DjkF8yHg.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-mCxUdC56.js → CreatedOnBrandCrowd-pt-pt-DjkF8yHg.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-BeOF7zXw.js → CreatedOnDcom-de-de-Blsa8CUj.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-CawAwKBe.js → CreatedOnDcom-en-us-CBk25ntF.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-CeUIvRLW.js → CreatedOnDcom-es-es-D1ghG1-O.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-rlKuqR9V.js → CreatedOnDcom-fr-ca-C0igjVq3.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-DrtcMVwe.js → CreatedOnDcom-fr-fr-BAO9DjJx.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-CwQNzn0P.js → CreatedOnDcom-pt-br-DIq8gG3f.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-BVt_i9Mu.js → CreatedOnDcom-pt-pt-De83jTtG.js} +1 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +1 -3
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.js +1 -0
- package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.js +2 -0
- package/lib/src/brand-page-maker/constants/config-settings-constant.js +2 -2
- package/lib/src/brand-page-maker/constants/index.js +2 -0
- package/lib/src/brand-page-maker/stores/user/user-store.js +1 -0
- package/lib/src/{bundled-translations-C35ICQCS.js → bundled-translations-Gwpp-xB6.js} +18 -16
- package/lib/src/{bundled-translations.de-DE-B3sIK6Yw.js → bundled-translations.de-DE-CB4KkNf3.js} +13 -11
- package/lib/src/{bundled-translations.es-ES-CJCflztK.js → bundled-translations.es-ES-27tfJoU5.js} +15 -13
- package/lib/src/{bundled-translations.fr-CA-CtlwKcDs.js → bundled-translations.fr-CA-SDhUJ5C0.js} +18 -16
- package/lib/src/{bundled-translations.fr-FR-CjDBsRhl.js → bundled-translations.fr-FR-_THRUXSu.js} +22 -20
- package/lib/src/{bundled-translations.pt-BR-CNuFzR0R.js → bundled-translations.pt-BR-Cet1bnj3.js} +19 -17
- package/lib/src/{bundled-translations.pt-PT-D2Ak5M-w.js → bundled-translations.pt-PT-BWuPalqF.js} +6 -4
- package/lib/src/bundles/bundled-translations.de-DE.json +7 -0
- package/lib/src/bundles/bundled-translations.es-ES.json +7 -0
- package/lib/src/bundles/bundled-translations.fr-CA.json +7 -0
- package/lib/src/bundles/bundled-translations.fr-FR.json +7 -0
- package/lib/src/bundles/bundled-translations.json +7 -0
- package/lib/src/bundles/bundled-translations.pt-BR.json +7 -0
- package/lib/src/bundles/bundled-translations.pt-PT.json +7 -0
- package/lib/src/composables/useTranslate.d.ts +2 -1
- package/lib/src/composables/useTranslate.js +2 -1
- package/lib/src/constants/ui.d.ts +1 -0
- package/lib/src/css/library.brand-page-brandCrowd.min.css +66 -20
- package/lib/src/css/library.brand-page-brandPage.min.css +66 -20
- package/lib/src/css/library.brand-page-designCom.min.css +66 -20
- package/lib/src/css/library.brand-page-preview.min.css +66 -20
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-DcKgS2dv.js → lib-B3T2jOqU.js} +10094 -9925
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.stories.js +1 -0
- package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +1 -3
- package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.js +1 -3
- package/lib/src/shared/content-settings/models.d.ts +1 -0
- package/lib/src/shared/content-settings/models.js +1 -0
- package/lib/src/shared/ecommerce-settings/store/shop-settings-store.d.ts +1 -3
- package/lib/src/shared/ecommerce-settings/store/shop-settings-store.js +2 -2
- package/lib/src/shared/models.d.ts +1 -0
- package/lib/src/shared/my-uploads/MyMedia.stories.js +1 -0
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +1 -0
- package/package.json +1 -1
- package/src/brand-page/components/shop/FeaturedDisplay.vue +7 -6
- package/src/brand-page/components/shop/PaymentModal.vue +0 -2
- package/src/brand-page/components/shop/ProductDetailModal.vue +2 -1
- package/src/brand-page/components/shop/Shop.vue +12 -31
- package/src/brand-page/components/shop/TextDisplay.vue +7 -6
- package/src/brand-page/components/shop/ThumbnailDisplay.vue +7 -6
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.ts +1 -0
- package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.ts +2 -0
- package/src/brand-page-maker/components/shop/AddOrEditProductContainer.vue +3 -8
- package/src/brand-page-maker/constants/config-settings-constant.ts +2 -2
- package/src/brand-page-maker/constants/index.ts +2 -0
- package/src/brand-page-maker/stores/user/user-store.ts +1 -0
- package/src/bundles/bundled-translations.de-DE.json +7 -0
- package/src/bundles/bundled-translations.es-ES.json +7 -0
- package/src/bundles/bundled-translations.fr-CA.json +7 -0
- package/src/bundles/bundled-translations.fr-FR.json +7 -0
- package/src/bundles/bundled-translations.json +7 -0
- package/src/bundles/bundled-translations.pt-BR.json +7 -0
- package/src/bundles/bundled-translations.pt-PT.json +7 -0
- package/src/composables/useTranslate.ts +2 -0
- package/src/constants/ui.ts +1 -0
- package/src/shared/content-settings/components/content-settings/ContentSettings.stories.ts +1 -0
- package/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.ts +1 -3
- package/src/shared/content-settings/components/replace-image-base-settings/ReplaceImageBaseSettings.vue +215 -19
- package/src/shared/content-settings/components/replace-image-base-settings/i18n/replace-image-setting.de-DE.json +1 -0
- package/src/shared/content-settings/components/replace-image-base-settings/i18n/replace-image-setting.es-ES.json +1 -0
- package/src/shared/content-settings/components/replace-image-base-settings/i18n/replace-image-setting.fr-CA.json +1 -0
- package/src/shared/content-settings/components/replace-image-base-settings/i18n/replace-image-setting.fr-FR.json +1 -0
- package/src/shared/content-settings/components/replace-image-base-settings/i18n/replace-image-setting.json +1 -0
- package/src/shared/content-settings/components/replace-image-base-settings/i18n/replace-image-setting.pt-BR.json +1 -0
- package/src/shared/content-settings/components/replace-image-base-settings/i18n/replace-image-setting.pt-PT.json +1 -0
- package/src/shared/content-settings/models.ts +1 -0
- package/src/shared/ecommerce-settings/components/product-config-field/ProductConfigOption.vue +4 -2
- package/src/shared/ecommerce-settings/store/shop-settings-store.ts +2 -4
- package/src/shared/models.ts +1 -0
- package/src/shared/my-uploads/MyMedia.stories.ts +1 -0
- package/src/shared/video-library/VideoLibrary.vue +374 -0
- package/src/shared/video-library/i18n/video-library.de-DE.json +8 -0
- package/src/shared/video-library/i18n/video-library.es-ES.json +8 -0
- package/src/shared/video-library/i18n/video-library.fr-CA.json +8 -0
- package/src/shared/video-library/i18n/video-library.fr-FR.json +8 -0
- package/src/shared/video-library/i18n/video-library.json +8 -0
- package/src/shared/video-library/i18n/video-library.pt-BR.json +8 -0
- package/src/shared/video-library/i18n/video-library.pt-PT.json +8 -0
- package/lib/src/shared/content-settings/components/replace-image-base-settings/ReplaceImageBaseSettings.mixin.d.ts +0 -112
- package/lib/src/shared/content-settings/components/replace-image-base-settings/ReplaceImageBaseSettings.mixin.js +0 -135
- package/src/shared/content-settings/components/replace-image-base-settings/ReplaceImageBaseSettings.mixin.ts +0 -168
package/lib/src/shared/content-settings/components/content-settings/ContentSettings.stories.js
CHANGED
|
@@ -23,6 +23,7 @@ export const Sample = () => {
|
|
|
23
23
|
canUsePremiumFontFamily: true,
|
|
24
24
|
canUseRichTextEditor: false,
|
|
25
25
|
maxNumOfPages: DEFAULT_MAX_NUM_OF_PAGES,
|
|
26
|
+
canUseGettyVideos: true,
|
|
26
27
|
};
|
|
27
28
|
const pinia = setupStoryPinia();
|
|
28
29
|
const contentSettingsStore = useUiContentSettingsStore();
|
|
@@ -359,9 +359,7 @@ 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(
|
|
363
|
-
paymentConfig: BrandPagePaymentConfig | undefined;
|
|
364
|
-
}): void;
|
|
362
|
+
setPaymentConfig(value: BrandPagePaymentConfig): void;
|
|
365
363
|
getProductById(id: string): import("../../../../brand-page/models/shop.model").ProductModel | undefined;
|
|
366
364
|
addProduct(product: import("../../../../brand-page/models/shop.model").ProductModel): void;
|
|
367
365
|
updateProduct(id: string, updatedProduct: import("../../../../brand-page/models/shop.model").ProductModel): void;
|
package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.js
CHANGED
|
@@ -117,9 +117,7 @@ export default defineComponent({
|
|
|
117
117
|
return;
|
|
118
118
|
}
|
|
119
119
|
if (this.isShop) {
|
|
120
|
-
this.shopConfigStore.setPaymentConfig(
|
|
121
|
-
paymentConfig: paymentConfig,
|
|
122
|
-
});
|
|
120
|
+
this.shopConfigStore.setPaymentConfig(paymentConfig);
|
|
123
121
|
}
|
|
124
122
|
this.selectedPaymentConfig = paymentConfig;
|
|
125
123
|
const value = {
|
|
@@ -15,6 +15,7 @@ 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";
|
|
18
19
|
readonly MY_UPLOADS: "MY_UPLOADS";
|
|
19
20
|
readonly MY_DESIGNS: "MY_DESIGNS";
|
|
20
21
|
readonly SHAPE_LIBRARY: "SHAPE_LIBRARY";
|
|
@@ -99,9 +99,7 @@ export declare const useShopConfigStore: import("pinia").StoreDefinition<"shopCo
|
|
|
99
99
|
paymentConfig: BrandPagePaymentConfig | undefined;
|
|
100
100
|
pages: PageModel[];
|
|
101
101
|
}): void;
|
|
102
|
-
setPaymentConfig(
|
|
103
|
-
paymentConfig: BrandPagePaymentConfig | undefined;
|
|
104
|
-
}): void;
|
|
102
|
+
setPaymentConfig(value: BrandPagePaymentConfig): void;
|
|
105
103
|
getProductById(id: string): ProductModel | undefined;
|
|
106
104
|
addProduct(product: ProductModel): void;
|
|
107
105
|
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(
|
|
44
|
-
this.paymentConfig =
|
|
43
|
+
setPaymentConfig(value) {
|
|
44
|
+
this.paymentConfig = value;
|
|
45
45
|
},
|
|
46
46
|
getProductById(id) {
|
|
47
47
|
return this.products.find((x) => x.id === id);
|
|
@@ -23,6 +23,7 @@ export interface Endpoints {
|
|
|
23
23
|
getAllUserMediaEndpoint: string;
|
|
24
24
|
userPolicyDataEndpoint: string;
|
|
25
25
|
getUnsplashMediaRootEndpoint: string;
|
|
26
|
+
getGettyEndpoint: string;
|
|
26
27
|
}
|
|
27
28
|
export declare const UI_EVENT_SOURCES: {
|
|
28
29
|
readonly contentSettings: "contentSettings";
|
|
@@ -12,6 +12,7 @@ const defaultUserEndpoints = {
|
|
|
12
12
|
getAllUserMediaEndpoint: GET_ALL_USER_MEDIA_ENDPOINT,
|
|
13
13
|
userPolicyDataEndpoint: USER_POLICY_DATA_ENDPOINT,
|
|
14
14
|
getUnsplashMediaRootEndpoint: '',
|
|
15
|
+
getGettyEndpoint: '',
|
|
15
16
|
};
|
|
16
17
|
const supportedFileExtensions = ['jpg', 'png', 'gif'];
|
|
17
18
|
const mediaType = 'favicon';
|
|
@@ -3104,6 +3104,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
3104
3104
|
canUsePremiumFontFamily: boolean;
|
|
3105
3105
|
maxNumOfPages: number;
|
|
3106
3106
|
canUseRichTextEditor: boolean;
|
|
3107
|
+
canUseGettyVideos: boolean;
|
|
3107
3108
|
}>;
|
|
3108
3109
|
isAdmin: import("vue").ComputedRef<boolean>;
|
|
3109
3110
|
isBrandSite: import("vue").ComputedRef<boolean>;
|
package/package.json
CHANGED
|
@@ -65,6 +65,10 @@ 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();
|
|
68
72
|
|
|
69
73
|
const props = defineProps({
|
|
70
74
|
context: {
|
|
@@ -75,11 +79,6 @@ const props = defineProps({
|
|
|
75
79
|
type: Object as PropType<ShopViewModel>,
|
|
76
80
|
required: true,
|
|
77
81
|
},
|
|
78
|
-
currencySymbol: {
|
|
79
|
-
type: String,
|
|
80
|
-
required: false,
|
|
81
|
-
default: '$',
|
|
82
|
-
},
|
|
83
82
|
aspectRatio: {
|
|
84
83
|
type: String,
|
|
85
84
|
required: true,
|
|
@@ -95,11 +94,13 @@ const props = defineProps({
|
|
|
95
94
|
},
|
|
96
95
|
});
|
|
97
96
|
|
|
97
|
+
const currencySymbol = computed(() => shopSettingStore.currencySymbol);
|
|
98
|
+
|
|
98
99
|
const renderCurrencyAmount = (product: ProductModel): string => {
|
|
99
100
|
const variantPrice = product.variant?.[0]?.options?.[0]?.price;
|
|
100
101
|
const finalPrice = variantPrice ?? product.defaultPrice ?? '0';
|
|
101
102
|
|
|
102
|
-
return `${
|
|
103
|
+
return `${currencySymbol.value} ${finalPrice}`;
|
|
103
104
|
};
|
|
104
105
|
|
|
105
106
|
const emit = defineEmits(['on-product-detail']);
|
|
@@ -145,7 +145,6 @@ const paymentState = {
|
|
|
145
145
|
interface Props {
|
|
146
146
|
context: BrandPageContext;
|
|
147
147
|
isVisible: boolean;
|
|
148
|
-
currencySymbol: string;
|
|
149
148
|
buttonStyle: ButtonStyles;
|
|
150
149
|
shopPaymentConfig: BrandPagePaymentConfig;
|
|
151
150
|
descriptionStyle: TextStyleDeclaration | undefined;
|
|
@@ -154,7 +153,6 @@ interface Props {
|
|
|
154
153
|
|
|
155
154
|
const props = withDefaults(defineProps<Props>(), {
|
|
156
155
|
isVisible: true,
|
|
157
|
-
currencySymbol: '$',
|
|
158
156
|
});
|
|
159
157
|
|
|
160
158
|
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
|
-
{{
|
|
33
|
+
{{ currencySymbol }} {{ itemPrice }}
|
|
34
34
|
</p>
|
|
35
35
|
<div v-if="currentProduct.hasVariants">
|
|
36
36
|
<div
|
|
@@ -185,6 +185,7 @@ const cartSettingsStore = useCartStore();
|
|
|
185
185
|
const shopSettingStore = useShopConfigStore();
|
|
186
186
|
|
|
187
187
|
const products = computed(() => shopSettingStore.products);
|
|
188
|
+
const currencySymbol = computed(() => shopSettingStore.currencySymbol);
|
|
188
189
|
const currentProduct = computed(() => {
|
|
189
190
|
// Use the first product if currentProduct is not found
|
|
190
191
|
return (
|
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
:view-model="viewModel"
|
|
33
33
|
:context="context"
|
|
34
34
|
:item-style="itemStyle"
|
|
35
|
-
:currency-symbol="data.defaultCurrencySymbol"
|
|
36
35
|
@on-product-detail="onShowProductDetailModal"
|
|
37
36
|
/>
|
|
38
37
|
<ThumbnailDisplay
|
|
@@ -41,7 +40,6 @@
|
|
|
41
40
|
:context="context"
|
|
42
41
|
:aspect-ratio="aspectRatio"
|
|
43
42
|
:item-style="itemStyle"
|
|
44
|
-
:currency-symbol="data.defaultCurrencySymbol"
|
|
45
43
|
:content-index="contentIndex"
|
|
46
44
|
@on-product-detail="onShowProductDetailModal"
|
|
47
45
|
/>
|
|
@@ -51,7 +49,6 @@
|
|
|
51
49
|
:context="context"
|
|
52
50
|
:aspect-ratio="aspectRatio"
|
|
53
51
|
:item-style="itemStyle"
|
|
54
|
-
:currency-symbol="data.defaultCurrencySymbol"
|
|
55
52
|
:content-index="contentIndex"
|
|
56
53
|
@on-product-detail="onShowProductDetailModal"
|
|
57
54
|
/>
|
|
@@ -91,7 +88,6 @@
|
|
|
91
88
|
class="modal-product-detail"
|
|
92
89
|
:product="data.product"
|
|
93
90
|
:button-style="buttonStyle"
|
|
94
|
-
:currency-symbol="currencySymbol"
|
|
95
91
|
@on-close="onClose"
|
|
96
92
|
@on-show-success="onShowSuccess"
|
|
97
93
|
/>
|
|
@@ -99,7 +95,6 @@
|
|
|
99
95
|
class="modal-cart"
|
|
100
96
|
:is-visible="data.isCartModalVisible"
|
|
101
97
|
:button-style="buttonStyle"
|
|
102
|
-
:currency-symbol="currencySymbol"
|
|
103
98
|
@on-close="onCloseCart"
|
|
104
99
|
@on-show-payment="onShowPaymentModal"
|
|
105
100
|
/>
|
|
@@ -109,7 +104,6 @@
|
|
|
109
104
|
:is-visible="data.isPaymentModalVisible"
|
|
110
105
|
:button-style="buttonStyle"
|
|
111
106
|
:description-style="viewModel.descriptionStyle"
|
|
112
|
-
:currency-symbol="currencySymbol"
|
|
113
107
|
:shop-payment-config="shopPaymentConfig"
|
|
114
108
|
:context="context"
|
|
115
109
|
:success-message="viewModel.successMessage"
|
|
@@ -140,24 +134,18 @@ import PaymentModal from './PaymentModal.vue';
|
|
|
140
134
|
import brandPageClient from '../../clients/brand-page.client';
|
|
141
135
|
import raygunUtil from '../../utils/raygun.util';
|
|
142
136
|
import { shopTr } from '../../../composables/useTranslate';
|
|
137
|
+
import { useShopConfigStore } from '../../../shared/ecommerce-settings/store/shop-settings-store';
|
|
143
138
|
|
|
144
|
-
const props =
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
},
|
|
153
|
-
contentIndex: {
|
|
154
|
-
type: Number,
|
|
155
|
-
required: false,
|
|
156
|
-
default: undefined,
|
|
157
|
-
},
|
|
158
|
-
});
|
|
159
|
-
|
|
139
|
+
const props = withDefaults(
|
|
140
|
+
defineProps<{
|
|
141
|
+
context: BrandPageContext;
|
|
142
|
+
viewModel: ShopViewModel;
|
|
143
|
+
contentIndex: number;
|
|
144
|
+
}>(),
|
|
145
|
+
{},
|
|
146
|
+
);
|
|
160
147
|
const cartSettingsStore = useCartStore();
|
|
148
|
+
const shopSettingStore = useShopConfigStore();
|
|
161
149
|
|
|
162
150
|
const cart = computed(() => cartSettingsStore.cartItems);
|
|
163
151
|
|
|
@@ -201,9 +189,6 @@ const data = reactive({
|
|
|
201
189
|
isAddCartSuccess: false,
|
|
202
190
|
product: {} as ProductModel,
|
|
203
191
|
isActivePaymentProvider: false,
|
|
204
|
-
defaultCurrencySymbol:
|
|
205
|
-
props.viewModel.shopPaymentConfig?.paymentConfig?.defaultCurrencySymbol ??
|
|
206
|
-
'$',
|
|
207
192
|
});
|
|
208
193
|
|
|
209
194
|
const viewCartText = computed(() => {
|
|
@@ -274,15 +259,11 @@ const backgroundStyle = computed((): any => {
|
|
|
274
259
|
return props.viewModel.backgroundStyle;
|
|
275
260
|
});
|
|
276
261
|
|
|
277
|
-
const currencySymbol = computed((): any => {
|
|
278
|
-
return props.viewModel.shopPaymentConfig.paymentConfig?.defaultCurrencySymbol;
|
|
279
|
-
});
|
|
280
|
-
|
|
281
262
|
const shopPaymentConfig = computed((): BrandPagePaymentConfig => {
|
|
282
|
-
if (!
|
|
263
|
+
if (!shopSettingStore.paymentConfig) {
|
|
283
264
|
throw new Error('No Payment Config found');
|
|
284
265
|
}
|
|
285
|
-
return
|
|
266
|
+
return shopSettingStore.paymentConfig;
|
|
286
267
|
});
|
|
287
268
|
|
|
288
269
|
const isTextDisplayStyle = computed(() => {
|
|
@@ -34,6 +34,10 @@ 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();
|
|
37
41
|
|
|
38
42
|
const props = defineProps({
|
|
39
43
|
context: {
|
|
@@ -44,22 +48,19 @@ const props = defineProps({
|
|
|
44
48
|
type: Object as PropType<ShopViewModel>,
|
|
45
49
|
required: true,
|
|
46
50
|
},
|
|
47
|
-
currencySymbol: {
|
|
48
|
-
type: String,
|
|
49
|
-
required: false,
|
|
50
|
-
default: '$',
|
|
51
|
-
},
|
|
52
51
|
itemStyle: {
|
|
53
52
|
type: Object,
|
|
54
53
|
required: true,
|
|
55
54
|
},
|
|
56
55
|
});
|
|
57
56
|
|
|
57
|
+
const currencySymbol = computed(() => shopSettingStore.currencySymbol);
|
|
58
|
+
|
|
58
59
|
const renderCurrencyAmount = (product: ProductModel): string => {
|
|
59
60
|
const variantPrice = product.variant?.[0]?.options?.[0]?.price;
|
|
60
61
|
const finalPrice = variantPrice ?? product.defaultPrice ?? '0';
|
|
61
62
|
|
|
62
|
-
return `${
|
|
63
|
+
return `${currencySymbol.value} ${finalPrice}`;
|
|
63
64
|
};
|
|
64
65
|
|
|
65
66
|
const emit = defineEmits(['on-product-detail']);
|
|
@@ -51,6 +51,10 @@ 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();
|
|
54
58
|
|
|
55
59
|
const props = defineProps({
|
|
56
60
|
context: {
|
|
@@ -61,11 +65,6 @@ const props = defineProps({
|
|
|
61
65
|
type: Object as PropType<ShopViewModel>,
|
|
62
66
|
required: true,
|
|
63
67
|
},
|
|
64
|
-
currencySymbol: {
|
|
65
|
-
type: String,
|
|
66
|
-
required: false,
|
|
67
|
-
default: '$',
|
|
68
|
-
},
|
|
69
68
|
aspectRatio: {
|
|
70
69
|
type: String,
|
|
71
70
|
required: true,
|
|
@@ -81,11 +80,13 @@ const props = defineProps({
|
|
|
81
80
|
},
|
|
82
81
|
});
|
|
83
82
|
|
|
83
|
+
const currencySymbol = computed(() => shopSettingStore.currencySymbol);
|
|
84
|
+
|
|
84
85
|
const renderCurrencyAmount = (product: ProductModel): string => {
|
|
85
86
|
const variantPrice = product.variant?.[0]?.options?.[0]?.price;
|
|
86
87
|
const finalPrice = variantPrice ?? product.defaultPrice ?? '0';
|
|
87
88
|
|
|
88
|
-
return `${
|
|
89
|
+
return `${currencySymbol.value} ${finalPrice}`;
|
|
89
90
|
};
|
|
90
91
|
|
|
91
92
|
const emit = defineEmits(['on-product-detail']);
|
|
@@ -1461,6 +1461,7 @@ 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',
|
|
1464
1465
|
},
|
|
1465
1466
|
}),
|
|
1466
1467
|
};
|
package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.ts
CHANGED
|
@@ -86,6 +86,7 @@ export const userFeatures: UserFeatures = {
|
|
|
86
86
|
canUseRichTextEditor: true,
|
|
87
87
|
canUsePremiumFontFamily: true,
|
|
88
88
|
maxNumOfPages: DEFAULT_MAX_NUM_OF_PAGES,
|
|
89
|
+
canUseGettyVideos: false,
|
|
89
90
|
};
|
|
90
91
|
|
|
91
92
|
export const BRAND_PAGE: BrandPageData = {
|
|
@@ -2121,6 +2122,7 @@ export const INITIALISE_PAYLOAD: InitialisePayload = Object.freeze({
|
|
|
2121
2122
|
canUseRichTextEditor: false,
|
|
2122
2123
|
canUsePremiumFontFamily: true,
|
|
2123
2124
|
maxNumOfPages: UNLIMITED_MAX_NUM_OF_PAGES,
|
|
2125
|
+
canUseGettyVideos: true,
|
|
2124
2126
|
},
|
|
2125
2127
|
logoDraftDesignAttributes: simpleLogoDesignAttributes,
|
|
2126
2128
|
backUrl: '',
|
|
@@ -153,28 +153,23 @@ import {
|
|
|
153
153
|
import { computed } from 'vue';
|
|
154
154
|
import ProductItemField from './ProductItemField.vue';
|
|
155
155
|
import { useProductConfigStore } from '../../../brand-page-maker/stores/product-config/product-config-store';
|
|
156
|
+
import { useShopConfigStore } from '../../../shared/ecommerce-settings/store/shop-settings-store';
|
|
156
157
|
import NumberInput from '../../../shared/common/NumberInput.vue';
|
|
157
158
|
import { errorTr } from '../../../composables/useTranslate';
|
|
158
159
|
import { productTr } from '../../../composables/useTranslate';
|
|
159
160
|
|
|
160
161
|
const productSettingStore = useProductConfigStore();
|
|
162
|
+
const shopConfigStore = useShopConfigStore();
|
|
161
163
|
const imageUrl = computed(() => productSettingStore.productImageUrl);
|
|
162
164
|
const MAX_PAYMENT_DESCRIPTION_LENGTH = 255;
|
|
163
165
|
const MAX_PAYMENT_TITLE_LENGTH = 100;
|
|
164
166
|
const MAX_PAYMENT_DESCRIPTION_REACHED_MSG = () =>
|
|
165
167
|
errorTr('maxCharactersDescription');
|
|
166
168
|
const MAX_PAYMENT_TITLE_REACHED_MSG = () => errorTr('maxCharactersTitle');
|
|
167
|
-
interface Props {
|
|
168
|
-
currencySymbol: string;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
// TODO: currency need to be from productConfigStore
|
|
172
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
173
|
-
currencySymbol: '$',
|
|
174
|
-
});
|
|
175
169
|
|
|
176
170
|
const enableNotes = computed(() => productSettingStore.productEnableNotes);
|
|
177
171
|
const hasVariants = computed(() => productSettingStore.productHasVariants);
|
|
172
|
+
const currencySymbol = computed(() => shopConfigStore.currencySymbol);
|
|
178
173
|
|
|
179
174
|
const emit = defineEmits(['update:modelValue']);
|
|
180
175
|
|
|
@@ -430,7 +430,7 @@ const shopReplaceImageSettings =
|
|
|
430
430
|
|
|
431
431
|
const bannerSectionReplaceImageSettings =
|
|
432
432
|
(): ContentReplaceImageSettings<BannerSectionContent> => ({
|
|
433
|
-
tabs: ['MY_UPLOADS', 'IMAGE_LIBRARY', 'SHAPE_LIBRARY'],
|
|
433
|
+
tabs: ['MY_UPLOADS', 'IMAGE_LIBRARY', 'VIDEO_LIBRARY', 'SHAPE_LIBRARY'],
|
|
434
434
|
buttonTitleAdd: contentSettingsTr(`addImageButtonTitle`),
|
|
435
435
|
titleAdd: contentSettingsTr(`addImageHeaderTitle`),
|
|
436
436
|
titleReplace: contentSettingsTr(`imageReplaceTitle`),
|
|
@@ -2993,7 +2993,7 @@ export const SHOP_SECTION_SETTINGS_CONFIG = (): ContentSettingsConfig<
|
|
|
2993
2993
|
shouldRender: false,
|
|
2994
2994
|
},
|
|
2995
2995
|
paymentConfig: {
|
|
2996
|
-
type: 'payment-config',
|
|
2996
|
+
type: 'shop-payment-config',
|
|
2997
2997
|
groupId: REQUEST_PAYMENT_GROUPS.settings,
|
|
2998
2998
|
overrideValueFieldName: 'shopPaymentConfig',
|
|
2999
2999
|
},
|
|
@@ -43,6 +43,7 @@ export const DEFAULT_USER_ENDPOINTS: Readonly<Endpoints> = {
|
|
|
43
43
|
getAllUserMediaEndpoint: GET_ALL_USER_MEDIA_ENDPOINT,
|
|
44
44
|
userPolicyDataEndpoint: USER_POLICY_DATA_ENDPOINT,
|
|
45
45
|
getUnsplashMediaRootEndpoint: '',
|
|
46
|
+
getGettyEndpoint: '',
|
|
46
47
|
} as const;
|
|
47
48
|
|
|
48
49
|
export const DEFAULT_ADMIN_ENDPOINTS: Readonly<Endpoints> = {
|
|
@@ -51,4 +52,5 @@ export const DEFAULT_ADMIN_ENDPOINTS: Readonly<Endpoints> = {
|
|
|
51
52
|
getAllUserMediaEndpoint: GET_ALL_ADMIN_MEDIA_ENDPOINT,
|
|
52
53
|
userPolicyDataEndpoint: ADMIN_POLICY_DATA_ENDPOINT,
|
|
53
54
|
getUnsplashMediaRootEndpoint: '',
|
|
55
|
+
getGettyEndpoint: '',
|
|
54
56
|
} as const;
|
|
@@ -29,6 +29,7 @@ export const useBrandPageMakerUserStore = defineStore('brandPageMakerUser', {
|
|
|
29
29
|
canUseRichTextEditor: false,
|
|
30
30
|
canUsePremiumFontFamily: false,
|
|
31
31
|
maxNumOfPages: DEFAULT_MAX_NUM_OF_PAGES,
|
|
32
|
+
canUseGettyVideos: false,
|
|
32
33
|
},
|
|
33
34
|
emailAddress: '',
|
|
34
35
|
hasBrandPagePremiumSubscription: false,
|
|
@@ -625,6 +625,7 @@
|
|
|
625
625
|
"myUploads": "Meine Uploads",
|
|
626
626
|
"myDesigns": "Meine Designs",
|
|
627
627
|
"imageLibrary": "Bilderbibliothek",
|
|
628
|
+
"videoLibrary": "Videobibliothek",
|
|
628
629
|
"shapeLibrary": "Formbibliothek"
|
|
629
630
|
},
|
|
630
631
|
"shapeField": {
|
|
@@ -839,5 +840,11 @@
|
|
|
839
840
|
"applyMessage": "Das gilt für alle Logos auf Ihrer Website.",
|
|
840
841
|
"cancelLabel": "Abbrechen",
|
|
841
842
|
"continueLabel": "Weiter"
|
|
843
|
+
},
|
|
844
|
+
"videoLibrary": {
|
|
845
|
+
"poweredBy": "Powered by",
|
|
846
|
+
"emptyState": "Ihr Browser unterstützt keine eingebetteten Videos.",
|
|
847
|
+
"loadMoreVideos": "Weitere Videos laden",
|
|
848
|
+
"supported": "Ihr Browser unterstützt keine eingebetteten Videos."
|
|
842
849
|
}
|
|
843
850
|
}
|
|
@@ -625,6 +625,7 @@
|
|
|
625
625
|
"myUploads": "Mis subidas",
|
|
626
626
|
"myDesigns": "Mis diseños",
|
|
627
627
|
"imageLibrary": "Biblioteca de imágenes",
|
|
628
|
+
"videoLibrary": "Videoteca",
|
|
628
629
|
"shapeLibrary": "Biblioteca de Formas"
|
|
629
630
|
},
|
|
630
631
|
"shapeField": {
|
|
@@ -839,5 +840,11 @@
|
|
|
839
840
|
"applyMessage": "Esto se aplicará a todos los logos de tu sitio web.",
|
|
840
841
|
"cancelLabel": "Cancelar",
|
|
841
842
|
"continueLabel": "Continuar"
|
|
843
|
+
},
|
|
844
|
+
"videoLibrary": {
|
|
845
|
+
"poweredBy": "Desarrollado por",
|
|
846
|
+
"emptyState": "Lo sentimos, tu navegador no admite vídeos incrustados.",
|
|
847
|
+
"loadMoreVideos": "Carga más vídeos",
|
|
848
|
+
"supported": "Lo sentimos, tu navegador no admite vídeos incrustados."
|
|
842
849
|
}
|
|
843
850
|
}
|
|
@@ -625,6 +625,7 @@
|
|
|
625
625
|
"myUploads": "Mes importations",
|
|
626
626
|
"myDesigns": "Mes créations",
|
|
627
627
|
"imageLibrary": "Bibliothèque d’images",
|
|
628
|
+
"videoLibrary": "Vidéothèque",
|
|
628
629
|
"shapeLibrary": "Bibliothèque de formes"
|
|
629
630
|
},
|
|
630
631
|
"shapeField": {
|
|
@@ -839,5 +840,11 @@
|
|
|
839
840
|
"applyMessage": "Cela s’appliquera à tous les logos de votre site Web.",
|
|
840
841
|
"cancelLabel": "Annuler",
|
|
841
842
|
"continueLabel": "Continuer"
|
|
843
|
+
},
|
|
844
|
+
"videoLibrary": {
|
|
845
|
+
"poweredBy": "Alimenté par",
|
|
846
|
+
"emptyState": "Désolé, votre navigateur ne prend pas en charge les vidéos intégrées.",
|
|
847
|
+
"loadMoreVideos": "Charger plus de vidéos",
|
|
848
|
+
"supported": "Désolé, votre navigateur ne prend pas en charge les vidéos intégrées."
|
|
842
849
|
}
|
|
843
850
|
}
|
|
@@ -625,6 +625,7 @@
|
|
|
625
625
|
"myUploads": "Mes importations",
|
|
626
626
|
"myDesigns": "Mes créations",
|
|
627
627
|
"imageLibrary": "Bibliothèque d’images",
|
|
628
|
+
"videoLibrary": "Vidéothèque",
|
|
628
629
|
"shapeLibrary": "Bibliothèque de formes"
|
|
629
630
|
},
|
|
630
631
|
"shapeField": {
|
|
@@ -839,5 +840,11 @@
|
|
|
839
840
|
"applyMessage": "Cela s’appliquera à tous les logos de votre site Web.",
|
|
840
841
|
"cancelLabel": "Annuler",
|
|
841
842
|
"continueLabel": "Continuer"
|
|
843
|
+
},
|
|
844
|
+
"videoLibrary": {
|
|
845
|
+
"poweredBy": "Alimenté par",
|
|
846
|
+
"emptyState": "Désolé, votre navigateur ne prend pas en charge les vidéos intégrées.",
|
|
847
|
+
"loadMoreVideos": "Charger plus de vidéos",
|
|
848
|
+
"supported": "Désolé, votre navigateur ne prend pas en charge les vidéos intégrées."
|
|
842
849
|
}
|
|
843
850
|
}
|
|
@@ -625,6 +625,7 @@
|
|
|
625
625
|
"myUploads": "My Uploads",
|
|
626
626
|
"myDesigns": "My Designs",
|
|
627
627
|
"imageLibrary": "Image Library",
|
|
628
|
+
"videoLibrary": "Video Library",
|
|
628
629
|
"shapeLibrary": "Shape Library"
|
|
629
630
|
},
|
|
630
631
|
"shapeField": {
|
|
@@ -839,5 +840,11 @@
|
|
|
839
840
|
"applyMessage": "This will apply to all the logos in your website.",
|
|
840
841
|
"cancelLabel": "Cancel",
|
|
841
842
|
"continueLabel": "Continue"
|
|
843
|
+
},
|
|
844
|
+
"videoLibrary": {
|
|
845
|
+
"poweredBy": "Powered by",
|
|
846
|
+
"emptyState": "Sorry, your browser doesn't support embedded videos.",
|
|
847
|
+
"loadMoreVideos": "Load more videos",
|
|
848
|
+
"supported": "Sorry, your browser doesn't support embedded videos."
|
|
842
849
|
}
|
|
843
850
|
}
|
|
@@ -625,6 +625,7 @@
|
|
|
625
625
|
"myUploads": "Meus uploads",
|
|
626
626
|
"myDesigns": "Meus designs",
|
|
627
627
|
"imageLibrary": "Biblioteca de imagens",
|
|
628
|
+
"videoLibrary": "Biblioteca de vídeos",
|
|
628
629
|
"shapeLibrary": "Biblioteca de formas"
|
|
629
630
|
},
|
|
630
631
|
"shapeField": {
|
|
@@ -839,5 +840,11 @@
|
|
|
839
840
|
"applyMessage": "Isso se aplicará a todos os logotipos do seu site.",
|
|
840
841
|
"cancelLabel": "Cancelar",
|
|
841
842
|
"continueLabel": "Continuar"
|
|
843
|
+
},
|
|
844
|
+
"videoLibrary": {
|
|
845
|
+
"poweredBy": "Assegurado por",
|
|
846
|
+
"emptyState": "Seu navegador não aceita vídeos incorporados.",
|
|
847
|
+
"loadMoreVideos": "Carregar mais vídeos",
|
|
848
|
+
"supported": "Seu navegador não aceita vídeos incorporados."
|
|
842
849
|
}
|
|
843
850
|
}
|
|
@@ -625,6 +625,7 @@
|
|
|
625
625
|
"myUploads": "Os meus carregamentos",
|
|
626
626
|
"myDesigns": "Os meus designs",
|
|
627
627
|
"imageLibrary": "Biblioteca de imagens",
|
|
628
|
+
"videoLibrary": "Videoteca",
|
|
628
629
|
"shapeLibrary": "Biblioteca de Formas"
|
|
629
630
|
},
|
|
630
631
|
"shapeField": {
|
|
@@ -839,5 +840,11 @@
|
|
|
839
840
|
"applyMessage": "Isto vai aplicar-se a todos os logótipos no seu website.",
|
|
840
841
|
"cancelLabel": "Cancelar",
|
|
841
842
|
"continueLabel": "Continuar"
|
|
843
|
+
},
|
|
844
|
+
"videoLibrary": {
|
|
845
|
+
"poweredBy": "Assegurado por",
|
|
846
|
+
"emptyState": "Lamentamos, mas o seu navegador não suporta vídeos incorporados.",
|
|
847
|
+
"loadMoreVideos": "Carregar mais vídeos",
|
|
848
|
+
"supported": "Lamentamos, mas o seu navegador não suporta vídeos incorporados."
|
|
842
849
|
}
|
|
843
850
|
}
|
|
@@ -201,6 +201,7 @@ const videoTr = (key, valuesToInterpolate = {}) =>
|
|
|
201
201
|
tr(`video.${key}`, valuesToInterpolate);
|
|
202
202
|
const confirmModalTr = (key, valuesToInterpolate = {}) =>
|
|
203
203
|
tr(`confirmModal.${key}`, valuesToInterpolate);
|
|
204
|
+
const videoLibraryTr = (key) => tr(`videoLibrary.${key}`);
|
|
204
205
|
const logoSwitchConfirmationModalTr = (key, valuesToInterpolate = {}) =>
|
|
205
206
|
tr(`logoSwitchConfirmationModal.${key}`, valuesToInterpolate);
|
|
206
207
|
const logoTemplateSearchModalTr = (key, valuesToInterpolate = {}) =>
|
|
@@ -299,6 +300,7 @@ export {
|
|
|
299
300
|
videoTr,
|
|
300
301
|
bookingUrlFieldTr,
|
|
301
302
|
confirmModalTr,
|
|
303
|
+
videoLibraryTr,
|
|
302
304
|
logoSwitchConfirmationModalTr,
|
|
303
305
|
logoTemplateSearchModalTr,
|
|
304
306
|
};
|
package/src/constants/ui.ts
CHANGED