@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
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import type { PropType } from 'vue';
|
|
2
|
-
import { computed, defineComponent } from 'vue';
|
|
3
|
-
import type {
|
|
4
|
-
Tab,
|
|
5
|
-
ReplaceImageSettingsTabId,
|
|
6
|
-
ReplaceImageSettingsBase,
|
|
7
|
-
} from '../../models';
|
|
8
|
-
import type { UserMediaItemWithDimensions } from '../../../my-uploads/models';
|
|
9
|
-
import {
|
|
10
|
-
useBrandPageContainerStore,
|
|
11
|
-
type BrandPageSettingsMode,
|
|
12
|
-
} from '../../../../brand-page-maker/stores';
|
|
13
|
-
import axios from 'axios';
|
|
14
|
-
import { getColorReplacementsFromSvgString } from '../../../../brand-page/utils/svg-color.util';
|
|
15
|
-
import { tr } from '../../../../composables/useTranslate';
|
|
16
|
-
|
|
17
|
-
const imageSettingTr = (key) => tr(`replaceImageSetting.${key}`);
|
|
18
|
-
|
|
19
|
-
export default defineComponent({
|
|
20
|
-
props: {
|
|
21
|
-
mediaSettings: {
|
|
22
|
-
type: Object as PropType<ReplaceImageSettingsBase>,
|
|
23
|
-
required: false,
|
|
24
|
-
default: undefined,
|
|
25
|
-
},
|
|
26
|
-
imageExtension: {
|
|
27
|
-
type: Array as PropType<string[]>,
|
|
28
|
-
required: false,
|
|
29
|
-
default: () => ['.jpg', '.jpeg', '.png'],
|
|
30
|
-
},
|
|
31
|
-
mode: {
|
|
32
|
-
type: Object as PropType<BrandPageSettingsMode>,
|
|
33
|
-
required: true,
|
|
34
|
-
},
|
|
35
|
-
isAdmin: {
|
|
36
|
-
type: Boolean,
|
|
37
|
-
required: true,
|
|
38
|
-
default: false,
|
|
39
|
-
},
|
|
40
|
-
activeTabs: {
|
|
41
|
-
type: Array as PropType<ReplaceImageSettingsTabId[]>,
|
|
42
|
-
required: true,
|
|
43
|
-
},
|
|
44
|
-
mediaType: {
|
|
45
|
-
type: String,
|
|
46
|
-
required: false,
|
|
47
|
-
default: '',
|
|
48
|
-
},
|
|
49
|
-
sectionTitle: {
|
|
50
|
-
type: String,
|
|
51
|
-
required: false,
|
|
52
|
-
default: '',
|
|
53
|
-
},
|
|
54
|
-
transparentBg: {
|
|
55
|
-
type: Boolean,
|
|
56
|
-
required: true,
|
|
57
|
-
default: false,
|
|
58
|
-
},
|
|
59
|
-
stickyBackBtn: {
|
|
60
|
-
type: Boolean,
|
|
61
|
-
required: true,
|
|
62
|
-
default: true,
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
setup() {
|
|
66
|
-
const containerStore = useBrandPageContainerStore();
|
|
67
|
-
|
|
68
|
-
return {
|
|
69
|
-
isPrePurchase: computed(() => containerStore.isPrePurchase),
|
|
70
|
-
};
|
|
71
|
-
},
|
|
72
|
-
data() {
|
|
73
|
-
return {
|
|
74
|
-
tabs: [
|
|
75
|
-
{
|
|
76
|
-
id: 'ICON',
|
|
77
|
-
label: imageSettingTr('icon'),
|
|
78
|
-
active: false,
|
|
79
|
-
} as Tab,
|
|
80
|
-
{
|
|
81
|
-
id: 'MY_UPLOADS',
|
|
82
|
-
label: imageSettingTr('myUploads'),
|
|
83
|
-
active: false,
|
|
84
|
-
} as Tab,
|
|
85
|
-
{
|
|
86
|
-
id: 'MY_DESIGNS',
|
|
87
|
-
label: imageSettingTr('myDesigns'),
|
|
88
|
-
active: false,
|
|
89
|
-
} as Tab,
|
|
90
|
-
{
|
|
91
|
-
id: 'IMAGE_LIBRARY',
|
|
92
|
-
label: imageSettingTr('imageLibrary'),
|
|
93
|
-
active: false,
|
|
94
|
-
} as Tab,
|
|
95
|
-
{
|
|
96
|
-
id: 'SHAPE_LIBRARY',
|
|
97
|
-
label: imageSettingTr('shapeLibrary'),
|
|
98
|
-
active: false,
|
|
99
|
-
} as Tab,
|
|
100
|
-
],
|
|
101
|
-
};
|
|
102
|
-
},
|
|
103
|
-
computed: {
|
|
104
|
-
enabledTabs(): Tab[] {
|
|
105
|
-
const value = this.tabs
|
|
106
|
-
.filter((x) => x.id !== 'MY_DESIGNS' || !this.isAdmin)
|
|
107
|
-
.filter(
|
|
108
|
-
(x) =>
|
|
109
|
-
this.activeTabs.some((y) => y === x.id) &&
|
|
110
|
-
(!this.isPrePurchase || x.id !== 'MY_DESIGNS'),
|
|
111
|
-
);
|
|
112
|
-
|
|
113
|
-
return value;
|
|
114
|
-
},
|
|
115
|
-
isDeleteEnabled(): boolean {
|
|
116
|
-
return true;
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
created() {
|
|
120
|
-
if (this.enabledTabs.length > 0) {
|
|
121
|
-
this.enabledTabs[0].active = true;
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
methods: {
|
|
125
|
-
onBack() {
|
|
126
|
-
this.$emit('on-back');
|
|
127
|
-
},
|
|
128
|
-
onImageSelected(
|
|
129
|
-
image: Pick<
|
|
130
|
-
UserMediaItemWithDimensions,
|
|
131
|
-
'url' | 'minimisedUrl' | 'width' | 'height'
|
|
132
|
-
>,
|
|
133
|
-
) {
|
|
134
|
-
this.$emit('on-image-picked', image, this.mediaType);
|
|
135
|
-
},
|
|
136
|
-
onDeleteImage(
|
|
137
|
-
image: Pick<
|
|
138
|
-
UserMediaItemWithDimensions,
|
|
139
|
-
'url' | 'minimisedUrl' | 'width' | 'height'
|
|
140
|
-
>,
|
|
141
|
-
) {
|
|
142
|
-
this.$emit('on-image-removed', image);
|
|
143
|
-
},
|
|
144
|
-
onDesignSelected(image: UserMediaItemWithDimensions) {
|
|
145
|
-
this.$emit('on-design-selected', image);
|
|
146
|
-
},
|
|
147
|
-
switchActiveTab(id: string) {
|
|
148
|
-
this.tabs.forEach((tab: Tab) =>
|
|
149
|
-
tab.id === id ? (tab.active = true) : (tab.active = false),
|
|
150
|
-
);
|
|
151
|
-
},
|
|
152
|
-
async onShapeSelected(image: UserMediaItemWithDimensions) {
|
|
153
|
-
const svgResponse = await axios.get<string>(image.url);
|
|
154
|
-
|
|
155
|
-
const colorReplacements = getColorReplacementsFromSvgString(
|
|
156
|
-
svgResponse.data,
|
|
157
|
-
);
|
|
158
|
-
|
|
159
|
-
this.$emit('on-shape-selected', {
|
|
160
|
-
imageUrl: image.url,
|
|
161
|
-
width: image.width,
|
|
162
|
-
height: image.height,
|
|
163
|
-
colorReplacements,
|
|
164
|
-
aspectRatio: image.aspectRatio,
|
|
165
|
-
});
|
|
166
|
-
},
|
|
167
|
-
},
|
|
168
|
-
});
|