@designcrowd/fe-shared-lib 1.2.15 → 1.2.16-ast-upsell-4

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.
Files changed (33) hide show
  1. package/index.js +4 -0
  2. package/package.json +2 -2
  3. package/public/css/tailwind-brandCrowd.css +30 -0
  4. package/public/css/tailwind-brandPage.css +30 -0
  5. package/public/css/tailwind-crazyDomains.css +30 -0
  6. package/public/css/tailwind-designCom.css +30 -0
  7. package/public/css/tailwind-designCrowd.css +30 -0
  8. package/src/atoms/components/Modal/Modal.vue +6 -1
  9. package/src/atoms/components/Upsell/DigitalBusinessCard.vue +63 -0
  10. package/src/atoms/components/Upsell/LinkInBio.vue +62 -0
  11. package/src/atoms/components/Upsell/UpgradeWebsite.vue +60 -0
  12. package/src/atoms/components/Upsell/WebDesignSupport.vue +60 -0
  13. package/src/atoms/components/Upsell/i18n/upsell-modal-components.json +17 -0
  14. package/src/bundles/bundled-translations.de-DE.json +3 -1
  15. package/src/bundles/bundled-translations.es-ES.json +3 -1
  16. package/src/bundles/bundled-translations.fr-FR.json +3 -1
  17. package/src/bundles/bundled-translations.json +15 -0
  18. package/src/bundles/bundled-translations.pt-PT.json +3 -1
  19. package/src/experiences/components/AuthFlow/SignIn.vue +10 -1
  20. package/src/experiences/components/AuthFlow/SignUp.vue +5 -0
  21. package/src/experiences/components/PublishBrandPageModal/PublishBrandPageModal.stories.js +41 -0
  22. package/src/experiences/components/PublishBrandPageModal/PublishBrandPageModal.vue +47 -25
  23. package/src/experiences/components/PublishBrandPageModal/i18n/publish-brand-page-modal.de-DE.json +3 -1
  24. package/src/experiences/components/PublishBrandPageModal/i18n/publish-brand-page-modal.es-ES.json +3 -1
  25. package/src/experiences/components/PublishBrandPageModal/i18n/publish-brand-page-modal.fr-FR.json +3 -1
  26. package/src/experiences/components/PublishBrandPageModal/i18n/publish-brand-page-modal.pt-PT.json +3 -1
  27. package/src/experiences/components/SellDomainNameSearchWithResults/SellDomainNameSearchWithResults.vue +24 -0
  28. package/src/useSharedLibTranslate.js +5 -0
  29. package/dist/css/tailwind-brandCrowd.css +0 -2493
  30. package/dist/css/tailwind-brandPage.css +0 -2177
  31. package/dist/css/tailwind-crazyDomains.css +0 -2493
  32. package/dist/css/tailwind-designCom.css +0 -2493
  33. package/dist/css/tailwind-designCrowd.css +0 -2493
@@ -0,0 +1,17 @@
1
+ {
2
+ "upsellModalComponents": {
3
+ "getStartedLabel": "Get Started",
4
+ "upgradeNowLabel": "Upgrade Now",
5
+ "linkInBioTitle": "Create your Link in Bio",
6
+ "linkInBioSubtitle": "Launch a link in bio that drives connections and elevates",
7
+ "webSupportTitle": "Get Professional Web Design Support",
8
+ "webSupportSubtitle": "Our professional web design team will help you build and get the most out of your website",
9
+ "webDesignButtonLabel": "Get Web Design Support",
10
+ "digitalBusinessCardTitle": "Create your digital business card",
11
+ "digitalBusinessCardSubtitle": "Launch a digital business card that drives connections and elevates your brand",
12
+ "upgradeWebsiteTitle": "Upgrade to premium website",
13
+ "upgradeWebsiteSubtitle": "Unlock all advanced features for more flexibility",
14
+ "legalZoomTitle": "Start your LLC for free",
15
+ "legalZoomSubtitle": "In partnership with LegalZoom, kickstart your LLC for free"
16
+ }
17
+ }
@@ -29,7 +29,9 @@
29
29
  "copySuccessLabel": "Kopiert!",
