@designcrowd/fe-shared-lib 1.6.2-eng-4039-freemode → 1.6.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/dist/css/tailwind-brandCrowd.css +9 -0
- package/dist/css/tailwind-brandPage.css +9 -0
- package/dist/css/tailwind-crazyDomains.css +9 -0
- package/dist/css/tailwind-designCom.css +9 -0
- package/dist/css/tailwind-designCrowd.css +9 -0
- package/docs/plans/DY-957-plan-phase-2-fe-shared-lib.md +382 -0
- package/package.json +1 -1
- package/src/atoms/components/Carousel/Carousel.vue +5 -0
- package/src/atoms/components/Icon/Icon.vue +4 -0
- package/src/atoms/components/Icon/icons/history.vue +12 -0
- package/src/atoms/components/Icon/icons/save.vue +6 -0
- package/src/bundles/bundled-translations.de-DE.json +3 -1
- package/src/bundles/bundled-translations.es-ES.json +3 -1
- package/src/bundles/bundled-translations.fr-CA.json +3 -1
- package/src/bundles/bundled-translations.fr-FR.json +3 -1
- package/src/bundles/bundled-translations.json +3 -1
- package/src/bundles/bundled-translations.pt-BR.json +3 -1
- package/src/bundles/bundled-translations.pt-PT.json +3 -1
- package/src/experiences/clients/brand-crowd-api.client.js +18 -0
- package/src/experiences/components/UploadYourLogoApplication/UploadYourLogoApplication.stories.js +49 -0
- package/src/experiences/components/UploadYourLogoApplication/UploadYourLogoApplication.vue +28 -0
- package/src/experiences/components/UploadYourLogoOnBoarding/LogoKeywords.stories.js +65 -0
- package/src/experiences/components/UploadYourLogoOnBoarding/LogoKeywords.vue +156 -0
- package/src/experiences/components/UploadYourLogoOnBoarding/UploadYourLogoOnBoarding.vue +61 -9
- package/src/experiences/components/UploadYourLogoOnBoarding/i18n/upload-your-logo.de-DE.json +34 -31
- package/src/experiences/components/UploadYourLogoOnBoarding/i18n/upload-your-logo.es-ES.json +34 -31
- package/src/experiences/components/UploadYourLogoOnBoarding/i18n/upload-your-logo.fr-CA.json +34 -31
- package/src/experiences/components/UploadYourLogoOnBoarding/i18n/upload-your-logo.fr-FR.json +34 -31
- package/src/experiences/components/UploadYourLogoOnBoarding/i18n/upload-your-logo.json +3 -1
- package/src/experiences/components/UploadYourLogoOnBoarding/i18n/upload-your-logo.pt-BR.json +34 -31
- package/src/experiences/components/UploadYourLogoOnBoarding/i18n/upload-your-logo.pt-PT.json +34 -31
- package/src/experiences/constants/api.js +1 -0
|
@@ -96,7 +96,9 @@
|
|
|
96
96
|
"dropYourFileHere": "Arraste o seu ficheiro aqui ou",
|
|
97
97
|
"clickToUpload": "clique para carregar",
|
|
98
98
|
"acceptedFiles": "Aceitamos arquivos PNG, JPG, SVG ou EPS de até 25 MB",
|
|
99
|
-
"wrongUploadType": "Você não pode baixar arquivos deste tipo."
|
|
99
|
+
"wrongUploadType": "Você não pode baixar arquivos deste tipo.",
|
|
100
|
+
"keywords": "Palavras-chave",
|
|
101
|
+
"keywordsDescription": "Adicione palavras-chave associadas à sua empresa e logotipo"
|
|
100
102
|
},
|
|
101
103
|
"uploadLogoSearchResultCard": {
|
|
102
104
|
"replace": "Substituir",
|
|
@@ -96,7 +96,9 @@
|
|
|
96
96
|
"dropYourFileHere": "Arraste o seu ficheiro aqui ou",
|
|
97
97
|
"clickToUpload": "clique para carregar",
|
|
98
98
|
"acceptedFiles": "Aceitamos ficheiros PNG, JPG, SVG ou EPS até 25 MB",
|
|
99
|
-
"wrongUploadType": "Não pode carregar ficheiros deste tipo."
|
|
99
|
+
"wrongUploadType": "Não pode carregar ficheiros deste tipo.",
|
|
100
|
+
"keywords": "Palavras-chave",
|
|
101
|
+
"keywordsDescription": "Adicione palavras-chave relacionadas com a sua empresa e logótipo"
|
|
100
102
|
},
|
|
101
103
|
"uploadLogoSearchResultCard": {
|
|
102
104
|
"replace": "Substituir",
|
|
@@ -116,9 +116,27 @@ const searchDomainNamesByKeywordAsync = async ({
|
|
|
116
116
|
}
|
|
117
117
|
};
|
|
118
118
|
|
|
119
|
+
const getKeywordSuggestionsAsync = async ({ businessName, templateType, antiForgeryToken }) => {
|
|
120
|
+
try {
|
|
121
|
+
const response = await getAxios()({
|
|
122
|
+
method: 'post',
|
|
123
|
+
url: API.KEYWORD_SUGGESTIONS_API_URL,
|
|
124
|
+
data: { businessName, templateType },
|
|
125
|
+
headers: {
|
|
126
|
+
RequestVerificationToken: antiForgeryToken,
|
|
127
|
+
'Accept-Language': getCurrentLocale(),
|
|
128
|
+
},
|
|
129
|
+
});
|
|
130
|
+
return response.data;
|
|
131
|
+
} catch (error) {
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
|
|
119
136
|
export default {
|
|
120
137
|
setBrandCrowdApiClientAxios,
|
|
121
138
|
uploadLogoAndGetDetails,
|
|
122
139
|
createUserLogo,
|
|
123
140
|
searchDomainNamesByKeywordAsync,
|
|
141
|
+
getKeywordSuggestionsAsync,
|
|
124
142
|
};
|
package/src/experiences/components/UploadYourLogoApplication/UploadYourLogoApplication.stories.js
CHANGED
|
@@ -134,6 +134,55 @@ export const SuccessSvg = () => {
|
|
|
134
134
|
};
|
|
135
135
|
};
|
|
136
136
|
|
|
137
|
+
export const SuccessWithKeywords = () => {
|
|
138
|
+
const mock = new MockAdapter(axios, { delayResponse: MOCK_RESPONSE_DELAY, onNoMatch: 'passthrough' });
|
|
139
|
+
mock.onPost(API.BYO_LOGO_API_URL + API.BYO_LOGO_API_UPLOAD_LOGO_ENDPOINT).reply(200, UPLOAD_SUCCESS_RESPONSE);
|
|
140
|
+
|
|
141
|
+
mock.onPost(API.BYO_LOGO_API_URL + API.BYO_LOGO_API_SAVE_ENDPOINT).reply(200, {
|
|
142
|
+
success: true,
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
mock.onGet(new RegExp(API.KEYWORD_SUGGESTIONS_API_URL)).reply(200, {
|
|
146
|
+
keywords: ['professional', 'modern'],
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
return {
|
|
150
|
+
components: {
|
|
151
|
+
UploadYourLogoApplication,
|
|
152
|
+
},
|
|
153
|
+
template: `
|
|
154
|
+
<div>
|
|
155
|
+
<input type="file" @change="onFileInputChange" accept=".png,.svg,.eps" />
|
|
156
|
+
<UploadYourLogoApplication
|
|
157
|
+
:use-dropzone="true"
|
|
158
|
+
:show-keywords-step="true"
|
|
159
|
+
template-type="business card"
|
|
160
|
+
@on-save-keywords="onSaveKeywords"
|
|
161
|
+
@on-finish="onFinish"
|
|
162
|
+
/>
|
|
163
|
+
</div>
|
|
164
|
+
`,
|
|
165
|
+
methods: {
|
|
166
|
+
onFileInputChange(e) {
|
|
167
|
+
if (e.target.files.length) {
|
|
168
|
+
window.dispatchEvent(
|
|
169
|
+
new CustomEvent(Events.BeginUploadLogoExperience, {
|
|
170
|
+
detail: { file: e.target.files[0] },
|
|
171
|
+
}),
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
onSaveKeywords(e) {
|
|
176
|
+
console.log('on-save-keywords', e);
|
|
177
|
+
},
|
|
178
|
+
onFinish(e) {
|
|
179
|
+
alert('on finish');
|
|
180
|
+
console.log(e);
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
|
|
137
186
|
export const FailOnUpload = () => {
|
|
138
187
|
const mock = new MockAdapter(axios, { delayResponse: MOCK_RESPONSE_DELAY });
|
|
139
188
|
mock
|
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
:use-dropzone="useDropzone"
|
|
8
8
|
:is-post-purchase-user-upload="isPostPurchaseUserUpload"
|
|
9
9
|
:is-ai-powered="isAiPowered"
|
|
10
|
+
:show-keywords-step="showKeywordsStep"
|
|
11
|
+
:template-type="templateType"
|
|
12
|
+
:anti-forgery-token="antiForgeryToken"
|
|
13
|
+
:refresh-anti-forgery-token="refreshAntiForgeryToken"
|
|
10
14
|
@on-exit="onExit"
|
|
11
15
|
@on-upload-error="onUploadError"
|
|
12
16
|
@on-file-change="onFileChange"
|
|
@@ -16,6 +20,7 @@
|
|
|
16
20
|
@on-brand-colors-save="onBrandColorsSave"
|
|
17
21
|
@on-back="onBack"
|
|
18
22
|
@on-logo-upload-success="onLogoUploadSuccess"
|
|
23
|
+
@on-save-keywords="onSaveKeywords"
|
|
19
24
|
/>
|
|
20
25
|
</div>
|
|
21
26
|
</template>
|
|
@@ -44,6 +49,26 @@ export default {
|
|
|
44
49
|
type: Boolean,
|
|
45
50
|
default: false,
|
|
46
51
|
},
|
|
52
|
+
showKeywordsStep: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
required: false,
|
|
55
|
+
default: false,
|
|
56
|
+
},
|
|
57
|
+
templateType: {
|
|
58
|
+
type: String,
|
|
59
|
+
required: false,
|
|
60
|
+
default: null,
|
|
61
|
+
},
|
|
62
|
+
antiForgeryToken: {
|
|
63
|
+
type: String,
|
|
64
|
+
required: false,
|
|
65
|
+
default: '',
|
|
66
|
+
},
|
|
67
|
+
refreshAntiForgeryToken: {
|
|
68
|
+
type: Function,
|
|
69
|
+
required: false,
|
|
70
|
+
default: null,
|
|
71
|
+
},
|
|
47
72
|
},
|
|
48
73
|
data() {
|
|
49
74
|
return {
|
|
@@ -130,6 +155,9 @@ export default {
|
|
|
130
155
|
onLogoUploadSuccess() {
|
|
131
156
|
this.$emit('on-logo-upload-success');
|
|
132
157
|
},
|
|
158
|
+
onSaveKeywords(payload) {
|
|
159
|
+
this.$emit('on-save-keywords', payload);
|
|
160
|
+
},
|
|
133
161
|
},
|
|
134
162
|
};
|
|
135
163
|
</script>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import LogoKeywords from './LogoKeywords.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/LogoKeywords',
|
|
5
|
+
component: LogoKeywords,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const Loading = () => {
|
|
9
|
+
return {
|
|
10
|
+
components: {
|
|
11
|
+
LogoKeywords,
|
|
12
|
+
},
|
|
13
|
+
template: `
|
|
14
|
+
<div style="max-width: 500px;">
|
|
15
|
+
<LogoKeywords
|
|
16
|
+
progress-label="Step 3 of 5"
|
|
17
|
+
event-category="BYO-PrePurchase"
|
|
18
|
+
business-name="My Business"
|
|
19
|
+
template-type="business card"
|
|
20
|
+
anti-forgery-token="mock-anti-forgery-token"
|
|
21
|
+
/>
|
|
22
|
+
</div>
|
|
23
|
+
`,
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const Populated = () => {
|
|
28
|
+
return {
|
|
29
|
+
components: {
|
|
30
|
+
LogoKeywords,
|
|
31
|
+
},
|
|
32
|
+
template: `
|
|
33
|
+
<div style="max-width: 500px;">
|
|
34
|
+
<LogoKeywords
|
|
35
|
+
progress-label="Step 3 of 5"
|
|
36
|
+
event-category="BYO-PrePurchase"
|
|
37
|
+
saved-keywords="modern, professional, creative, bold"
|
|
38
|
+
business-name="My Business"
|
|
39
|
+
template-type="business card"
|
|
40
|
+
anti-forgery-token="mock-anti-forgery-token"
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
43
|
+
`,
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const Empty = () => {
|
|
48
|
+
return {
|
|
49
|
+
components: {
|
|
50
|
+
LogoKeywords,
|
|
51
|
+
},
|
|
52
|
+
template: `
|
|
53
|
+
<div style="max-width: 500px;">
|
|
54
|
+
<LogoKeywords
|
|
55
|
+
progress-label="Step 3 of 5"
|
|
56
|
+
event-category="BYO-PrePurchase"
|
|
57
|
+
saved-keywords=""
|
|
58
|
+
business-name=""
|
|
59
|
+
template-type="business card"
|
|
60
|
+
anti-forgery-token="mock-anti-forgery-token"
|
|
61
|
+
/>
|
|
62
|
+
</div>
|
|
63
|
+
`,
|
|
64
|
+
};
|
|
65
|
+
};
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="tw-w-full tw-flex tw-flex-col tw-h-full lg:tw-h-auto">
|
|
3
|
+
<div class="tw-h-full tw-pb-24 lg:tw-pb-0">
|
|
4
|
+
<div class="tw-pb-8">
|
|
5
|
+
<p class="tw-text-grayscale-600 tw-font-bold tw-text-xs tw-mb-2 tw-uppercase">
|
|
6
|
+
{{ progressLabel }}
|
|
7
|
+
</p>
|
|
8
|
+
<h2 class="tw-mb-4 tw-text-4xl tw-text-black tw-font-bold">{{ uploadYourLogoTr('keywords') }}</h2>
|
|
9
|
+
<p class="tw-mt-0">{{ uploadYourLogoTr('keywordsDescription') }}</p>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<div class="tw-pb-8 tw-px-8">
|
|
13
|
+
<div class="tw-relative">
|
|
14
|
+
<input
|
|
15
|
+
v-model="keywordsText"
|
|
16
|
+
:disabled="isLoading"
|
|
17
|
+
class="tw-w-full tw-py-3.5 tw-px-4 tw-rounded tw-box-border tw-border tw-border-solid tw-border-grayscale-500 tw-text-grayscale-600"
|
|
18
|
+
@keyup="onKeywordsKeyUp"
|
|
19
|
+
/>
|
|
20
|
+
<div
|
|
21
|
+
v-if="isLoading"
|
|
22
|
+
class="tw-absolute tw-inset-0 tw-flex tw-items-center tw-justify-center tw-bg-white/50 tw-rounded"
|
|
23
|
+
>
|
|
24
|
+
<div class="tw-animate-spin tw-h-5 tw-w-5 tw-border-2 tw-border-grayscale-500 tw-border-t-transparent tw-rounded-full" />
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<div
|
|
31
|
+
class="tw-fixed tw-rounded-b tw-bottom-0 tw-left-0 tw-z-10 tw-bg-grayscale-200 lg:tw-static tw-flex tw-w-full tw-items-center tw-justify-center tw-border-0 tw-border-t tw-border-black/10 tw-border-solid tw-py-4 tw-px-8 tw-box-border"
|
|
32
|
+
>
|
|
33
|
+
<Button
|
|
34
|
+
:label="uploadYourLogoTr('back')"
|
|
35
|
+
size="large"
|
|
36
|
+
variant="outline"
|
|
37
|
+
container-classes="tw-mx-2"
|
|
38
|
+
data-test-back-btn
|
|
39
|
+
@on-click="back"
|
|
40
|
+
/>
|
|
41
|
+
<Button
|
|
42
|
+
:label="uploadYourLogoTr('continue')"
|
|
43
|
+
size="large"
|
|
44
|
+
variant="primary-with-icon"
|
|
45
|
+
icon="chevron-right-wide"
|
|
46
|
+
container-classes="tw-mx-2"
|
|
47
|
+
data-test-continue-btn
|
|
48
|
+
:disabled="isLoading"
|
|
49
|
+
@on-click="save"
|
|
50
|
+
/>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</template>
|
|
54
|
+
<script>
|
|
55
|
+
import Button from '../../../atoms/components/Button/Button.vue';
|
|
56
|
+
import brandCrowdClient from '../../clients/brand-crowd-api.client';
|
|
57
|
+
import trackEvent from '../../helpers/tracking';
|
|
58
|
+
import { uploadYourLogoTr } from '../../../useSharedLibTranslate';
|
|
59
|
+
|
|
60
|
+
export default {
|
|
61
|
+
components: {
|
|
62
|
+
Button,
|
|
63
|
+
},
|
|
64
|
+
props: {
|
|
65
|
+
progressLabel: {
|
|
66
|
+
type: String,
|
|
67
|
+
required: true,
|
|
68
|
+
},
|
|
69
|
+
eventCategory: {
|
|
70
|
+
type: String,
|
|
71
|
+
required: true,
|
|
72
|
+
},
|
|
73
|
+
savedKeywords: {
|
|
74
|
+
type: String,
|
|
75
|
+
required: false,
|
|
76
|
+
default: null,
|
|
77
|
+
},
|
|
78
|
+
businessName: {
|
|
79
|
+
type: String,
|
|
80
|
+
required: false,
|
|
81
|
+
default: '',
|
|
82
|
+
},
|
|
83
|
+
templateType: {
|
|
84
|
+
type: String,
|
|
85
|
+
required: true,
|
|
86
|
+
},
|
|
87
|
+
antiForgeryToken: {
|
|
88
|
+
type: String,
|
|
89
|
+
required: true,
|
|
90
|
+
},
|
|
91
|
+
refreshAntiForgeryToken: {
|
|
92
|
+
type: Function,
|
|
93
|
+
required: false,
|
|
94
|
+
default: null,
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
setup() {
|
|
98
|
+
return {
|
|
99
|
+
uploadYourLogoTr,
|
|
100
|
+
};
|
|
101
|
+
},
|
|
102
|
+
data() {
|
|
103
|
+
return {
|
|
104
|
+
keywordsText: '',
|
|
105
|
+
isLoading: false,
|
|
106
|
+
};
|
|
107
|
+
},
|
|
108
|
+
async mounted() {
|
|
109
|
+
if (this.savedKeywords !== null) {
|
|
110
|
+
this.keywordsText = this.savedKeywords;
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
if (!this.businessName) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
this.isLoading = true;
|
|
117
|
+
try {
|
|
118
|
+
const token = this.refreshAntiForgeryToken ? await this.refreshAntiForgeryToken() : this.antiForgeryToken;
|
|
119
|
+
const result = await brandCrowdClient.getKeywordSuggestionsAsync({
|
|
120
|
+
businessName: this.businessName,
|
|
121
|
+
templateType: this.templateType,
|
|
122
|
+
antiForgeryToken: token,
|
|
123
|
+
});
|
|
124
|
+
if (result && result.keywords && result.keywords.length > 0) {
|
|
125
|
+
this.keywordsText = result.keywords.join(', ');
|
|
126
|
+
}
|
|
127
|
+
} finally {
|
|
128
|
+
this.isLoading = false;
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
methods: {
|
|
132
|
+
back() {
|
|
133
|
+
this.$emit('on-go-back');
|
|
134
|
+
},
|
|
135
|
+
save() {
|
|
136
|
+
if (this.isLoading) return;
|
|
137
|
+
|
|
138
|
+
trackEvent({
|
|
139
|
+
eventCategory: this.eventCategory,
|
|
140
|
+
eventAction: 'keywords',
|
|
141
|
+
eventLabel: 'Clicked_Continue',
|
|
142
|
+
event: 'click',
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
this.$emit('on-save', {
|
|
146
|
+
keywords: this.keywordsText,
|
|
147
|
+
});
|
|
148
|
+
},
|
|
149
|
+
onKeywordsKeyUp(e) {
|
|
150
|
+
if (e.key === 'Enter' && !this.isLoading) {
|
|
151
|
+
this.save();
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
};
|
|
156
|
+
</script>
|
|
@@ -55,13 +55,26 @@
|
|
|
55
55
|
@on-save="onSaveBusinessText"
|
|
56
56
|
/>
|
|
57
57
|
|
|
58
|
+
<LogoKeywords
|
|
59
|
+
v-if="showKeywordsStep && !isAttemptingToExit && currentStep === 4 && uploadedLogoData"
|
|
60
|
+
:progress-label="currentStepProgressLabel"
|
|
61
|
+
:event-category="eventCategory"
|
|
62
|
+
:saved-keywords="savedKeywords"
|
|
63
|
+
:business-name="(savedBusinessText && savedBusinessText.businessText) || ''"
|
|
64
|
+
:template-type="templateType"
|
|
65
|
+
:anti-forgery-token="antiForgeryToken"
|
|
66
|
+
:refresh-anti-forgery-token="refreshAntiForgeryToken"
|
|
67
|
+
@on-go-back="onGoBackToBusinessText"
|
|
68
|
+
@on-save="onSaveKeywords"
|
|
69
|
+
/>
|
|
70
|
+
|
|
58
71
|
<LogoBusinessBrandColours
|
|
59
|
-
v-if="!isAttemptingToExit && currentStep ===
|
|
72
|
+
v-if="!isAttemptingToExit && currentStep === brandColoursStep && uploadedLogoData && !isCurrentlySaving"
|
|
60
73
|
:logo-data="uploadedLogoData"
|
|
61
74
|
:cropped-logo-image="croppedImageBoxDataUrl"
|
|
62
75
|
:total-num-steps="totalNumSteps"
|
|
63
76
|
:event-category="eventCategory"
|
|
64
|
-
@on-go-back="
|
|
77
|
+
@on-go-back="onGoBackFromBrandColours"
|
|
65
78
|
@on-save="onBrandColoursSave"
|
|
66
79
|
/>
|
|
67
80
|
|
|
@@ -102,6 +115,7 @@ import LogoCropper from './LogoCropper.vue';
|
|
|
102
115
|
import LogoPreview from './LogoPreview.vue';
|
|
103
116
|
import LogoBusinessText from './LogoBusinessText.vue';
|
|
104
117
|
import LogoBusinessBrandColours from './LogoBusinessBrandColours.vue';
|
|
118
|
+
import LogoKeywords from './LogoKeywords.vue';
|
|
105
119
|
import LogoUploadingLoader from './LogoUploadingLoader.vue';
|
|
106
120
|
|
|
107
121
|
export default {
|
|
@@ -115,6 +129,7 @@ export default {
|
|
|
115
129
|
LogoPreview,
|
|
116
130
|
LogoBusinessText,
|
|
117
131
|
LogoBusinessBrandColours,
|
|
132
|
+
LogoKeywords,
|
|
118
133
|
LogoUploadingLoader,
|
|
119
134
|
},
|
|
120
135
|
props: {
|
|
@@ -142,6 +157,26 @@ export default {
|
|
|
142
157
|
type: Boolean,
|
|
143
158
|
default: false,
|
|
144
159
|
},
|
|
160
|
+
showKeywordsStep: {
|
|
161
|
+
type: Boolean,
|
|
162
|
+
required: false,
|
|
163
|
+
default: false,
|
|
164
|
+
},
|
|
165
|
+
templateType: {
|
|
166
|
+
type: String,
|
|
167
|
+
required: false,
|
|
168
|
+
default: null,
|
|
169
|
+
},
|
|
170
|
+
antiForgeryToken: {
|
|
171
|
+
type: String,
|
|
172
|
+
required: false,
|
|
173
|
+
default: '',
|
|
174
|
+
},
|
|
175
|
+
refreshAntiForgeryToken: {
|
|
176
|
+
type: Function,
|
|
177
|
+
required: false,
|
|
178
|
+
default: null,
|
|
179
|
+
},
|
|
145
180
|
},
|
|
146
181
|
setup() {
|
|
147
182
|
return {
|
|
@@ -152,12 +187,13 @@ export default {
|
|
|
152
187
|
return {
|
|
153
188
|
currentStep: this.useDropzone ? 0 : 1,
|
|
154
189
|
includeDropzoneInModal: this.useDropzone,
|
|
155
|
-
totalNumSteps: this.useDropzone ?
|
|
190
|
+
totalNumSteps: 4 + (this.useDropzone ? 1 : 0) + (this.showKeywordsStep ? 1 : 0),
|
|
156
191
|
errorMessage: null,
|
|
157
192
|
isAttemptingToExit: false,
|
|
158
193
|
uploadedLogoData: null,
|
|
159
194
|
croppedImageBoxBounds: null,
|
|
160
195
|
savedBusinessText: null,
|
|
196
|
+
savedKeywords: null,
|
|
161
197
|
brandColourData: null,
|
|
162
198
|
isCurrentlySaving: false,
|
|
163
199
|
};
|
|
@@ -166,9 +202,9 @@ export default {
|
|
|
166
202
|
currentStepProgressLabel() {
|
|
167
203
|
if (this.includeDropzoneInModal) {
|
|
168
204
|
const currentStepDisplay = this.currentStep === 0 ? 1 : this.currentStep;
|
|
169
|
-
return this.uploadYourLogoTr('stepOf', { CURRENT: currentStepDisplay, TOTAL:
|
|
205
|
+
return this.uploadYourLogoTr('stepOf', { CURRENT: currentStepDisplay, TOTAL: this.totalNumSteps });
|
|
170
206
|
}
|
|
171
|
-
return this.uploadYourLogoTr('stepOf', { CURRENT: this.currentStep - 1, TOTAL:
|
|
207
|
+
return this.uploadYourLogoTr('stepOf', { CURRENT: this.currentStep - 1, TOTAL: this.totalNumSteps });
|
|
172
208
|
},
|
|
173
209
|
hasError() {
|
|
174
210
|
return !!this.errorMessage;
|
|
@@ -178,11 +214,17 @@ export default {
|
|
|
178
214
|
},
|
|
179
215
|
currentStepTrackingLabel() {
|
|
180
216
|
const stepTwoLabel = this.currentStep === 2 && !this.canCropImage ? 'previewLogo' : 'cropLogo';
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
217
|
+
const steps = this.showKeywordsStep
|
|
218
|
+
? ['logoUploader', stepTwoLabel, 'businessName', 'keywords', 'brandColors']
|
|
219
|
+
: ['logoUploader', stepTwoLabel, 'businessName', 'brandColors'];
|
|
184
220
|
return steps[this.currentStep - 1];
|
|
185
221
|
},
|
|
222
|
+
keywordsStep() {
|
|
223
|
+
return 4;
|
|
224
|
+
},
|
|
225
|
+
brandColoursStep() {
|
|
226
|
+
return this.showKeywordsStep ? 5 : 4;
|
|
227
|
+
},
|
|
186
228
|
eventCategory() {
|
|
187
229
|
if (this.isPostPurchaseUserUpload) {
|
|
188
230
|
return 'BYO-PostPurchase';
|
|
@@ -257,10 +299,19 @@ export default {
|
|
|
257
299
|
this.$emit('on-back', { currentStepTrackingLabel: this.currentStepTrackingLabel });
|
|
258
300
|
this.currentStep = 3;
|
|
259
301
|
},
|
|
302
|
+
onSaveKeywords(payload) {
|
|
303
|
+
this.$emit('on-save-keywords', { keywords: payload.keywords });
|
|
304
|
+
this.savedKeywords = payload.keywords;
|
|
305
|
+
this.currentStep = this.brandColoursStep;
|
|
306
|
+
},
|
|
307
|
+
onGoBackFromBrandColours() {
|
|
308
|
+
this.$emit('on-back', { currentStepTrackingLabel: this.currentStepTrackingLabel });
|
|
309
|
+
this.currentStep = this.showKeywordsStep ? this.keywordsStep : 3;
|
|
310
|
+
},
|
|
260
311
|
onSaveBusinessText(payload) {
|
|
261
312
|
this.$emit('on-save-business-text', { businessText: payload.businessText });
|
|
262
313
|
this.savedBusinessText = payload;
|
|
263
|
-
this.currentStep =
|
|
314
|
+
this.currentStep = this.showKeywordsStep ? this.keywordsStep : this.brandColoursStep;
|
|
264
315
|
},
|
|
265
316
|
onBrandColoursSave(payload) {
|
|
266
317
|
this.$emit('on-brand-colors-save', {
|
|
@@ -304,6 +355,7 @@ export default {
|
|
|
304
355
|
this.uploadedLogoData = null;
|
|
305
356
|
this.croppedImageBoxBounds = null;
|
|
306
357
|
this.savedBusinessText = null;
|
|
358
|
+
this.savedKeywords = null;
|
|
307
359
|
this.brandColourData = null;
|
|
308
360
|
},
|
|
309
361
|
},
|
package/src/experiences/components/UploadYourLogoOnBoarding/i18n/upload-your-logo.de-DE.json
CHANGED
|
@@ -1,34 +1,37 @@
|
|
|
1
1
|
{
|
|
2
|
-
"uploadYourLogo"
|
|
3
|
-
"uploadYourLogoText"
|
|
4
|
-
"disclaimerText"
|
|
5
|
-
"generatingDesigns"
|
|
6
|
-
"uploadingAndConverting"
|
|
7
|
-
"stepOf"
|
|
8
|
-
"uploadError"
|
|
9
|
-
"cancel"
|
|
10
|
-
"continue"
|
|
11
|
-
"back"
|
|
12
|
-
"no"
|
|
13
|
-
"yes"
|
|
14
|
-
"businessName"
|
|
15
|
-
"businessNameDescription"
|
|
16
|
-
"cropYourLogo"
|
|
17
|
-
"cropDescription"
|
|
18
|
-
"logoPreview"
|
|
19
|
-
"logoPreviewDescription"
|
|
20
|
-
"primaryTextColor"
|
|
21
|
-
"primaryTextColorDescription"
|
|
22
|
-
"backgroundColor"
|
|
23
|
-
"backgroundColorDescription"
|
|
24
|
-
"colorsWarning"
|
|
25
|
-
"exitConfirmationTitle"
|
|
26
|
-
"exitConfirmationDescription"
|
|
27
|
-
"maxByoFileErrorMessage"
|
|
28
|
-
"genericByoErrorMessage"
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
2
|
+
"uploadYourLogo": {
|
|
3
|
+
"uploadYourLogoText": "Laden Sie Ihr Logo hoch",
|
|
4
|
+
"disclaimerText": "Bitte stellen Sie sicher, dass Sie über die Nutzungsrechte für alle hochgeladenen Bilder verfügen.",
|
|
5
|
+
"generatingDesigns": "Designs werden erstellt ...",
|
|
6
|
+
"uploadingAndConverting": "Ihr Logo wird hochgeladen und konvertiert ...",
|
|
7
|
+
"stepOf": "Schritt {{CURRENT}} von {{TOTAL}}",
|
|
8
|
+
"uploadError": "Fehler beim Hochladen",
|
|
9
|
+
"cancel": "Abbrechen",
|
|
10
|
+
"continue": "Weiter",
|
|
11
|
+
"back": "Zurück",
|
|
12
|
+
"no": "Nein",
|
|
13
|
+
"yes": "Ja",
|
|
14
|
+
"businessName": "Name des Unternehmens",
|
|
15
|
+
"businessNameDescription": "Geben Sie Ihren Logotext oder Unternehmensnamen ein",
|
|
16
|
+
"cropYourLogo": "Schneiden Sie Ihr Logo zu",
|
|
17
|
+
"cropDescription": "Schneiden Sie Ihr Logo-Design so zu, dass es auf die Arbeitsfläche unseres Logo-Erstellers passt",
|
|
18
|
+
"logoPreview": "Logo-Vorschau",
|
|
19
|
+
"logoPreviewDescription": "Ihr Logo sieht großartig aus! Helfen Sie uns bei der Einrichtung Ihres Logos, indem Sie die nächsten Schritte ausführen.",
|
|
20
|
+
"primaryTextColor": "Primäre Textfarbe",
|
|
21
|
+
"primaryTextColorDescription": "Helfen Sie uns bei der Einrichtung Ihres Logos, indem Sie die primäre Textfarbe bestätigen. Wählen Sie aus den verfügbaren Farben oder klicken Sie auf das Plus-Symbol, um eine weitere Farbe hinzuzufügen.",
|
|
22
|
+
"backgroundColor": "Hintergrundfarbe",
|
|
23
|
+
"backgroundColorDescription": "Helfen Sie uns bei der Einrichtung Ihres Logos, indem Sie die Hintergrundfarbe bestätigen. Wählen Sie aus den verfügbaren Farben oder klicken Sie auf das Plus-Symbol, um eine weitere Farbe hinzuzufügen.",
|
|
24
|
+
"colorsWarning": "Ihre Text- und Hintergrundfarben sind zu ähnlich. Bitte wählen Sie eine deutlichere Paarung, um sicherzustellen, dass sie hochwertige Designs erstellen.",
|
|
25
|
+
"exitConfirmationTitle": "Möchten Sie die Anwendung wirklich verlassen?",
|
|
26
|
+
"exitConfirmationDescription": "Der Fortschritt Ihres Logo-Uploads in dieser Sitzung geht verloren",
|
|
27
|
+
"maxByoFileErrorMessage": "Ihre Datei überschreitet die maximale Größe von 25 MB. Bitte wählen Sie eine kleinere Datei.",
|
|
28
|
+
"genericByoErrorMessage": "Es ist ein unerwarteter Fehler aufgetreten. Bitte versuchen Sie es erneut.",
|
|
29
|
+
|
|
30
|
+
"dropYourFileHere": "Legen Sie Ihre Datei hier ab oder",
|
|
31
|
+
"clickToUpload": "Klicken zum Hochladen",
|
|
32
|
+
"acceptedFiles": "Wir akzeptieren PNG-, JPG-, SVG- und EPS-Dateien bis zu 25 MB.",
|
|
33
|
+
"wrongUploadType": "Sie können Dateien dieses Typs nicht hochladen.",
|
|
34
|
+
"keywords": "Schlüsselwörter",
|
|
35
|
+
"keywordsDescription": "Fügen Sie Schlüsselwörter hinzu, die relevant für Ihr Unternehmen und Ihr Logo sind"
|
|
33
36
|
}
|
|
34
37
|
}
|