@designcrowd/library.brand-page 5.16.35 → 5.16.36
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-86kFDsjd.js → CreatedOnBrandCrowd-de-de-DVJiCllu.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-BhFAL2r4.js → CreatedOnBrandCrowd-en-us-C0ySCxIL.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-spGcLYbG.js → CreatedOnBrandCrowd-es-es-Lx2TeOFQ.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-DKe-tShk.js → CreatedOnBrandCrowd-fr-ca-hnZGTPjT.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-DKe-tShk.js → CreatedOnBrandCrowd-fr-fr-hnZGTPjT.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-DcT0oRzX.js → CreatedOnBrandCrowd-pt-br-DS1LjpsM.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-DcT0oRzX.js → CreatedOnBrandCrowd-pt-pt-DS1LjpsM.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-BMuHkNH2.js → CreatedOnDcom-de-de-CEb2I9b_.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-h174d2n3.js → CreatedOnDcom-en-us-BV3oETu_.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-B6D1xSPS.js → CreatedOnDcom-es-es-D4Y8_uzV.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-BE0ONxF_.js → CreatedOnDcom-fr-ca-D0zmS934.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-6tXvojla.js → CreatedOnDcom-fr-fr-nPvCDeF3.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-DZYu7pp5.js → CreatedOnDcom-pt-br-LnkzeH5-.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-DrGT23mO.js → CreatedOnDcom-pt-pt-BlRxxeSh.js} +1 -1
- package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +8 -10
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +10 -10
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +0 -2
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.js +47 -35
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.d.ts +2 -0
- package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.js +17 -18
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +4 -1
- package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.d.ts +8 -10
- package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/social-share/SocialShare.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +8 -10
- package/lib/src/brand-page-maker/composables/useEventTracker.d.ts +4 -0
- package/lib/src/brand-page-maker/composables/useEventTracker.js +19 -0
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.d.ts +1 -4
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +2 -4
- package/lib/src/brand-page-maker/stores/event-manager/event-manager-store.js +3 -3
- package/lib/src/brand-page-maker/stores/user/user-store.d.ts +8 -10
- package/lib/src/brand-page-maker/stores/user/user-store.js +9 -18
- package/lib/src/brand-page-maker/stores/video/video-store.d.ts +3 -0
- package/lib/src/brand-page-maker/stores/video/video-store.js +22 -0
- package/lib/src/{bundled-translations-CMyG8Azk.js → bundled-translations-EqxiRIwA.js} +13 -13
- package/lib/src/{bundled-translations.de-DE-BJPw07Ba.js → bundled-translations.de-DE-BKqVO-q2.js} +9 -9
- package/lib/src/{bundled-translations.es-ES-DqQ7zLxJ.js → bundled-translations.es-ES-DwKrkWcX.js} +12 -12
- package/lib/src/{bundled-translations.fr-CA-2dy4OokC.js → bundled-translations.fr-CA-BZtZzL79.js} +17 -17
- package/lib/src/{bundled-translations.fr-FR-Bjh3iNSg.js → bundled-translations.fr-FR-NgI1lWQl.js} +29 -29
- package/lib/src/{bundled-translations.pt-BR-BRC_B0LW.js → bundled-translations.pt-BR-DuqcSme7.js} +1 -1
- package/lib/src/{bundled-translations.pt-PT-Ka3E8T1F.js → bundled-translations.pt-PT-DDsgh_7r.js} +17 -17
- package/lib/src/bundles/bundled-translations.de-DE.json +14 -1
- package/lib/src/bundles/bundled-translations.es-ES.json +14 -1
- package/lib/src/bundles/bundled-translations.fr-CA.json +14 -1
- package/lib/src/bundles/bundled-translations.fr-FR.json +14 -1
- package/lib/src/bundles/bundled-translations.json +14 -1
- package/lib/src/bundles/bundled-translations.pt-BR.json +14 -1
- package/lib/src/bundles/bundled-translations.pt-PT.json +14 -1
- package/lib/src/composables/useTranslate.d.ts +1 -1
- package/lib/src/composables/useTranslate.js +1 -1
- package/lib/src/css/library.brand-page-brandCrowd.min.css +23 -20
- package/lib/src/css/library.brand-page-brandPage.min.css +24 -20
- package/lib/src/css/library.brand-page-designCom.min.css +23 -20
- package/lib/src/css/library.brand-page-preview.min.css +23 -20
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-WUyXDBI4.js → lib-DAR6PgGS.js} +18241 -18191
- package/lib/src/shared/background-settings/components/background-shapes/BackgroundShapeSettings.mixin.d.ts +7 -9
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +4 -1
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +78 -11
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.js +30 -3
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +3 -0
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +8 -10
- package/lib/src/shared/content-settings/components/image-field/ImageField.mixin.js +3 -0
- package/lib/src/shared/content-settings/components/page-dropdown-field/PageDropdownField.mixin.d.ts +7 -9
- package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.d.ts +3 -0
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +1 -1
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +11 -10
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +1 -1
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +4 -1
- package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +7 -9
- package/lib/src/shared/side-bar/components/SideBarTabButton.mixin.d.ts +3 -0
- package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +11 -10
- package/lib/src/shared/style-settings/components/StyleSettings.stories.js +8 -5
- package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.d.ts +3 -0
- package/package.json +2 -2
- package/src/brand-page/components/page/Page.vue +1 -1
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +0 -2
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.ts +52 -35
- package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.ts +19 -18
- package/src/brand-page-maker/composables/useEventTracker.ts +20 -0
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.test.ts +11 -6
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +1 -9
- package/src/brand-page-maker/stores/event-manager/event-manager-store.ts +3 -3
- package/src/brand-page-maker/stores/user/user-store.test.ts +2 -2
- package/src/brand-page-maker/stores/user/user-store.ts +17 -19
- package/src/brand-page-maker/stores/video/video-store.ts +30 -0
- package/src/bundles/bundled-translations.de-DE.json +14 -1
- package/src/bundles/bundled-translations.es-ES.json +14 -1
- package/src/bundles/bundled-translations.fr-CA.json +14 -1
- package/src/bundles/bundled-translations.fr-FR.json +14 -1
- package/src/bundles/bundled-translations.json +14 -1
- package/src/bundles/bundled-translations.pt-BR.json +14 -1
- package/src/bundles/bundled-translations.pt-PT.json +14 -1
- package/src/composables/useTranslate.ts +2 -1
- package/src/shared/background-settings/components/BackgroundSettings.vue +7 -5
- package/src/shared/background-settings/components/ReplaceImageSettingsForBackgroundSettings.vue +41 -1
- package/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.ts +43 -2
- package/src/shared/content-settings/components/image-field/ImageField.mixin.ts +4 -0
- package/src/shared/content-settings/components/replace-image-base-settings/ReplaceImageBaseSettings.vue +6 -5
- package/src/shared/page-settings/store/page-settings-store.test.ts +16 -2
- package/src/shared/style-settings/components/StyleSettings.stories.ts +12 -5
- package/src/shared/video-library/VideoLibrary.vue +6 -13
- package/src/shared/video-library/i18n/video-library.de-DE.json +14 -1
- package/src/shared/video-library/i18n/video-library.es-ES.json +14 -1
- package/src/shared/video-library/i18n/video-library.fr-CA.json +14 -1
- package/src/shared/video-library/i18n/video-library.fr-FR.json +14 -1
- package/src/shared/video-library/i18n/video-library.json +14 -1
- package/src/shared/video-library/i18n/video-library.pt-BR.json +14 -1
- package/src/shared/video-library/i18n/video-library.pt-PT.json +14 -1
|
@@ -920,9 +920,22 @@
|
|
|
920
920
|
"continueLabel": "Continuar"
|
|
921
921
|
},
|
|
922
922
|
"videoLibrary": {
|
|
923
|
+
"categories": {
|
|
924
|
+
"aerial": "Aéreo",
|
|
925
|
+
"beach": "Praia",
|
|
926
|
+
"business": "Negócio",
|
|
927
|
+
"cities": "Cidades",
|
|
928
|
+
"landscape": "Paisagem",
|
|
929
|
+
"nature": "Nature",
|
|
930
|
+
"people": "Pessoas",
|
|
931
|
+
"plants": "Plantas",
|
|
932
|
+
"sky": "Céu",
|
|
933
|
+
"sunrise": "Nascer do sol"
|
|
934
|
+
},
|
|
923
935
|
"poweredBy": "Assegurado por",
|
|
924
936
|
"emptyState": "Lamentamos, mas o seu navegador não suporta vídeos incorporados.",
|
|
925
937
|
"loadMoreVideos": "Carregar mais vídeos",
|
|
926
|
-
"supported": "Lamentamos, mas o seu navegador não suporta vídeos incorporados."
|
|
938
|
+
"supported": "Lamentamos, mas o seu navegador não suporta vídeos incorporados.",
|
|
939
|
+
"limitMessage": "Atingiu o limite de vídeos. Cada site permite até {{ videoLimit }} vídeos - remova um para adicionar outro."
|
|
927
940
|
}
|
|
928
941
|
}
|
|
@@ -203,7 +203,8 @@ const videoTr = (key, valuesToInterpolate = {}) =>
|
|
|
203
203
|
tr(`video.${key}`, valuesToInterpolate);
|
|
204
204
|
const confirmModalTr = (key, valuesToInterpolate = {}) =>
|
|
205
205
|
tr(`confirmModal.${key}`, valuesToInterpolate);
|
|
206
|
-
const videoLibraryTr = (key
|
|
206
|
+
const videoLibraryTr = (key, valuesToInterpolate = {}) =>
|
|
207
|
+
tr(`videoLibrary.${key}`, valuesToInterpolate);
|
|
207
208
|
const logoSwitchConfirmationModalTr = (key, valuesToInterpolate = {}) =>
|
|
208
209
|
tr(`logoSwitchConfirmationModal.${key}`, valuesToInterpolate);
|
|
209
210
|
const logoTemplateSearchModalTr = (key, valuesToInterpolate = {}) =>
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
</div>
|
|
92
92
|
</template>
|
|
93
93
|
<script setup lang="ts">
|
|
94
|
-
import { TabMenu, CollapsiblePanel
|
|
94
|
+
import { TabMenu, CollapsiblePanel } from '@designcrowd/fe-shared-lib';
|
|
95
95
|
import BackgroundColorSettings from './background-color/BackgroundColorSettings.vue';
|
|
96
96
|
import BackgroundShapeSettings from './background-shapes/BackgroundShapeSettings.vue';
|
|
97
97
|
import ImageField from '../../content-settings/components/image-field/ImageField.vue';
|
|
@@ -117,12 +117,14 @@ import {
|
|
|
117
117
|
} from '../../../brand-page';
|
|
118
118
|
import { backgroundSettingsTr } from '../../../composables/useTranslate';
|
|
119
119
|
import ReplaceImageSettingsForBackgroundSettings from './ReplaceImageSettingsForBackgroundSettings.vue';
|
|
120
|
+
import { useEventTracker } from '../../../brand-page-maker/composables/useEventTracker';
|
|
120
121
|
|
|
121
122
|
const backgroundSettingsStore = useUiBackgroundSettingsStore();
|
|
122
123
|
const userStore = useBrandPageMakerUserStore();
|
|
123
124
|
const containerStore = useBrandPageContainerStore();
|
|
124
125
|
const brandPageMakerStore = useBrandPageMakerStore();
|
|
125
126
|
const uiStore = useUiStore();
|
|
127
|
+
const bpEventTracker = useEventTracker();
|
|
126
128
|
|
|
127
129
|
const backgroundStyles = computed(
|
|
128
130
|
() => backgroundSettingsStore.backgroundStyles,
|
|
@@ -245,15 +247,15 @@ const onBackgroundMediaDeleted = (payload: {
|
|
|
245
247
|
name: string;
|
|
246
248
|
value: string;
|
|
247
249
|
}) => {
|
|
250
|
+
if (backgroundStyles.value?.media) {
|
|
251
|
+
bpEventTracker.sendGettyVideoRemoveEvent();
|
|
252
|
+
}
|
|
253
|
+
|
|
248
254
|
if (payload.value === '') {
|
|
249
255
|
backgroundSettingsStore.setBackgroundImageUrl({
|
|
250
256
|
backgroundImageUrl: '',
|
|
251
257
|
});
|
|
252
258
|
}
|
|
253
|
-
|
|
254
|
-
if (backgroundStyles.value?.media) {
|
|
255
|
-
backgroundSettingsStore.removeBackgroundVideo();
|
|
256
|
-
}
|
|
257
259
|
};
|
|
258
260
|
|
|
259
261
|
const selectShapeTab = (tab: string) => {
|
package/src/shared/background-settings/components/ReplaceImageSettingsForBackgroundSettings.vue
CHANGED
|
@@ -20,8 +20,10 @@
|
|
|
20
20
|
import { computed } from 'vue';
|
|
21
21
|
import ReplaceImageBaseSettings from '../../../shared/content-settings/components/replace-image-base-settings/ReplaceImageBaseSettings.vue';
|
|
22
22
|
import {
|
|
23
|
+
GETTY_VIDEO_LIMIT_FOR_SITE,
|
|
23
24
|
useBrandPageMakerStore,
|
|
24
25
|
useBrandPageMakerUserStore,
|
|
26
|
+
useVideoStore,
|
|
25
27
|
} from '../../../brand-page-maker/stores';
|
|
26
28
|
import { useUiBackgroundSettingsStore } from '../store';
|
|
27
29
|
import { BRANDPAGE_SETTINGS_MODES } from '../../../brand-page-maker/stores/brandpage-maker/brandpage-maker-store';
|
|
@@ -34,6 +36,9 @@ import type {
|
|
|
34
36
|
UserMediaItemWithDimensions,
|
|
35
37
|
} from '../../my-uploads/models';
|
|
36
38
|
import { MEDIA_TYPES } from '../../../brand-page/models/brand-page-context.model';
|
|
39
|
+
import { useUiContentSettingsStore } from '../../../shared/content-settings/store';
|
|
40
|
+
import { videoLibraryTr } from '../../../composables/useTranslate';
|
|
41
|
+
import { useEventTracker } from '../../../brand-page-maker/composables/useEventTracker';
|
|
37
42
|
|
|
38
43
|
interface Props {
|
|
39
44
|
mediaType?: string;
|
|
@@ -48,6 +53,9 @@ const imageExtension = ['.png', '.ico'];
|
|
|
48
53
|
const brandPageMakerStore = useBrandPageMakerStore();
|
|
49
54
|
const userStore = useBrandPageMakerUserStore();
|
|
50
55
|
const backgroundSettingsStore = useUiBackgroundSettingsStore();
|
|
56
|
+
const videoStore = useVideoStore();
|
|
57
|
+
const contentSettingsStore = useUiContentSettingsStore();
|
|
58
|
+
const bpEventTracker = useEventTracker();
|
|
51
59
|
|
|
52
60
|
const backgroundMode = computed(() => backgroundSettingsStore.backgroundMode);
|
|
53
61
|
const isAdmin = computed(() => userStore.isAdmin);
|
|
@@ -81,6 +89,10 @@ const mediaExtension = computed(() => {
|
|
|
81
89
|
}
|
|
82
90
|
});
|
|
83
91
|
|
|
92
|
+
const backgroundMedia = computed(
|
|
93
|
+
() => backgroundSettingsStore.backgroundStyles?.media,
|
|
94
|
+
);
|
|
95
|
+
|
|
84
96
|
const onImageSelected = async (
|
|
85
97
|
image: Pick<
|
|
86
98
|
UserMediaItemWithDimensions,
|
|
@@ -122,7 +134,35 @@ const onDesignSelected = (image: UserMediaItemWithDimensions) => {
|
|
|
122
134
|
});
|
|
123
135
|
};
|
|
124
136
|
|
|
125
|
-
const
|
|
137
|
+
const isCurrentlyVideoBackground = (): boolean => {
|
|
138
|
+
return backgroundMedia.value?.type === 'getty-video';
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const onVideoSelected = async (videoPayload: MediaBaseSelectedPayload) => {
|
|
142
|
+
if (!isCurrentlyVideoBackground()) {
|
|
143
|
+
if (!videoStore.canAddNewVideo) {
|
|
144
|
+
await contentSettingsStore.triggerLockedContentClickedEvent({
|
|
145
|
+
type: 'getty_video',
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (videoStore.hasReachedLimitForVideo) {
|
|
152
|
+
window.alert(
|
|
153
|
+
videoLibraryTr(`limitMessage`, {
|
|
154
|
+
videoLimit: GETTY_VIDEO_LIMIT_FOR_SITE,
|
|
155
|
+
}),
|
|
156
|
+
);
|
|
157
|
+
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
bpEventTracker.sendGettyVideoAddEvent();
|
|
162
|
+
} else {
|
|
163
|
+
bpEventTracker.sendGettyVideoReplaceEvent();
|
|
164
|
+
}
|
|
165
|
+
|
|
126
166
|
backgroundSettingsStore.setBackgroundMedia(videoPayload);
|
|
127
167
|
|
|
128
168
|
backgroundSettingsStore.setBackgroundMode({
|
|
@@ -14,13 +14,19 @@ import { useUiContentSettingsStore } from '../../store';
|
|
|
14
14
|
import {
|
|
15
15
|
useBrandPageMakerUserStore,
|
|
16
16
|
useBrandPageMakerStore,
|
|
17
|
+
useVideoStore,
|
|
18
|
+
GETTY_VIDEO_LIMIT_FOR_SITE,
|
|
17
19
|
} from '../../../../brand-page-maker/stores';
|
|
18
20
|
import { UI_EVENT_SOURCES } from '../../../models';
|
|
19
21
|
import type { PageSettingsStateSectionStyles } from '../../../page-settings/store';
|
|
20
22
|
import { useUiPageSettingsStore } from '../../../page-settings/store';
|
|
21
23
|
import type { PageSection } from '../../../page-settings/models';
|
|
22
24
|
import { MEDIA_TYPES } from '../../../../brand-page';
|
|
23
|
-
import {
|
|
25
|
+
import {
|
|
26
|
+
contentSettingsTr,
|
|
27
|
+
videoLibraryTr,
|
|
28
|
+
} from '../../../../composables/useTranslate';
|
|
29
|
+
import { useEventTracker } from '../../../../brand-page-maker/composables/useEventTracker';
|
|
24
30
|
|
|
25
31
|
export default defineComponent({
|
|
26
32
|
setup() {
|
|
@@ -28,6 +34,8 @@ export default defineComponent({
|
|
|
28
34
|
const contentSettingsStore = useUiContentSettingsStore();
|
|
29
35
|
const userStore = useBrandPageMakerUserStore();
|
|
30
36
|
const pageSettingsStore = useUiPageSettingsStore();
|
|
37
|
+
const videoStore = useVideoStore();
|
|
38
|
+
const bpEventTracker = useEventTracker();
|
|
31
39
|
|
|
32
40
|
return {
|
|
33
41
|
items: computed(() => contentSettingsStore.items),
|
|
@@ -49,6 +57,8 @@ export default defineComponent({
|
|
|
49
57
|
userStore,
|
|
50
58
|
pageSettingsStore,
|
|
51
59
|
brandPageMakerStore,
|
|
60
|
+
videoStore,
|
|
61
|
+
bpEventTracker,
|
|
52
62
|
viewport: computed(() => brandPageMakerStore.viewport),
|
|
53
63
|
};
|
|
54
64
|
},
|
|
@@ -177,6 +187,11 @@ export default defineComponent({
|
|
|
177
187
|
this.contentSettingsStore.popMode();
|
|
178
188
|
}
|
|
179
189
|
},
|
|
190
|
+
isCurrentlyVideoBackground() {
|
|
191
|
+
return (
|
|
192
|
+
this.selectedItem?.settings?.content?.media?.type === 'getty-video'
|
|
193
|
+
);
|
|
194
|
+
},
|
|
180
195
|
onDesignSelected(image: UserMediaItemWithDimensions) {
|
|
181
196
|
const imageUrl =
|
|
182
197
|
this.contentType === 'banner-section' ? image.rawImageUrl : image.url;
|
|
@@ -240,7 +255,33 @@ export default defineComponent({
|
|
|
240
255
|
});
|
|
241
256
|
this.contentSettingsStore.popMode();
|
|
242
257
|
},
|
|
243
|
-
onVideoSelected(videoPayload: MediaBaseSelectedPayload) {
|
|
258
|
+
async onVideoSelected(videoPayload: MediaBaseSelectedPayload) {
|
|
259
|
+
console.log('SELECTED ITEM: ', this.selectedItem);
|
|
260
|
+
|
|
261
|
+
if (!this.isCurrentlyVideoBackground()) {
|
|
262
|
+
if (!this.videoStore.canAddNewVideo) {
|
|
263
|
+
await this.contentSettingsStore.triggerLockedContentClickedEvent({
|
|
264
|
+
type: 'getty_video',
|
|
265
|
+
});
|
|
266
|
+
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
if (this.videoStore.hasReachedLimitForVideo) {
|
|
271
|
+
window.alert(
|
|
272
|
+
videoLibraryTr(`limitMessage`, {
|
|
273
|
+
videoLimit: GETTY_VIDEO_LIMIT_FOR_SITE,
|
|
274
|
+
}),
|
|
275
|
+
);
|
|
276
|
+
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
this.bpEventTracker.sendGettyVideoAddEvent();
|
|
281
|
+
} else {
|
|
282
|
+
this.bpEventTracker.sendGettyVideoReplaceEvent();
|
|
283
|
+
}
|
|
284
|
+
|
|
244
285
|
this.contentSettingsStore.setSelectedItemMedia(
|
|
245
286
|
this.selectedItemId,
|
|
246
287
|
videoPayload,
|
|
@@ -6,6 +6,7 @@ import type { ContentItemFieldSettings } from '../../models';
|
|
|
6
6
|
import { isURL } from '../../../../utils/validator.util';
|
|
7
7
|
import { commonTr } from '../../../../composables/useTranslate';
|
|
8
8
|
import { useVideoStore } from '../../../../brand-page-maker/stores/video/video-store';
|
|
9
|
+
import { useEventTracker } from '../../../../brand-page-maker/composables/useEventTracker';
|
|
9
10
|
|
|
10
11
|
const ACCEPTED_MIME_TYPES = 'image/png, image/jpeg, image/svg+xml';
|
|
11
12
|
|
|
@@ -122,8 +123,11 @@ export default defineComponent({
|
|
|
122
123
|
},
|
|
123
124
|
|
|
124
125
|
onRemove() {
|
|
126
|
+
const bpEventTracker = useEventTracker();
|
|
127
|
+
|
|
125
128
|
if (this.content?.media) {
|
|
126
129
|
this.content.media = undefined;
|
|
130
|
+
bpEventTracker.sendGettyVideoRemoveEvent();
|
|
127
131
|
}
|
|
128
132
|
|
|
129
133
|
this.imgValue = '';
|
|
@@ -36,6 +36,9 @@
|
|
|
36
36
|
:attrs="{
|
|
37
37
|
'data-test-tag': `${tab.id.toLowerCase()}_btn`,
|
|
38
38
|
}"
|
|
39
|
+
:icon-left="
|
|
40
|
+
tab.id === 'VIDEO_LIBRARY' ? 'premium-content' : undefined
|
|
41
|
+
"
|
|
39
42
|
@on-click.stop="switchActiveTab(tab.id)"
|
|
40
43
|
/>
|
|
41
44
|
</div>
|
|
@@ -190,6 +193,7 @@ const userStore = useBrandPageMakerUserStore();
|
|
|
190
193
|
|
|
191
194
|
const isPrePurchase = computed(() => containerStore.isPrePurchase);
|
|
192
195
|
const canUseGettyVideos = computed(() => userStore.features.canUseGettyVideos);
|
|
196
|
+
|
|
193
197
|
const isTabEnabled = ref(true);
|
|
194
198
|
|
|
195
199
|
const tabs = ref<Tab[]>([
|
|
@@ -228,15 +232,12 @@ const tabs = ref<Tab[]>([
|
|
|
228
232
|
const enabledTabs = computed(() => {
|
|
229
233
|
return tabs.value
|
|
230
234
|
.filter((x) => x.id !== 'MY_DESIGNS' || !props.isAdmin)
|
|
231
|
-
.filter(
|
|
232
|
-
(x) =>
|
|
233
|
-
x.id !== 'VIDEO_LIBRARY' || (canUseGettyVideos.value && props.isAdmin),
|
|
234
|
-
)
|
|
235
235
|
.filter(
|
|
236
236
|
(x) =>
|
|
237
237
|
props.activeTabs.some((y) => y === x.id) &&
|
|
238
238
|
(!isPrePurchase.value || x.id !== 'MY_DESIGNS'),
|
|
239
|
-
)
|
|
239
|
+
)
|
|
240
|
+
.filter((x) => x.id !== 'VIDEO_LIBRARY' || canUseGettyVideos.value);
|
|
240
241
|
});
|
|
241
242
|
|
|
242
243
|
const isDeleteEnabled = computed(() => true);
|
|
@@ -8,9 +8,11 @@ import type { ContentItem } from '../../content-settings/models';
|
|
|
8
8
|
import {
|
|
9
9
|
UNLIMITED_MAX_NUM_OF_PAGES,
|
|
10
10
|
useBrandPageMakerStore,
|
|
11
|
+
useBrandPageMakerUserStore,
|
|
11
12
|
} from '../../../brand-page-maker/stores';
|
|
12
13
|
import {
|
|
13
14
|
INITIALISE_PAYLOAD,
|
|
15
|
+
USER_FEATURES,
|
|
14
16
|
brandPageEmpty,
|
|
15
17
|
} from '../../../brand-page-maker/components/brand-page-maker/__fixtures__';
|
|
16
18
|
import { useUiPageSettingsStore } from './index';
|
|
@@ -67,11 +69,17 @@ describe('page store module', () => {
|
|
|
67
69
|
test('setNewPageModalVisibility should not show new page modal when user doesnt have permissions', async () => {
|
|
68
70
|
// Arrange
|
|
69
71
|
const store = useBrandPageMakerStore();
|
|
72
|
+
const userStore = useBrandPageMakerUserStore();
|
|
70
73
|
const pageSettingsStore = useUiPageSettingsStore();
|
|
71
74
|
|
|
72
75
|
const payload = INITIALISE_PAYLOAD;
|
|
73
76
|
|
|
74
|
-
|
|
77
|
+
userStore.setUserState({
|
|
78
|
+
features: {
|
|
79
|
+
...USER_FEATURES,
|
|
80
|
+
maxNumOfPages: 3,
|
|
81
|
+
},
|
|
82
|
+
});
|
|
75
83
|
|
|
76
84
|
await store.initialise(payload);
|
|
77
85
|
|
|
@@ -91,11 +99,17 @@ describe('page store module', () => {
|
|
|
91
99
|
test('setNewPageModalVisibility should show new page modal when user has permissions', async () => {
|
|
92
100
|
// Arrange
|
|
93
101
|
const store = useBrandPageMakerStore();
|
|
102
|
+
const userStore = useBrandPageMakerUserStore();
|
|
94
103
|
const pageSettingsStore = useUiPageSettingsStore();
|
|
95
104
|
|
|
96
105
|
const payload = INITIALISE_PAYLOAD;
|
|
97
106
|
|
|
98
|
-
|
|
107
|
+
userStore.setUserState({
|
|
108
|
+
features: {
|
|
109
|
+
...USER_FEATURES,
|
|
110
|
+
maxNumOfPages: UNLIMITED_MAX_NUM_OF_PAGES,
|
|
111
|
+
},
|
|
112
|
+
});
|
|
99
113
|
|
|
100
114
|
await store.initialise(payload);
|
|
101
115
|
|
|
@@ -2,8 +2,11 @@ import { defineComponent } from 'vue';
|
|
|
2
2
|
import { createPinia, setActivePinia } from 'pinia';
|
|
3
3
|
import StyleSettings from './StyleSettings.vue';
|
|
4
4
|
import { setupStoryPinia } from '../../../brand-page-maker/components/brand-page-maker/__fixtures__/store-fixture';
|
|
5
|
-
import {
|
|
6
|
-
|
|
5
|
+
import {
|
|
6
|
+
useBrandPageMakerStore,
|
|
7
|
+
useBrandPageMakerUserStore,
|
|
8
|
+
} from '../../../brand-page-maker/stores';
|
|
9
|
+
import { INITIALISE_PAYLOAD, USER_FEATURES } from '../../../brand-page-maker/components/brand-page-maker/__fixtures__';
|
|
7
10
|
|
|
8
11
|
export default {
|
|
9
12
|
title: 'Components/BrandPageMaker/StyleSettings',
|
|
@@ -30,16 +33,20 @@ export const Sample = () => {
|
|
|
30
33
|
export const HideBrandCrowdLogo = () => {
|
|
31
34
|
const pinia = setupStoryPinia();
|
|
32
35
|
|
|
36
|
+
const userStore = useBrandPageMakerUserStore();
|
|
33
37
|
const store = useBrandPageMakerStore();
|
|
34
38
|
|
|
35
|
-
|
|
36
|
-
...INITIALISE_PAYLOAD,
|
|
39
|
+
userStore.setUserState({
|
|
37
40
|
features: {
|
|
38
|
-
...
|
|
41
|
+
...USER_FEATURES,
|
|
39
42
|
showBrandCrowdLogo: false,
|
|
40
43
|
},
|
|
41
44
|
});
|
|
42
45
|
|
|
46
|
+
store.initialise({
|
|
47
|
+
...INITIALISE_PAYLOAD,
|
|
48
|
+
});
|
|
49
|
+
|
|
43
50
|
return defineComponent({
|
|
44
51
|
components: {
|
|
45
52
|
StyleSettings,
|
|
@@ -22,12 +22,16 @@
|
|
|
22
22
|
<button
|
|
23
23
|
class="c-media-btn tw-p-0 tw-border-none tw-cursor-pointer tw-relative"
|
|
24
24
|
:data-test-video-library-category="videoCategory.categoryName"
|
|
25
|
-
@click="
|
|
25
|
+
@click="
|
|
26
|
+
onCategoryClicked(
|
|
27
|
+
videoLibraryTr(`categories.${videoCategory.categoryName}`),
|
|
28
|
+
)
|
|
29
|
+
"
|
|
26
30
|
>
|
|
27
31
|
<div
|
|
28
32
|
class="c-media-btn__overlay c-media-btn__overlay--category tw-h-100 tw-flex tw-items-center tw-justify-center tw-mb-0.5 tw-capitalize"
|
|
29
33
|
>
|
|
30
|
-
{{ videoCategory.categoryName }}
|
|
34
|
+
{{ videoLibraryTr(`categories.${videoCategory.categoryName}`) }}
|
|
31
35
|
</div>
|
|
32
36
|
<video
|
|
33
37
|
:data-test-tag="`video-category-${idx}`"
|
|
@@ -167,9 +171,6 @@ const defaultLibrary = ref<VideoLibraryData | null>(null);
|
|
|
167
171
|
const isCategorySearch = ref(false);
|
|
168
172
|
const isCategoryView = ref(false);
|
|
169
173
|
|
|
170
|
-
const addVideosConcurrentlyLimit = ref(2);
|
|
171
|
-
const numberOfVideosBeingAdded = ref(0);
|
|
172
|
-
|
|
173
174
|
const SEARCH_DEBOUNCE_DELAY = 1500; // 1.5 seconds
|
|
174
175
|
const MIN_SEARCH_LENGTH = 2;
|
|
175
176
|
const VIDEOS_PER_PAGE = 10;
|
|
@@ -304,13 +305,6 @@ const onVideoLibraryItemClicked = async (item: VideoItem): Promise<void> => {
|
|
|
304
305
|
return;
|
|
305
306
|
}
|
|
306
307
|
|
|
307
|
-
if (numberOfVideosBeingAdded.value >= addVideosConcurrentlyLimit.value) {
|
|
308
|
-
window.alert(
|
|
309
|
-
`Maximum number of videos you can add is ${addVideosConcurrentlyLimit.value}`,
|
|
310
|
-
);
|
|
311
|
-
return;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
308
|
setIsLoading(item, true);
|
|
315
309
|
const video: GettyVideoEditorViewModelResponse | null =
|
|
316
310
|
await gettyImagesClient.value!.getVideoByVideoIdAsync(item.id);
|
|
@@ -338,7 +332,6 @@ const onVideoLibraryItemClicked = async (item: VideoItem): Promise<void> => {
|
|
|
338
332
|
|
|
339
333
|
const setIsLoading = (item: VideoItem, loading: boolean): void => {
|
|
340
334
|
item.isLoading = loading;
|
|
341
|
-
numberOfVideosBeingAdded.value += loading ? 1 : -1;
|
|
342
335
|
};
|
|
343
336
|
|
|
344
337
|
const getVideoPreview = (
|
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"videoLibrary": {
|
|
3
|
+
"categories": {
|
|
4
|
+
"aerial": "Luftaufnahme",
|
|
5
|
+
"beach": "Strand",
|
|
6
|
+
"business": "Unternehmen",
|
|
7
|
+
"cities": "Städte",
|
|
8
|
+
"landscape": "Landschaft",
|
|
9
|
+
"nature": "Natur",
|
|
10
|
+
"people": "Menschen",
|
|
11
|
+
"plants": "Pflanzen",
|
|
12
|
+
"sky": "Himmel",
|
|
13
|
+
"sunrise": "Sonnenaufgang"
|
|
14
|
+
},
|
|
3
15
|
"poweredBy": "Powered by",
|
|
4
16
|
"emptyState": "Ihr Browser unterstützt keine eingebetteten Videos.",
|
|
5
17
|
"loadMoreVideos": "Weitere Videos laden",
|
|
6
|
-
"supported": "Ihr Browser unterstützt keine eingebetteten Videos."
|
|
18
|
+
"supported": "Ihr Browser unterstützt keine eingebetteten Videos.",
|
|
19
|
+
"limitMessage": "Sie haben das Videolimit erreicht. Jede Seite unterstützt bis zu {{ videoLimit }} Videos. Entfernen Sie eines, um ein weiteres hinzuzufügen."
|
|
7
20
|
}
|
|
8
21
|
}
|
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"videoLibrary": {
|
|
3
|
+
"categories": {
|
|
4
|
+
"aerial": "Aéreo",
|
|
5
|
+
"beach": "Playa",
|
|
6
|
+
"business": "Negocio",
|
|
7
|
+
"cities": "Ciudades",
|
|
8
|
+
"landscape": "Paisaje",
|
|
9
|
+
"nature": "Naturaleza",
|
|
10
|
+
"people": "Personas",
|
|
11
|
+
"plants": "Plantas",
|
|
12
|
+
"sky": "Cielo",
|
|
13
|
+
"sunrise": "Amanecer"
|
|
14
|
+
},
|
|
3
15
|
"poweredBy": "Desarrollado por",
|
|
4
16
|
"emptyState": "Lo sentimos, tu navegador no admite vídeos incrustados.",
|
|
5
17
|
"loadMoreVideos": "Carga más vídeos",
|
|
6
|
-
"supported": "Lo sentimos, tu navegador no admite vídeos incrustados."
|
|
18
|
+
"supported": "Lo sentimos, tu navegador no admite vídeos incrustados.",
|
|
19
|
+
"limitMessage": "Has alcanzado el límite de vídeos. Cada sitio admite hasta {{ videoLimit }} vídeos; elimina uno para añadir otro."
|
|
7
20
|
}
|
|
8
21
|
}
|
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"videoLibrary": {
|
|
3
|
+
"categories": {
|
|
4
|
+
"aerial": "Aérien",
|
|
5
|
+
"beach": "Plage",
|
|
6
|
+
"business": "Activité",
|
|
7
|
+
"cities": "Villes",
|
|
8
|
+
"landscape": "Paysage",
|
|
9
|
+
"nature": "Nature",
|
|
10
|
+
"people": "Gens",
|
|
11
|
+
"plants": "Plantes",
|
|
12
|
+
"sky": "Ciel",
|
|
13
|
+
"sunrise": "Lever du soleil"
|
|
14
|
+
},
|
|
3
15
|
"poweredBy": "Alimenté par",
|
|
4
16
|
"emptyState": "Désolé, votre navigateur ne prend pas en charge les vidéos intégrées.",
|
|
5
17
|
"loadMoreVideos": "Charger plus de vidéos",
|
|
6
|
-
"supported": "Désolé, votre navigateur ne prend pas en charge les vidéos intégrées."
|
|
18
|
+
"supported": "Désolé, votre navigateur ne prend pas en charge les vidéos intégrées.",
|
|
19
|
+
"limitMessage": "Vous avez atteint la limite de vidéos. Chaque site prend en charge jusqu'à {{ videoLimit }} vidéos. Supprimez-en une pour en ajouter une autre."
|
|
7
20
|
}
|
|
8
21
|
}
|
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"videoLibrary": {
|
|
3
|
+
"categories": {
|
|
4
|
+
"aerial": "Aérien",
|
|
5
|
+
"beach": "Plage",
|
|
6
|
+
"business": "Activité",
|
|
7
|
+
"cities": "Villes",
|
|
8
|
+
"landscape": "Paysage",
|
|
9
|
+
"nature": "Nature",
|
|
10
|
+
"people": "Gens",
|
|
11
|
+
"plants": "Plantes",
|
|
12
|
+
"sky": "Ciel",
|
|
13
|
+
"sunrise": "Lever du soleil"
|
|
14
|
+
},
|
|
3
15
|
"poweredBy": "Alimenté par",
|
|
4
16
|
"emptyState": "Désolé, votre navigateur ne prend pas en charge les vidéos intégrées.",
|
|
5
17
|
"loadMoreVideos": "Charger plus de vidéos",
|
|
6
|
-
"supported": "Désolé, votre navigateur ne prend pas en charge les vidéos intégrées."
|
|
18
|
+
"supported": "Désolé, votre navigateur ne prend pas en charge les vidéos intégrées.",
|
|
19
|
+
"limitMessage": "Vous avez atteint la limite de vidéos. Chaque site prend en charge jusqu'à {{ videoLimit }} vidéos. Supprimez-en une pour en ajouter une autre."
|
|
7
20
|
}
|
|
8
21
|
}
|
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"videoLibrary": {
|
|
3
|
+
"categories": {
|
|
4
|
+
"aerial": "Aerial",
|
|
5
|
+
"beach": "Beach",
|
|
6
|
+
"business": "Business",
|
|
7
|
+
"cities": "Cities",
|
|
8
|
+
"landscape": "Landscape",
|
|
9
|
+
"nature": "Nature",
|
|
10
|
+
"people": "People",
|
|
11
|
+
"plants": "Plants",
|
|
12
|
+
"sky": "Sky",
|
|
13
|
+
"sunrise": "Sunrise"
|
|
14
|
+
},
|
|
3
15
|
"poweredBy": "Powered by",
|
|
4
16
|
"emptyState": "Sorry, your browser doesn't support embedded videos.",
|
|
5
17
|
"loadMoreVideos": "Load more videos",
|
|
6
|
-
"supported": "Sorry, your browser doesn't support embedded videos."
|
|
18
|
+
"supported": "Sorry, your browser doesn't support embedded videos.",
|
|
19
|
+
"limitMessage": "You’ve reached the video limit. Each site supports up to {{ videoLimit }} videos - remove one to add another."
|
|
7
20
|
}
|
|
8
21
|
}
|
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"videoLibrary": {
|
|
3
|
+
"categories": {
|
|
4
|
+
"aerial": "Aéreo",
|
|
5
|
+
"beach": "Praia",
|
|
6
|
+
"business": "Negócio",
|
|
7
|
+
"cities": "Cidades",
|
|
8
|
+
"landscape": "Paisagem",
|
|
9
|
+
"nature": "Natureza",
|
|
10
|
+
"people": "Pessoas",
|
|
11
|
+
"plants": "Plantas",
|
|
12
|
+
"sky": "Céu",
|
|
13
|
+
"sunrise": "Nascer do sol"
|
|
14
|
+
},
|
|
3
15
|
"poweredBy": "Assegurado por",
|
|
4
16
|
"emptyState": "Seu navegador não aceita vídeos incorporados.",
|
|
5
17
|
"loadMoreVideos": "Carregar mais vídeos",
|
|
6
|
-
"supported": "Seu navegador não aceita vídeos incorporados."
|
|
18
|
+
"supported": "Seu navegador não aceita vídeos incorporados.",
|
|
19
|
+
"limitMessage": "Você atingiu o limite de vídeos. Cada site permite até {{ videoLimit }} vídeos – remova um para adicionar outro."
|
|
7
20
|
}
|
|
8
21
|
}
|
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"videoLibrary": {
|
|
3
|
+
"categories": {
|
|
4
|
+
"aerial": "Aéreo",
|
|
5
|
+
"beach": "Praia",
|
|
6
|
+
"business": "Negócio",
|
|
7
|
+
"cities": "Cidades",
|
|
8
|
+
"landscape": "Paisagem",
|
|
9
|
+
"nature": "Nature",
|
|
10
|
+
"people": "Pessoas",
|
|
11
|
+
"plants": "Plantas",
|
|
12
|
+
"sky": "Céu",
|
|
13
|
+
"sunrise": "Nascer do sol"
|
|
14
|
+
},
|
|
3
15
|
"poweredBy": "Assegurado por",
|
|
4
16
|
"emptyState": "Lamentamos, mas o seu navegador não suporta vídeos incorporados.",
|
|
5
17
|
"loadMoreVideos": "Carregar mais vídeos",
|
|
6
|
-
"supported": "Lamentamos, mas o seu navegador não suporta vídeos incorporados."
|
|
18
|
+
"supported": "Lamentamos, mas o seu navegador não suporta vídeos incorporados.",
|
|
19
|
+
"limitMessage": "Atingiu o limite de vídeos. Cada site permite até {{ videoLimit }} vídeos - remova um para adicionar outro."
|
|
7
20
|
}
|
|
8
21
|
}
|