30
30
  "publishedSuccessDescriptionLabel": "Kaufen Sie eine passende Domain für Ihre Marke",
31
31
  "hasAlreadyPurchasedDomainCloseButtonLabel": "Nein, danke, vielleicht später",
32
- "selectDomainDropdownPlaceholder": "Domain auswählen"
32
+ "selectDomainDropdownPlaceholder": "Domain auswählen",
33
+ "upgradeNowLabel": "Jetzt upgraden",
34
+ "getStartedLabel": "Los geht’s"
33
35
  },
34
36
  "sellDomainNameList": {
35
37
  "freeDomainButtonLabel": "Kostenlose Domain",
@@ -29,7 +29,9 @@
29
29
  "copySuccessLabel": "¡Copiado!",
30
30
  "publishedSuccessDescriptionLabel": "Compra un nombre de dominio que coincida con tu marca",
31
31
  "hasAlreadyPurchasedDomainCloseButtonLabel": "No gracias, quizás más tarde",
32
- "selectDomainDropdownPlaceholder": "Selecciona un nombre de dominio"
32
+ "selectDomainDropdownPlaceholder": "Selecciona un nombre de dominio",
33
+ "upgradeNowLabel": "Hazte prémium ya",
34
+ "getStartedLabel": "Comienza"
33
35
  },
34
36
  "sellDomainNameList": {
35
37
  "freeDomainButtonLabel": "Dominio gratis",
@@ -29,7 +29,9 @@
29
29
  "copySuccessLabel": "Copié !",
30
30
  "publishedSuccessDescriptionLabel": "Achetez un nom de domaine correspondant à votre marque",
31
31
  "hasAlreadyPurchasedDomainCloseButtonLabel": "Non merci, peut-être plus tard",
32
- "selectDomainDropdownPlaceholder": "Sélectionner un nom de domaine"
32
+ "selectDomainDropdownPlaceholder": "Sélectionner un nom de domaine",
33
+ "upgradeNowLabel": "Mettre à niveau maintenant",
34
+ "getStartedLabel": "Commencez"
33
35
  },
34
36
  "sellDomainNameList": {
35
37
  "freeDomainButtonLabel": "Domaine gratuit",
@@ -3,6 +3,21 @@
3
3
  "domainCreditUsed": "Domain credit used",
4
4
  "free": "Free"
5
5
  },
6
+ "upsellModalComponents": {
7
+ "getStartedLabel": "Get Started",
8
+ "upgradeNowLabel": "Upgrade Now",
9
+ "linkInBioTitle": "Create your Link in Bio",
10
+ "linkInBioSubtitle": "Launch a link in bio that drives connections and elevates",
11
+ "webSupportTitle": "Get Professional Web Design Support",
12
+ "webSupportSubtitle": "Our professional web design team will help you build and get the most out of your website",
13
+ "webDesignButtonLabel": "Get Web Design Support",
14
+ "digitalBusinessCardTitle": "Create your digital business card",
15
+ "digitalBusinessCardSubtitle": "Launch a digital business card that drives connections and elevates your brand",
16
+ "upgradeWebsiteTitle": "Upgrade to premium website",
17
+ "upgradeWebsiteSubtitle": "Unlock all advanced features for more flexibility",
18
+ "legalZoomTitle": "Start your LLC for free",
19
+ "legalZoomSubtitle": "In partnership with LegalZoom, kickstart your LLC for free"
20
+ },
6
21
  "sharedPaymentConfig": {
7
22
  "onboardingIncomplete": "Onboarding Incomplete",
8
23
  "pendingVerification": "Pending Verification",
@@ -29,7 +29,9 @@
29
29
  "copySuccessLabel": "Copiado!",
30
30
  "publishedSuccessDescriptionLabel": "Compre um nome de domínio que corresponda à sua marca",
31
31
  "hasAlreadyPurchasedDomainCloseButtonLabel": "Não, obrigado, talvez mais tarde",
32
- "selectDomainDropdownPlaceholder": "Selecionar nome de domínio"
32
+ "selectDomainDropdownPlaceholder": "Selecionar nome de domínio",
33
+ "upgradeNowLabel": "Faça upgrade agora",
34
+ "getStartedLabel": "Comece"
33
35
  },
