@designcrowd/library.brand-page 5.15.2 → 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-CC0IFuTS.js → CreatedOnBrandCrowd-de-de-P6321XBu.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-DHSPJreq.js → CreatedOnBrandCrowd-en-us-CB2Vbc_1.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-D0Z2Ftc8.js → CreatedOnBrandCrowd-es-es-BUzOkzZ1.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-B5m-vPKs.js → CreatedOnBrandCrowd-fr-ca-BGhklGg-.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-B5m-vPKs.js → CreatedOnBrandCrowd-fr-fr-BGhklGg-.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-BUldaocW.js → CreatedOnBrandCrowd-pt-br-DjkF8yHg.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-BUldaocW.js → CreatedOnBrandCrowd-pt-pt-DjkF8yHg.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-FfVsOpHR.js → CreatedOnDcom-de-de-Blsa8CUj.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-D-MPmkgN.js → CreatedOnDcom-en-us-CBk25ntF.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-CNC_3nv0.js → CreatedOnDcom-es-es-D1ghG1-O.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-DzqdFn7y.js → CreatedOnDcom-fr-ca-C0igjVq3.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-rBYGR5It.js → CreatedOnDcom-fr-fr-BAO9DjJx.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-CDu8WIMK.js → CreatedOnDcom-pt-br-DIq8gG3f.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-Dx-OKM33.js → CreatedOnDcom-pt-pt-De83jTtG.js} +1 -1
- 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 +1 -1
- 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 +46 -0
- package/lib/src/css/library.brand-page-brandPage.min.css +46 -0
- package/lib/src/css/library.brand-page-designCom.min.css +46 -0
- package/lib/src/css/library.brand-page-preview.min.css +46 -0
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-BreGHBnl.js → lib-B3T2jOqU.js} +10696 -10485
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.stories.js +1 -0
- 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/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-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/constants/config-settings-constant.ts +1 -1
- 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/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/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();
|
|
@@ -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";
|
|
@@ -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
|
@@ -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: '',
|
|
@@ -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`),
|
|
@@ -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
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
:is-delete-enabled="isDeleteEnabled"
|
|
53
53
|
:media-type="mediaType"
|
|
54
54
|
:supported-file-extensions="imageExtension"
|
|
55
|
-
:desired-width="mediaSettings
|
|
56
|
-
:desired-height="mediaSettings
|
|
57
|
-
:max-file-size="mediaSettings
|
|
58
|
-
:max-files="mediaSettings
|
|
55
|
+
:desired-width="mediaSettings?.desiredWidth"
|
|
56
|
+
:desired-height="mediaSettings?.desiredHeight"
|
|
57
|
+
:max-file-size="mediaSettings?.maxFilesize"
|
|
58
|
+
:max-files="mediaSettings?.maxFiles"
|
|
59
59
|
@on-select-image="onImageSelected"
|
|
60
60
|
@on-delete-image="onDeleteImage"
|
|
61
61
|
/>
|
|
@@ -65,6 +65,9 @@
|
|
|
65
65
|
<div v-if="tab.id === 'IMAGE_LIBRARY'">
|
|
66
66
|
<UnsplashLibrary @on-select-image="onDesignSelected" />
|
|
67
67
|
</div>
|
|
68
|
+
<div v-if="tab.id === 'VIDEO_LIBRARY'">
|
|
69
|
+
<VideoLibrary @on-select-video="onDesignSelected" />
|
|
70
|
+
</div>
|
|
68
71
|
<div v-if="tab.id === 'SHAPE_LIBRARY'">
|
|
69
72
|
<ShapeLibrary @on-select-image="onShapeSelected" />
|
|
70
73
|
</div>
|
|
@@ -72,28 +75,221 @@
|
|
|
72
75
|
</div>
|
|
73
76
|
</div>
|
|
74
77
|
</template>
|
|
75
|
-
|
|
78
|
+
|
|
79
|
+
<script setup lang="ts">
|
|
80
|
+
import type { PropType } from 'vue';
|
|
81
|
+
import { computed, ref, onMounted } from 'vue';
|
|
76
82
|
import { Button } from '@designcrowd/fe-shared-lib';
|
|
77
83
|
import MyUploads from '../../../my-uploads/MyUploads.vue';
|
|
78
84
|
import MyDesigns from '../../../my-designs/MyDesigns.vue';
|
|
79
85
|
import IconLibrary from '../icon-library/IconLibrary.vue';
|
|
80
|
-
import ReplaceImageBaseSettings from './ReplaceImageBaseSettings.mixin';
|
|
81
86
|
import UnsplashLibrary from '../../../unsplash-library/UnsplashLibrary.vue';
|
|
82
87
|
import ShapeLibrary from '../../../shape-library/ShapeLibrary.vue';
|
|
83
|
-
import
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
88
|
+
import VideoLibrary from '../../../video-library/VideoLibrary.vue';
|
|
89
|
+
import type {
|
|
90
|
+
Tab,
|
|
91
|
+
ReplaceImageSettingsTabId,
|
|
92
|
+
ReplaceImageSettingsBase,
|
|
93
|
+
} from '../../models';
|
|
94
|
+
import type { UserMediaItemWithDimensions } from '../../../my-uploads/models';
|
|
95
|
+
import {
|
|
96
|
+
useBrandPageContainerStore,
|
|
97
|
+
useBrandPageMakerUserStore,
|
|
98
|
+
type BrandPageSettingsMode,
|
|
99
|
+
} from '../../../../brand-page-maker/stores';
|
|
100
|
+
import axios from 'axios';
|
|
101
|
+
import { getColorReplacementsFromSvgString } from '../../../../brand-page/utils/svg-color.util';
|
|
102
|
+
import { commonTr, tr } from '../../../../composables/useTranslate';
|
|
103
|
+
|
|
104
|
+
const imageSettingTr = (key: string) => tr(`replaceImageSetting.${key}`);
|
|
105
|
+
|
|
106
|
+
// Props
|
|
107
|
+
const props = defineProps({
|
|
108
|
+
mediaSettings: {
|
|
109
|
+
type: Object as PropType<ReplaceImageSettingsBase>,
|
|
110
|
+
required: false,
|
|
111
|
+
default: undefined,
|
|
112
|
+
},
|
|
113
|
+
imageExtension: {
|
|
114
|
+
type: Array as PropType<string[]>,
|
|
115
|
+
required: false,
|
|
116
|
+
default: () => ['.jpg', '.jpeg', '.png'],
|
|
117
|
+
},
|
|
118
|
+
mode: {
|
|
119
|
+
type: Object as PropType<BrandPageSettingsMode>,
|
|
120
|
+
required: true,
|
|
121
|
+
},
|
|
122
|
+
isAdmin: {
|
|
123
|
+
type: Boolean,
|
|
124
|
+
required: true,
|
|
125
|
+
default: false,
|
|
126
|
+
},
|
|
127
|
+
activeTabs: {
|
|
128
|
+
type: Array as PropType<ReplaceImageSettingsTabId[]>,
|
|
129
|
+
required: true,
|
|
130
|
+
},
|
|
131
|
+
mediaType: {
|
|
132
|
+
type: String,
|
|
133
|
+
required: false,
|
|
134
|
+
default: '',
|
|
135
|
+
},
|
|
136
|
+
sectionTitle: {
|
|
137
|
+
type: String,
|
|
138
|
+
required: false,
|
|
139
|
+
default: '',
|
|
140
|
+
},
|
|
141
|
+
transparentBg: {
|
|
142
|
+
type: Boolean,
|
|
143
|
+
required: true,
|
|
144
|
+
default: false,
|
|
145
|
+
},
|
|
146
|
+
stickyBackBtn: {
|
|
147
|
+
type: Boolean,
|
|
148
|
+
required: true,
|
|
149
|
+
default: true,
|
|
150
|
+
},
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
// Emits
|
|
154
|
+
const emit = defineEmits<{
|
|
155
|
+
'on-back': [];
|
|
156
|
+
'on-image-picked': [
|
|
157
|
+
image: Pick<
|
|
158
|
+
UserMediaItemWithDimensions,
|
|
159
|
+
'url' | 'minimisedUrl' | 'width' | 'height'
|
|
160
|
+
>,
|
|
161
|
+
mediaType: string,
|
|
162
|
+
];
|
|
163
|
+
'on-image-removed': [
|
|
164
|
+
image: Pick<
|
|
165
|
+
UserMediaItemWithDimensions,
|
|
166
|
+
'url' | 'minimisedUrl' | 'width' | 'height'
|
|
167
|
+
>,
|
|
168
|
+
];
|
|
169
|
+
'on-design-selected': [image: UserMediaItemWithDimensions];
|
|
170
|
+
'on-shape-selected': [
|
|
171
|
+
shape: {
|
|
172
|
+
imageUrl: string;
|
|
173
|
+
width: number;
|
|
174
|
+
height: number;
|
|
175
|
+
colorReplacements: any;
|
|
176
|
+
aspectRatio: number;
|
|
177
|
+
},
|
|
178
|
+
];
|
|
179
|
+
}>();
|
|
180
|
+
|
|
181
|
+
const containerStore = useBrandPageContainerStore();
|
|
182
|
+
const userStore = useBrandPageMakerUserStore();
|
|
183
|
+
|
|
184
|
+
const isPrePurchase = computed(() => containerStore.isPrePurchase);
|
|
185
|
+
const canUseGettyVideos = computed(() => userStore.features.canUseGettyVideos);
|
|
186
|
+
|
|
187
|
+
const tabs = ref<Tab[]>([
|
|
188
|
+
{
|
|
189
|
+
id: 'ICON',
|
|
190
|
+
label: imageSettingTr('icon'),
|
|
191
|
+
active: false,
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
id: 'MY_UPLOADS',
|
|
195
|
+
label: imageSettingTr('myUploads'),
|
|
196
|
+
active: false,
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
id: 'MY_DESIGNS',
|
|
200
|
+
label: imageSettingTr('myDesigns'),
|
|
201
|
+
active: false,
|
|
93
202
|
},
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
203
|
+
{
|
|
204
|
+
id: 'IMAGE_LIBRARY',
|
|
205
|
+
label: imageSettingTr('imageLibrary'),
|
|
206
|
+
active: false,
|
|
97
207
|
},
|
|
208
|
+
{
|
|
209
|
+
id: 'VIDEO_LIBRARY',
|
|
210
|
+
label: imageSettingTr('videoLibrary'),
|
|
211
|
+
active: false,
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
id: 'SHAPE_LIBRARY',
|
|
215
|
+
label: imageSettingTr('shapeLibrary'),
|
|
216
|
+
active: false,
|
|
217
|
+
},
|
|
218
|
+
]);
|
|
219
|
+
|
|
220
|
+
const enabledTabs = computed(() => {
|
|
221
|
+
return tabs.value
|
|
222
|
+
.filter((x) => x.id !== 'MY_DESIGNS' || !props.isAdmin)
|
|
223
|
+
.filter(
|
|
224
|
+
(x) =>
|
|
225
|
+
x.id !== 'VIDEO_LIBRARY' || (canUseGettyVideos.value && props.isAdmin),
|
|
226
|
+
)
|
|
227
|
+
.filter(
|
|
228
|
+
(x) =>
|
|
229
|
+
props.activeTabs.some((y) => y === x.id) &&
|
|
230
|
+
(!isPrePurchase.value || x.id !== 'MY_DESIGNS'),
|
|
231
|
+
);
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
const isDeleteEnabled = computed(() => true);
|
|
235
|
+
|
|
236
|
+
// Methods
|
|
237
|
+
const onBack = () => {
|
|
238
|
+
emit('on-back');
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
const onImageSelected = (
|
|
242
|
+
image: Pick<
|
|
243
|
+
UserMediaItemWithDimensions,
|
|
244
|
+
'url' | 'minimisedUrl' | 'width' | 'height'
|
|
245
|
+
>,
|
|
246
|
+
) => {
|
|
247
|
+
emit('on-image-picked', image, props.mediaType);
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
const onDeleteImage = (
|
|
251
|
+
image: Pick<
|
|
252
|
+
UserMediaItemWithDimensions,
|
|
253
|
+
'url' | 'minimisedUrl' | 'width' | 'height'
|
|
254
|
+
>,
|
|
255
|
+
) => {
|
|
256
|
+
emit('on-image-removed', image);
|
|
98
257
|
};
|
|
258
|
+
|
|
259
|
+
const onDesignSelected = (image: UserMediaItemWithDimensions) => {
|
|
260
|
+
emit('on-design-selected', image);
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
const switchActiveTab = (id: string) => {
|
|
264
|
+
tabs.value.forEach((tab: Tab) => {
|
|
265
|
+
tab.active = tab.id === id;
|
|
266
|
+
});
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
const onShapeSelected = async (image: UserMediaItemWithDimensions) => {
|
|
270
|
+
try {
|
|
271
|
+
const svgResponse = await axios.get<string>(image.url);
|
|
272
|
+
|
|
273
|
+
const colorReplacements = getColorReplacementsFromSvgString(
|
|
274
|
+
svgResponse.data,
|
|
275
|
+
);
|
|
276
|
+
|
|
277
|
+
emit('on-shape-selected', {
|
|
278
|
+
imageUrl: image.url,
|
|
279
|
+
width: image.width,
|
|
280
|
+
height: image.height,
|
|
281
|
+
colorReplacements,
|
|
282
|
+
aspectRatio: image.aspectRatio || 1,
|
|
283
|
+
});
|
|
284
|
+
} catch (error) {
|
|
285
|
+
console.error('Failed to load shape:', error);
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
// Lifecycle
|
|
290
|
+
onMounted(() => {
|
|
291
|
+
if (enabledTabs.value.length > 0) {
|
|
292
|
+
enabledTabs.value[0].active = true;
|
|
293
|
+
}
|
|
294
|
+
});
|
|
99
295
|
</script>
|
|
@@ -28,6 +28,7 @@ export interface FieldSettingsBase {
|
|
|
28
28
|
export const ReplaceImageSettingsTabIds = {
|
|
29
29
|
ICON: 'ICON',
|
|
30
30
|
IMAGE_LIBRARY: 'IMAGE_LIBRARY',
|
|
31
|
+
VIDEO_LIBRARY: 'VIDEO_LIBRARY',
|
|
31
32
|
MY_UPLOADS: 'MY_UPLOADS',
|
|
32
33
|
MY_DESIGNS: 'MY_DESIGNS',
|
|
33
34
|
SHAPE_LIBRARY: 'SHAPE_LIBRARY',
|
package/src/shared/models.ts
CHANGED
|
@@ -18,6 +18,7 @@ const defaultUserEndpoints: Endpoints = {
|
|
|
18
18
|
getAllUserMediaEndpoint: GET_ALL_USER_MEDIA_ENDPOINT,
|
|
19
19
|
userPolicyDataEndpoint: USER_POLICY_DATA_ENDPOINT,
|
|
20
20
|
getUnsplashMediaRootEndpoint: '',
|
|
21
|
+
getGettyEndpoint: '',
|
|
21
22
|
};
|
|
22
23
|
|
|
23
24
|
const supportedFileExtensions = ['jpg', 'png', 'gif'];
|