@designcrowd/fe-shared-lib 1.2.23 → 1.2.24-ast-upsell

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.
@@ -15,7 +15,7 @@
15
15
  :class="[
16
16
  {
17
17
  'tw-w-full': !isImageMode,
18
- 'tw-p-4': !simple,
18
+ 'tw-p-4': !removeHorizontalPadding && !simple,
19
19
  'tw-max-w-md': size === 'md',
20
20
  'tw-max-w-xl': size === 'xl',
21
21
  'tw-max-w-2xl': !size && !isImageMode,
@@ -91,6 +91,11 @@ export default {
91
91
  required: false,
92
92
  default: false,
93
93
  },
94
+ removeHorizontalPadding: {
95
+ type: Boolean,
96
+ required: false,
97
+ default: false,
98
+ },
94
99
  visible: {
95
100
  type: Boolean,
96
101
  required: false,
@@ -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
+ "websiteFriendlyName": "Website",
34
+ "digitalBusinessCardFriendlyName": "Digitale Visitenkarte"
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
+ "websiteFriendlyName": "Sitio web",
34
+ "digitalBusinessCardFriendlyName": "Tarjeta de visita digital"
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
+ "websiteFriendlyName": "Site Web",
34
+ "digitalBusinessCardFriendlyName": "Carte de visite numérique"
33
35
  },
34
36
  "sellDomainNameList": {
35
37
  "freeDomainButtonLabel": "Domaine gratuit",
@@ -29,7 +29,9 @@
29
29
  "copySuccessLabel": "Copied!",
30
30
  "publishedSuccessDescriptionLabel": "Buy matching domain name for your brand",
31
31
  "hasAlreadyPurchasedDomainCloseButtonLabel": "No thanks, maybe later",
32
- "selectDomainDropdownPlaceholder": "Select domain name"
32
+ "selectDomainDropdownPlaceholder": "Select domain name",
33
+ "websiteFriendlyName": "Website",
34
+ "digitalBusinessCardFriendlyName": "Digital Business Card"
33
35
  },
34
36
  "sellDomainNameList": {
35
37
  "freeDomainButtonLabel": "Free Domain",
@@ -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
+ "websiteFriendlyName": "Website",
34
+ "digitalBusinessCardFriendlyName": "Cartão de visita digital"
33
35
  },
34
36
  "sellDomainNameList": {
35
37
  "freeDomainButtonLabel": "Domínio gratuito",
@@ -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="showUpsellRotationContainer && !isCustomDomainActive && !hasPurchasedDomains"
11
+ :class="{
12
+ 'tw-px-2 md:tw-px-8': !showUpsellRotationContainer && 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 ': !showUpsellRotationContainer,
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="!showUpsellRotationContainer">
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>
@@ -187,7 +199,10 @@
187
199
  </div>
188
200
  </div>
189
201
  <div v-else class="tw-font-sans">
190
- <div v-if="!isCustomDomainActive && !hasPurchasedDomains" class="tw-mb-6 tw-text-left">
202
+ <div
203
+ v-if="!isCustomDomainActive && !hasPurchasedDomains && !showUpsellRotationContainer"
204
+ class="tw-mb-6 tw-text-left"
205
+ >
191
206
  <div class="tw-mb-6">
192
207
  <SellDomainNameSearchWithResults
193
208
  :is-design-com="isDesignCom"
@@ -195,17 +210,12 @@
195
210
  :currency="userCurrency"
196
211
  :display-result-limit="4"
197
212
  :domain-search-location="sitePublishedModal"
213
+ show-view-more-button
198
214
  @on-change-search="onSearchTextChanged"
199
215
  @on-buy-now-click="onBuyNowClick"
216
+ @on-view-more="onViewMore"
200
217
  />
201
218
  </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
219
  </div>
210
220
  <div class="tw-px-4 tw-text-center" :class="{ 'lg:tw-px-20': hasPurchasedDomains }">
211
221
  <TextCopyField
@@ -230,6 +240,9 @@
230
240
  @on-click="onBrandPageUrlClick"
231
241
  />
232
242
  </div>
243
+ <div v-if="showUpsellRotationContainer" class="tw-border-t tw-border-solid tw-border-grayscale-500 tw-p-5">
244
+ <slot name="upsellContainer" />
245
+ </div>
233
246
  </div>
234
247
  </template>
235
248
  </Modal>
@@ -270,6 +283,8 @@ const DOMAIN_TYPES = {
270
283
 
271
284
  const DCOM_IMG_FREE = 'https://brandcrowd-cdn.s3.amazonaws.com/public/assets/images/icons/publish/dcom-free-url.svg';
272
285
  const BC_IMG_FREE = 'https://brandcrowd-cdn.s3.amazonaws.com/public/assets/images/icons/publish/bc-free-url.svg';
286
+ const WEBSITE_FRIENDLY_NAME = 'Website';
287
+ export const DIGITAL_BUSINESS_CARD = 'Digital Business Card';
273
288
 
274
289
  export default {
275
290
  components: {
@@ -403,6 +418,16 @@ export default {
403
418
  required: true,
404
419
  default: '',
405
420
  },
421
+ showUpsellRotation: {
422
+ type: Boolean,
423
+ required: true,
424
+ default: false,
425
+ },
426
+ selectedUpsellProp: {
427
+ type: Object,
428
+ required: true,
429
+ default: null,
430
+ },
406
431
  },
407
432
  emits: [
408
433
  'close-modal',
@@ -454,8 +479,9 @@ export default {
454
479
  return this.brandPageBaseUrl.replace('https://', '');
455
480
  },
456
481
  firstTimePublishHeaderLabel() {
482
+ const translatedBrandPageName = this.getLanguageAwareBrandPageDisplayName(this.brandPageDisplayName);
457
483
  return this.publishBrandPageModalTr('firstTimePublishHeaderLabel', {
458
- brandPageDisplayName: this.brandPageDisplayName,
484
+ brandPageDisplayName: translatedBrandPageName,
459
485
  });
460
486
  },
461
487
  publishSuccessLabel() {
@@ -500,6 +526,9 @@ export default {
500
526
  ? this.slugInputPlaceholderYourNameLabel
501
527
  : this.slugInputPlaceholderYourBusinessNameLabel;
502
528
  },
529
+ showUpsellRotationContainer() {
530
+ return this.showUpsellRotation && this.selectedUpsellProp;
531
+ },
503
532
  },
504
533
  watch: {
505
534
  brandPageSlug(slug) {
@@ -520,6 +549,16 @@ export default {
520
549
  this.isModalVisible = this.isSearchDomainListModalVisible;
521
550
  },
522
551
  methods: {
552
+ getLanguageAwareBrandPageDisplayName(brandPageName) {
553
+ switch (brandPageName) {
554
+ case WEBSITE_FRIENDLY_NAME:
555
+ return this.publishBrandPageModalTr('websiteFriendlyName');
556
+ case DIGITAL_BUSINESS_CARD:
557
+ return this.publishBrandPageModalTr('digitalBusinessCardFriendlyName');
558
+ default:
559
+ return brandPageName;
560
+ }
561
+ },
523
562
  onDomainTypeRadioButtonClick(domain) {
524
563
  this.domainTypeValue = domain;
525
564
  this.closePurchasedDomainDropdown();
@@ -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
+ "websiteFriendlyName" : "Website",
22
+ "digitalBusinessCardFriendlyName" : "Digitale Visitenkarte"
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
+ "websiteFriendlyName" : "Sitio web",
22
+ "digitalBusinessCardFriendlyName" : "Tarjeta de visita digital"
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
+ "websiteFriendlyName" : "Site Web",
22
+ "digitalBusinessCardFriendlyName" : "Carte de visite numérique"
21
23
  }
22
- }
24
+ }
@@ -1,22 +1,24 @@
1
1
  {
2
- "publishBrandPageModal": {
3
- "firstTimePublishHeaderLabel": "Set the URL for {{brandPageDisplayName}}",
4
- "sitePublishedLabel": "Site published!",
5
- "publishSuccessLabel": "Your {{brandPageDisplayName}} is live! Start using your link:",
6
- "freePublishCardTitleLabel": "Free Address",
7
- "freePublishCardDescriptionLabel": "Choose a free address to publish now. You can always edit the URL later",
8
- "slugInputPlaceholderYourNameLabel": "your-name",
9
- "slugInputPlaceholderYourBusinessNameLabel": "your-business-name",
10
- "freeDomainLabel": "Free domain",
11
- "purchasedDomainLabel": "Purchased domain",
12
- "setUrlLabel": "Set URL",
13
- "publishLabel": "Publish",
14
- "viewMoreDomainLabel": "VIEW MORE DOMAINS",
15
- "viewMyWebsiteLabel": "View {{brandPageDisplayName}}",
16
- "copyLabel": "Copy",
17
- "copySuccessLabel": "Copied!",
18
- "publishedSuccessDescriptionLabel": "Buy matching domain name for your brand",
19
- "hasAlreadyPurchasedDomainCloseButtonLabel": "No thanks, maybe later",
20
- "selectDomainDropdownPlaceholder": "Select domain name"
21
- }
22
- }
2
+ "publishBrandPageModal": {
3
+ "firstTimePublishHeaderLabel": "Set the URL for {{brandPageDisplayName}}",
4
+ "sitePublishedLabel": "Site published!",
5
+ "publishSuccessLabel": "Your {{brandPageDisplayName}} is live! Start using your link:",
6
+ "freePublishCardTitleLabel": "Free Address",
7
+ "freePublishCardDescriptionLabel": "Choose a free address to publish now. You can always edit the URL later",
8
+ "slugInputPlaceholderYourNameLabel": "your-name",
9
+ "slugInputPlaceholderYourBusinessNameLabel": "your-business-name",
10
+ "freeDomainLabel": "Free domain",
11
+ "purchasedDomainLabel": "Purchased domain",
12
+ "setUrlLabel": "Set URL",
13
+ "publishLabel": "Publish",
14
+ "viewMoreDomainLabel": "VIEW MORE DOMAINS",
15
+ "viewMyWebsiteLabel": "View {{brandPageDisplayName}}",
16
+ "copyLabel": "Copy",
17
+ "copySuccessLabel": "Copied!",
18
+ "publishedSuccessDescriptionLabel": "Buy matching domain name for your brand",
19
+ "hasAlreadyPurchasedDomainCloseButtonLabel": "No thanks, maybe later",
20
+ "selectDomainDropdownPlaceholder": "Select domain name",
21
+ "websiteFriendlyName": "Website",
22
+ "digitalBusinessCardFriendlyName": "Digital Business Card"
23
+ }
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
+ "websiteFriendlyName" : "Website",
22
+ "digitalBusinessCardFriendlyName" : "Cartão de visita digital"
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>