34
36
  "sellDomainNameList": {
35
37
  "freeDomainButtonLabel": "Domínio gratuito",
@@ -57,7 +57,7 @@
57
57
  </p>
58
58
  <div class="tw-flex tw-flex-col">
59
59
  <div>
60
- <form id="signin" action="/identity/account/signin" method="post" @submit="validate">
60
+ <form id="signin" :action="getSignInAction" method="post" @submit="validate">
61
61
  <input name="__RequestVerificationToken" type="hidden" :value="antiForgeryToken" />
62
62
  <label for="userName" class="tw-sr-only"> {{ emailLabel }} </label>
63
63
  <input
@@ -170,6 +170,7 @@ import themeMixin from '../../mixins/themeMixin';
170
170
  import { SIGN_IN } from '../../constants/partner-dictionary-constants';
171
171
  import isValidEmail from '../../helpers/email-validator';
172
172
  import SocialSignIn from './SocialSignIn.vue';
173
+ import { getCurrentLocale } from '../../../useSharedLibTranslate';
173
174
 
174
175
  export default {
175
176
  components: {
@@ -334,6 +335,9 @@ export default {
334
335
  isLoading() {
335
336
  return this.emailLoading || this.facebookLoading || this.googleLoading;
336
337
  },
338
+ currentLocale() {
339
+ return getCurrentLocale();
340
+ },
337
341
  submissionButtonLabelLowercase() {
338
342
  return this.submissionButtonLabel.toLowerCase();
339
343
  },
@@ -369,6 +373,11 @@ export default {
369
373
  }
370
374
  return this.signUpText;
371
375
  },
376
+ getSignInAction() {
377
+ const params = new URLSearchParams();
378
+ params.set('locale', this.currentLocale);
379
+ return `/identity/account/signin?${params.toString()}`;
380
+ },
372
381
  },
373
382
  watch: {
374
383
  capturePassword() {
@@ -34,6 +34,7 @@
34
34
  </h2>
35
35
  <form id="signup" action="/identity/account/signup" method="post" @submit="validate">
36
36
  <input name="__RequestVerificationToken" type="hidden" :value="antiForgeryToken" />
37
+ <input name="requestLocale" type="hidden" :value="currentLocale" />
37
38
  <label for="userName" class="tw-sr-only"> {{ emailLabel }} </label>
38
39
  <input
39
40
  v-model="aUserName"
@@ -116,6 +117,7 @@ import SocialSignIn from './SocialSignIn.vue';
116
117
  import SubmissionButton from './SubmissionButton.vue';
117
118
  import AuthLegal from './AuthLegal.vue';
118
119
  import themeMixin from '../../mixins/themeMixin';
120
+ import { getCurrentLocale } from '../../../useSharedLibTranslate';
119
121
 
120
122
  export default {
121
123
  components: {
@@ -229,6 +231,9 @@ export default {
229
231
  }
230
232
  return url?.toString();
231
233
  },
234
+ currentLocale() {
235
+ return getCurrentLocale();
236
+ },
232
237
  },
233
238
  methods: {
234
239
  validate(e) {
@@ -1,5 +1,6 @@
1
1
  import Card from './PublishBrandPageCard.vue';
2
2
  import PublishBrandPageModal from './PublishBrandPageModal.vue';
3
+ import UpgradeWebsite from '../../../atoms/components/Upsell/UpgradeWebsite.vue';
3
4
  import { domains } from './__fixtures__/data';
4
5
  import { setSharedLibLocaleAsync } from '../../../useSharedLibTranslate';
5
6
 
@@ -224,3 +225,43 @@ export const Free = () => {
224
225
  };
225
226
 
226
227
  Free.loaders = [loadTranslationAsync];
228
+
229
+ export const PublishedNoDomainsABtestUpgrade = () => {
230
+ return {
231
+ components: {
232
+ PublishBrandPageModal,
233
+ UpgradeWebsite
234
+ },
235
+ data() {
236
+ return {
237
+ domains: [],
238
+ upgradeProps: {
239
+ title: 'Upgrade to premium website',
240
+ subtitle: 'Unlock all advanced features for more flexibility',
241
+ imageUrl: 'https://bcassetcdn.com/assets/images/modal/onboarding-upsell-website@2x.en-us.png',
242
+ },
243
+ };
244
+ },
245
+ template: `
246
+ <PublishBrandPageModal
247
+ visible
248
+ :is-design-com="false"
249
+ is-published
250
+ should-publish
251
+ :domains="domains"
252
+ brand-page-display-name='Website'
253
+ brand-page-slug='test-slug'
254
+ brand-page-base-url="https://brand.site"
255
+ radio-value="slug"
256
+ show-upsell-rotation
257
+ brand-page-url="https://brand.site/test-slug">
258
+ <template #upsellContainer>
259
+ <UpgradeWebsite
260
+ button-url="https://example.com/upgrade"
261
+ />
262
+ </PublishBrandPageModal>
263
+ `,
264
+ };
265
+ };
266
+
267
+ PublishedNoDomainsABtestUpgrade.loaders = [loadTranslationAsync];
@@ -1,26 +1,38 @@
1
1
  <template>
2
2
  <div class="publish-bp--container">
3
3
  <Modal
4
- classes="publish-bp--modal tw-px-2 md:tw-px-8"
4
+ classes="publish-bp--modal tw-pt-4"
5
5
  close-on-esc
6
6
  :visible="visible"
7
7
  :hide-scrollbar="false"
8
8
  :show-modal-background-image="showModalBackgroundImage"
9
9
  :content-classes="isBusy ? ['tw-overflow-y-hidden'] : []"
10
+ :remove-horizontal-padding="showUpsellRotation && !isCustomDomainActive && !hasPurchasedDomains"
11
+ :class="{
12
+ 'tw-px-2 md:tw-px-8': !showUpsellRotation && isCustomDomainActive && hasPurchasedDomains,
13
+ }"
10
14
  @close-modal="onCloseModal"
11
15
  >
12
16
  <template #header>
13
17
  <div v-if="isNotPublished || isSlugEditMode" class="tw-text-center tw-font-bold tw-mb-8 tw-mt-8 tw-text-4xl">
14
18
  <span>{{ firstTimePublishHeaderLabel }}</span>
15
19
  </div>
16
- <div v-if="isPublished && !isSlugEditMode" class="tw-text-center tw-font-bold tw-mb-8 tw-mt-8">
20
+ <div
21
+ v-if="isPublished && !isSlugEditMode"
22
+ class="tw-text-center tw-font-bold tw-mt-8"
23
+ :class="{
24
+ 'tw-mb-8 ': !showUpsellRotation,
25
+ }"
26
+ >
17
27
  <p class="tw-font-bold tw-text-black tw-mb-2 tw-text-4xl">{{ sitePublishedLabel }}</p>
18
- <p v-if="hasPurchasedDomains || isCustomDomainActive" class="tw-text-grayscale-600 tw-mb-8">
19
- {{ publishSuccessLabel }}
20
- </p>
21
- <p v-else class="tw-text-grayscale-600 tw-mb-8 tw-font-normal">
22
- {{ publishedSuccessDescriptionLabel }}
23
- </p>
28
+ <div v-if="!showUpsellRotation">
29
+ <p v-if="hasPurchasedDomains || isCustomDomainActive" class="tw-text-grayscale-600 tw-mb-8">
30
+ {{ publishSuccessLabel }}
31
+ </p>
32
+ <p v-else class="tw-text-grayscale-600 tw-mb-8 tw-font-normal">
33
+ {{ publishedSuccessDescriptionLabel }}
34
+ </p>
35
+ </div>
24
36
  </div>
25
37
  </template>
26
38
  <template #default>
@@ -188,24 +200,21 @@
188
200
  </div>
189
201
  <div v-else class="tw-font-sans">
190
202
  <div v-if="!isCustomDomainActive && !hasPurchasedDomains" class="tw-mb-6 tw-text-left">
191
- <div class="tw-mb-6">
192
- <SellDomainNameSearchWithResults
193
- :is-design-com="isDesignCom"
194
- :initial-search-term="searchText"
195
- :currency="userCurrency"
196
- :display-result-limit="4"
197
- :domain-search-location="sitePublishedModal"
198
- @on-change-search="onSearchTextChanged"
199
- @on-buy-now-click="onBuyNowClick"
200
- />
203
+ <div v-if="!showUpsellRotation">
204
+ <div class="tw-mb-6">
205
+ <SellDomainNameSearchWithResults
206
+ :is-design-com="isDesignCom"
207
+ :initial-search-term="searchText"
208
+ :currency="userCurrency"
209
+ :display-result-limit="4"
210
+ :domain-search-location="sitePublishedModal"
211
+ show-view-more-button
212
+ @on-change-search="onSearchTextChanged"
213
+ @on-buy-now-click="onBuyNowClick"
214
+ @on-view-more="onViewMore"
215
+ />
216
+ </div>
201
217
  </div>
202
- <Button
203
- :label="viewMoreDomainLabel"
204
- variant="no-border"
205
- size="small-medium"
206
- class="tw-text-center"
207
- @on-click="onViewMore"
208
- />
209
218
  </div>
210
219
  <div class="tw-px-4 tw-text-center" :class="{ 'lg:tw-px-20': hasPurchasedDomains }">
211
220
  <TextCopyField
@@ -230,6 +239,9 @@
230
239
  @on-click="onBrandPageUrlClick"
231
240
  />
232
241
  </div>
242
+ <div v-if="showUpsellRotation" class="tw-border-t tw-border-solid tw-border-grayscale-500 tw-p-5">
243
+ <slot name="upsellContainer" />
244
+ </div>
233
245
  </div>
234
246
  </template>
235
247
  </Modal>
@@ -403,6 +415,16 @@ export default {
403
415
  required: true,
404
416
  default: '',
405
417
  },
418
+ showUpsellRotation: {
419
+ type: Boolean,
420
+ required: true,
421
+ default: false,
422
+ },
423
+ selectedUpsellProp: {
424
+ type: Object,
425
+ required: true,
426
+ default: null,
427
+ },
406
428
  },
407
429
  emits: [
408
430
  'close-modal',
@@ -17,6 +17,8 @@
17
17
  "copySuccessLabel" : "Kopiert!",
18
18
  "publishedSuccessDescriptionLabel" : "Kaufen Sie eine passende Domain für Ihre Marke",
19
19
  "hasAlreadyPurchasedDomainCloseButtonLabel" : "Nein, danke, vielleicht später",
20
- "selectDomainDropdownPlaceholder" : "Domain auswählen"
20
+ "selectDomainDropdownPlaceholder" : "Domain auswählen",
21
+ "upgradeNowLabel" : "Jetzt upgraden",
22
+ "getStartedLabel" : "Los geht’s"
21
23
  }
22
24
  }
@@ -17,6 +17,8 @@
17
17
  "copySuccessLabel" : "¡Copiado!",
18
18
  "publishedSuccessDescriptionLabel" : "Compra un nombre de dominio que coincida con tu marca",
19
19
  "hasAlreadyPurchasedDomainCloseButtonLabel" : "No gracias, quizás más tarde",
20
- "selectDomainDropdownPlaceholder" : "Selecciona un nombre de dominio"
20
+ "selectDomainDropdownPlaceholder" : "Selecciona un nombre de dominio",
21
+ "upgradeNowLabel" : "Hazte prémium ya",
22
+ "getStartedLabel" : "Comienza"
21
23
  }
22
24
  }
@@ -17,6 +17,8 @@
17
17
  "copySuccessLabel" : "Copié !",
18
18
  "publishedSuccessDescriptionLabel" : "Achetez un nom de domaine correspondant à votre marque",
19
19
  "hasAlreadyPurchasedDomainCloseButtonLabel" : "Non merci, peut-être plus tard",
20
- "selectDomainDropdownPlaceholder" : "Sélectionner un nom de domaine"
20
+ "selectDomainDropdownPlaceholder" : "Sélectionner un nom de domaine",
21
+ "upgradeNowLabel" : "Mettre à niveau maintenant",
22
+ "getStartedLabel" : "Commencez"
21
23
  }
22
24
  }
@@ -17,6 +17,8 @@
17
17
  "copySuccessLabel" : "Copiado!",
18
18
  "publishedSuccessDescriptionLabel" : "Compre um nome de domínio que corresponda à sua marca",
19
19
  "hasAlreadyPurchasedDomainCloseButtonLabel" : "Não, obrigado, talvez mais tarde",
20
- "selectDomainDropdownPlaceholder" : "Selecionar nome de domínio"
20
+ "selectDomainDropdownPlaceholder" : "Selecionar nome de domínio",
21
+ "upgradeNowLabel" : "Faça upgrade agora",
22
+ "getStartedLabel" : "Comece"
21
23
  }
22
24
  }
@@ -22,6 +22,14 @@
22
22
  :domain-search-location="domainSearchLocation"
23
23
  @on-buy-now-click="onBuyNowClick"
24
24
  />
25
+ <Button
26
+ v-if="showViewMoreButton"
27
+ :label="viewMoreDomainLabel"
28
+ variant="no-border"
29
+ size="small-medium"
30
+ class="tw-text-center tw-pt-6"
31
+ @on-click="onViewMore"
32
+ />
25
33
  </div>
26
34
  </template>
27
35
  <script>
@@ -30,6 +38,8 @@ import SellDomainNameSearchResult from '../SellDomainNameSearchResult/SellDomain
30
38
 
31
39
  import brandCrowdApiClient from '../../clients/brand-crowd-api.client';
32
40
  import Events from '../../constants/event-constants';
41
+ import { publishBrandPageModalTr } from '../../../useSharedLibTranslate';
42
+ import Button from '../../../atoms/components/Button/Button.vue';
33
43
 
34
44
  const TEXT_CHANGED_PARAM = 'textChanged';
35
45
 
@@ -37,6 +47,7 @@ export default {
37
47
  components: {
38
48
  SellDomainNameSearch,
39
49
  SellDomainNameSearchResult,
50
+ Button,
40
51
  },
41
52
  props: {
42
53
  currency: {
@@ -101,6 +112,16 @@ export default {
101
112
  type: Number,
102
113
  default: undefined,
103
114
  },
115
+ showViewMoreButton: {
116
+ type: Boolean,
117
+ default: false,
118
+ },
119
+ },
120
+ setup() {
121
+ return {
122
+ publishBrandPageModalTr,
123
+ viewMoreDomainLabel: publishBrandPageModalTr('viewMoreDomainLabel'),
124
+ };
104
125
  },
105
126
  data: () => ({
106
127
  domainNameItems: undefined,
@@ -184,6 +205,9 @@ export default {
184
205
  const urlParams = new URLSearchParams(window.location.search);
185
206
  return urlParams.get(TEXT_CHANGED_PARAM)?.toUpperCase() === 'TRUE' || false;
186
207
  },
208
+ onViewMore() {
209
+ this.$emit('on-view-more');
210
+ },
187
211
  },
188
212
  };
189
213
  </script>
@@ -27,6 +27,8 @@ const setSharedLibLocaleAsync = async (locale = 'en-US') => {
27
27
  await i18next.addResourceBundle(localeToUse, 'fe-shared-lib', {
28
28
  ...languageFile,
29
29
  });
30
+
31
+ await i18next.changeLanguage(localeToUse);
30
32
  };
31
33
 
32
34
  const tr = (key, valuesToInterpolate = {}) => {
@@ -59,6 +61,8 @@ const sharedPaymentConfigTr = (key, valuesToInterpolate = {}) => tr(`sharedPayme
59
61
 
60
62
  const priceTr = (key, valuesToInterpolate = {}) => tr(`price.${key}`, valuesToInterpolate);
61
63
 
64
+ const upsellModalComponentsTr = (key, valuesToInterpolate = {}) => tr(`upsellModalComponents.${key}`, valuesToInterpolate);
65
+
62
66
  const getCurrentLocale = () => {
63
67
  return i18next.language || 'en-US';
64
68
  };
@@ -76,4 +80,5 @@ export {
76
80
  sellDomainNameListTr,
77
81
  sharedPaymentConfigTr,
78
82
  priceTr,
83
+ upsellModalComponentsTr,
79
84
  };