@designcrowd/fe-shared-lib 1.1.11 → 1.1.12-ml-jj-1

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.
@@ -7,6 +7,49 @@ export default {
7
7
  component: PublishBrandPageModal,
8
8
  };
9
9
 
10
+ const locale = 'en-test';
11
+
12
+ const localePublishBrandPageModalContent = {
13
+ 'en-US': {
14
+ firstTimePublishHeaderLabel: `Set the URL for your Website`,
15
+ sitePublishedLabel: `Site published!`,
16
+ publishSuccessLabel: `Your Website is live! Start using your link:`,
17
+ freePublishCardTitleLabel: `Free Address`,
18
+ freePublishCardDescriptionLabel: `Choose a free address to publish now. You can always edit the URL later`,
19
+ slugInputPlaceholderYourNameLabel: 'your-name',
20
+ slugInputPlaceholderYourBusinessNameLabel: 'your-business-name',
21
+ freeDomainLabel: `Free domain`,
22
+ purchasedDomainLabel: `Purchased domain`,
23
+ setUrlLabel: 'Set URL',
24
+ publishLabel: 'Publish',
25
+ viewMoreDomainLabel: 'VIEW MORE DOMAINS',
26
+ viewMyWebsiteLabel: 'View Website',
27
+ copyLabel: 'Copy',
28
+ copySuccessLabel: 'Copied!',
29
+ publishedSuccessDescriptionLabel: 'Buy matching domain name for your brand',
30
+ hasAlreadyPurchasedDomainCloseButtonLabel: 'No thanks, maybe later',
31
+ },
32
+ 'en-test': {
33
+ firstTimePublishHeaderLabel: `++Set the URL for your Website`,
34
+ sitePublishedLabel: `++Site published!`,
35
+ publishSuccessLabel: `++Your Website is live! Start using your link:`,
36
+ freePublishCardTitleLabel: `++Free Address`,
37
+ freePublishCardDescriptionLabel: `++Choose a free address to publish now. You can always edit the URL later`,
38
+ slugInputPlaceholderYourNameLabel: '++your-name',
39
+ slugInputPlaceholderYourBusinessNameLabel: '++your-business-name',
40
+ freeDomainLabel: `++Free domain`,
41
+ purchasedDomainLabel: `++Purchased domain`,
42
+ setUrlLabel: '++Set URL',
43
+ publishLabel: '++Publish',
44
+ viewMoreDomainLabel: '++VIEW MORE DOMAINS',
45
+ viewMyWebsiteLabel: '++View Website',
46
+ copyLabel: '++Copy',
47
+ copySuccessLabel: '++Copied!',
48
+ publishedSuccessDescriptionLabel: '++Buy matching domain name for your brand',
49
+ hasAlreadyPurchasedDomainCloseButtonLabel: '++No thanks, maybe later',
50
+ },
51
+ };
52
+
10
53
  export const NotPublishedWithPurchasedDomains = () => {
11
54
  return {
12
55
  components: {
@@ -15,6 +58,7 @@ export const NotPublishedWithPurchasedDomains = () => {
15
58
  data() {
16
59
  return {
17
60
  domains,
61
+ publishBrandPageModalContent: localePublishBrandPageModalContent[locale],
18
62
  };
19
63
  },
20
64
  methods: {},
@@ -29,6 +73,7 @@ export const NotPublishedWithPurchasedDomains = () => {
29
73
  brand-page-base-url="https://brand.site/"
30
74
  radio-value="slug"
31
75
  :show-radio-buttons="domains.length > 0"
76
+ :publishBrandPageModalContent="publishBrandPageModalContent"
32
77
  />
33
78
  `,
34
79
  };
@@ -51,6 +96,7 @@ export const PublishWithSelectedDomain = () => {
51
96
  isRegistrationComplete: false,
52
97
  status: 'Active',
53
98
  },
99
+ publishBrandPageModalContent: localePublishBrandPageModalContent[locale],
54
100
  };
55
101
  },
56
102
  methods: {
@@ -69,6 +115,7 @@ export const PublishWithSelectedDomain = () => {
69
115
  brand-page-base-url="https://brand.site/"
70
116
  radio-value="purchased"
71
117
  :show-radio-buttons="domains.length > 0"
118
+ :publishBrandPageModalContent="publishBrandPageModalContent"
72
119
  @radio-button-changed="onRadioButtonChanged"
73
120
  />
74
121
  `,
@@ -83,6 +130,7 @@ export const SetSlug = () => {
83
130
  data() {
84
131
  return {
85
132
  domains,
133
+ publishBrandPageModalContent: localePublishBrandPageModalContent[locale],
86
134
  };
87
135
  },
88
136
  methods: {},
@@ -97,6 +145,7 @@ export const SetSlug = () => {
97
145
  brand-page-base-url="https://brand.site/"
98
146
  brand-page-slug='test-slug'
99
147
  :show-radio-buttons="domains.length > 0"
148
+ :publishBrandPageModalContent="publishBrandPageModalContent"
100
149
  />
101
150
  `,
102
151
  };
@@ -109,6 +158,7 @@ export const Published = () => {
109
158
  data() {
110
159
  return {
111
160
  domains,
161
+ publishBrandPageModalContent: localePublishBrandPageModalContent[locale],
112
162
  };
113
163
  },
114
164
  methods: {},
@@ -122,6 +172,7 @@ export const Published = () => {
122
172
  brand-page-base-url="https://brand.site/"
123
173
  radio-value="slug"
124
174
  brand-page-url="https://brand.site/brandname"
175
+ :publishBrandPageModalContent="publishBrandPageModalContent"
125
176
  />
126
177
  `,
127
178
  };
@@ -134,6 +185,7 @@ export const PublishedNoDomains = () => {
134
185
  data() {
135
186
  return {
136
187
  domains: [],
188
+ publishBrandPageModalContent: localePublishBrandPageModalContent[locale],
137
189
  };
138
190
  },
139
191
  methods: {},
@@ -149,6 +201,7 @@ export const PublishedNoDomains = () => {
149
201
  brand-page-base-url="https://brand.site/"
150
202
  radio-value="slug"
151
203
  brand-page-url="https://brand.site/test-slug"
204
+ :publishBrandPageModalContent="publishBrandPageModalContent"
152
205
  />
153
206
  `,
154
207
  };
@@ -164,6 +217,7 @@ export const Free = () => {
164
217
  domains: [],
165
218
  isSearchDomainListModalVisible: false,
166
219
  isDesignCom: false,
220
+ publishBrandPageModalContent: localePublishBrandPageModalContent[locale],
167
221
  };
168
222
  },
169
223
  methods: {
@@ -185,6 +239,7 @@ export const Free = () => {
185
239
  brand-page-url="https://brand.site/brandname"
186
240
  :show-radio-buttons="domains.length > 0"
187
241
  :is-search-domain-list-modal-visible="isSearchDomainListModalVisible"
242
+ :publishBrandPageModalContent="publishBrandPageModalContent"
188
243
  @on-hide-domain-modal="onHideDomainListModal"
189
244
  >
190
245
  <template #recommended>
@@ -11,15 +11,15 @@
11
11
  >
12
12
  <template #header>
13
13
  <div v-if="isNotPublished || isSlugEditMode" class="tw-text-center tw-font-bold tw-mb-8 tw-mt-8 tw-text-4xl">
14
- <span>Set the URL for your {{ brandPageDisplayName }}</span>
14
+ <span>{{ firstTimePublishHeaderLabel }}</span>
15
15
  </div>
16
16
  <div v-if="isPublished && !isSlugEditMode" class="tw-text-center tw-font-bold tw-mb-8 tw-mt-8">
17
- <p class="tw-font-bold tw-text-black tw-mb-2 tw-text-4xl">Site published!</p>
17
+ <p class="tw-font-bold tw-text-black tw-mb-2 tw-text-4xl">{{ sitePublishedLabel }}</p>
18
18
  <p v-if="hasPurchasedDomains || isCustomDomainActive" class="tw-text-grayscale-600 tw-mb-8">
19
- Your {{ brandPageDisplayName }} is live! Start using your link:
19
+ {{ publishSuccessLabel }}
20
20
  </p>
21
21
  <p v-else class="tw-text-grayscale-600 tw-mb-8 tw-font-normal">
22
- {{ headerSubtitle }}
22
+ {{ publishedSuccessDescriptionLabel }}
23
23
  </p>
24
24
  </div>
25
25
  </template>
@@ -44,15 +44,15 @@
44
44
  for="domain-type"
45
45
  class="tw-font-sans tw-w-full tw-text-grayscale-600 tw-text-sm tw-cursor-pointer tw-ml-2"
46
46
  >
47
- <span class="tw-inline-block tw-rounded-full">Free domain</span>
47
+ <span class="tw-inline-block tw-rounded-full">{{ freeDomainLabel }}</span>
48
48
  </label>
49
49
  </div>
50
50
  <div v-if="isNotPublished || isSlugEditMode" class="tw-mt-4">
51
51
  <PublishBrandPageCard
52
52
  v-if="!hasPurchasedDomains"
53
- :imgUrl="iconUrl"
54
- title="Free Address"
55
- description="Choose a free address to publish now. You can always edit the URL later"
53
+ :img-url="iconUrl"
54
+ :title="freePublishCardTitleLabel"
55
+ :description="freePublishCardDescriptionLabel"
56
56
  :is-design-com="isDesignCom"
57
57
  :has-search-button="false"
58
58
  >
@@ -78,17 +78,17 @@
78
78
  </div>
79
79
  </div>
80
80
  <Button
81
- label="Publish"
81
+ :label="publishLabel"
82
82
  :disabled="isPublishingDisabled"
83
83
  class="tw-flex tw-items-center tw-justify-center md:tw-ml-2 tw-mt-2 md:tw-mt-0 tw-font-sans tw-font-bold tw-transition-colors tw-duration-300 tw-text-sm tw-w-full tw-rounded tw-cursor-pointer tw-w-full md:tw-w-24"
84
84
  data-test-brand-page-publish-button
85
85
  variant="primary"
86
86
  size="small-medium"
87
- @on-click="onPublish"
88
87
  :full-width="isMobile"
89
88
  :class="{
90
89
  'tw-uppercase': !isDesignCom,
91
90
  }"
91
+ @on-click="onPublish"
92
92
  />
93
93
  </div>
94
94
  </template>
@@ -128,7 +128,7 @@
128
128
  for="domain-type"
129
129
  class="tw-font-sans tw-w-full tw-text-grayscale-600 tw-text-sm tw-cursor-pointer tw-ml-2"
130
130
  >
131
- <span class="tw-inline-block tw-rounded-full">Purchased domain</span>
131
+ <span class="tw-inline-block tw-rounded-full">{{ purchasedDomainLabel }}</span>
132
132
  </label>
133
133
  </div>
134
134
  <div class="tw-mt-4 domain-dropdown">
@@ -138,6 +138,7 @@
138
138
  :element-classes="{
139
139
  'tw-h-12': true,
140
140
  }"
141
+ menu-element-classes="tw-w-full"
141
142
  :disabled="domainTypeValue === DOMAIN_TYPES.slug"
142
143
  :class="{
143
144
  'tw-text-grayscale-600 tw-font-normal': !selectedCustomDomain,
@@ -166,7 +167,7 @@
166
167
  :style="isMobile ? 'padding-left: 1.5rem; padding-right: 1.5rem;' : ''"
167
168
  >
168
169
  <Button
169
- :label="isSlugEditMode ? 'Set URL' : 'Publish'"
170
+ :label="isSlugEditMode ? setUrlLabel : publishLabel"
170
171
  :variant="isDesignCom ? 'primary' : 'primary-with-icon'"
171
172
  icon="chevron-right-wide"
172
173
  :disabled="isPublishingDisabled"
@@ -176,7 +177,7 @@
176
177
  @on-click="onPublish"
177
178
  />
178
179
  <Button
179
- label="No thanks, maybe later"
180
+ :label="hasAlreadyPurchasedDomainCloseButtonLabel"
180
181
  variant="no-border"
181
182
  size="large"
182
183
  class="tw-my-4"
@@ -198,7 +199,7 @@
198
199
  />
199
200
  </div>
200
201
  <Button
201
- label="VIEW MORE DOMAINS"
202
+ :label="viewMoreDomainLabel"
202
203
  variant="no-border"
203
204
  size="small-medium"
204
205
  class="tw-text-center"
@@ -209,11 +210,13 @@
209
210
  <TextCopyField
210
211
  button-variant="secondary"
211
212
  :text="brandPageUrl"
213
+ :default-copy-button-text="copyLabel"
214
+ :copied-button-text="copySuccessLabel"
212
215
  data-test-brand-page-copy-input
213
216
  @on-click="onCopyUrlClick"
214
217
  />
215
218
  <Button
216
- :label="`View ${brandPageDisplayName}`"
219
+ :label="viewMyWebsiteLabel"
217
220
  :variant="isDesignCom ? 'primary' : 'primary-with-icon'"
218
221
  icon="chevron-right-wide"
219
222
  size="medium"
@@ -244,13 +247,13 @@
244
247
  </div>
245
248
  </template>
246
249
  <script>
247
- import Modal from '../../../../src/atoms/components/Modal/Modal.vue';
250
+ import Modal from '../../../atoms/components/Modal/Modal.vue';
248
251
  import PublishBrandPageCard from './PublishBrandPageCard.vue';
249
- import TextInput from '../../../../src/atoms/components/TextInput/TextInput.vue';
250
- import Dropdown from '../../../../src/atoms/components/Dropdown/Dropdown.vue';
251
- import DropdownItem from '../../../../src/atoms/components/Dropdown/DropdownItem.vue';
252
- import Button from '../../../../src/atoms/components/Button/Button.vue';
253
- import TextCopyField from '../../../../src/atoms/components/TextCopyField/TextCopyField.vue';
252
+ import TextInput from '../../../atoms/components/TextInput/TextInput.vue';
253
+ import Dropdown from '../../../atoms/components/Dropdown/Dropdown.vue';
254
+ import DropdownItem from '../../../atoms/components/Dropdown/DropdownItem.vue';
255
+ import Button from '../../../atoms/components/Button/Button.vue';
256
+ import TextCopyField from '../../../atoms/components/TextCopyField/TextCopyField.vue';
254
257
 
255
258
  import SellDomainNameSearchWithResults from '../SellDomainNameSearchWithResults/SellDomainNameSearchWithResults.vue';
256
259
  import SellDomainNameListModal from '../SellDomainNameListModal/SellDomainNameListModal.vue';
@@ -258,8 +261,6 @@ import brandCrowdApiClient from '../../clients/brand-crowd-api.client';
258
261
  import Events, { sitePublishedModal } from '../../constants/event-constants';
259
262
  import mediaQueryMixin from '../../mixins/mediaQueryMixin';
260
263
 
261
- const headerSubtitle = 'Buy matching domain name for your brand';
262
-
263
264
  const DOMAIN_TYPES = {
264
265
  slug: 'slug',
265
266
  purchased: 'purchased',
@@ -398,7 +399,11 @@ export default {
398
399
  brandPageType: {
399
400
  type: String,
400
401
  required: true,
401
- default: false,
402
+ default: '',
403
+ },
404
+ publishBrandPageModalContent: {
405
+ type: Object,
406
+ required: true,
402
407
  },
403
408
  },
404
409
  emits: [
@@ -413,11 +418,30 @@ export default {
413
418
  ],
414
419
  data() {
415
420
  return {
421
+ firstTimePublishHeaderLabel: this.publishBrandPageModalContent.firstTimePublishHeaderLabel,
422
+ sitePublishedLabel: this.publishBrandPageModalContent.sitePublishedLabel,
423
+ publishSuccessLabel: this.publishBrandPageModalContent.publishSuccessLabel,
424
+ freePublishCardTitleLabel: this.publishBrandPageModalContent.freePublishCardTitleLabel,
425
+ freePublishCardDescriptionLabel: this.publishBrandPageModalContent.freePublishCardDescriptionLabel,
426
+ slugInputPlaceholderYourNameLabel: this.publishBrandPageModalContent.slugInputPlaceholderYourNameLabel,
427
+ slugInputPlaceholderYourBusinessNameLabel:
428
+ this.publishBrandPageModalContent.slugInputPlaceholderYourBusinessNameLabel,
429
+ freeDomainLabel: this.publishBrandPageModalContent.freeDomainLabel,
430
+ purchasedDomainLabel: this.publishBrandPageModalContent.purchasedDomainLabel,
431
+ setUrlLabel: this.publishBrandPageModalContent.setUrlLabel,
432
+ publishLabel: this.publishBrandPageModalContent.publishLabel,
433
+ viewMoreDomainLabel: this.publishBrandPageModalContent.viewMoreDomainLabel,
434
+ viewMyWebsiteLabel: this.publishBrandPageModalContent.viewMyWebsiteLabel,
435
+ copyLabel: this.publishBrandPageModalContent.copyLabel,
436
+ copySuccessLabel: this.publishBrandPageModalContent.copySuccessLabel,
437
+ hasAlreadyPurchasedDomainCloseButtonLabel:
438
+ this.publishBrandPageModalContent.hasAlreadyPurchasedDomainCloseButtonLabel,
439
+ publishedSuccessDescriptionLabel: this.publishBrandPageModalContent.publishedSuccessDescriptionLabel,
440
+
416
441
  DOMAIN_TYPES,
417
442
  domainTypeValue: this.radioValue,
418
443
  internalSlug: this.brandPageSlug,
419
444
  selectedCustomDomain: this.customDomain,
420
- headerSubtitle,
421
445
  userCurrency: undefined,
422
446
  isModalVisible: false,
423
447
  isLoading: false,
@@ -456,7 +480,9 @@ export default {
456
480
  return !this.allowPublish || this.isPublishing;
457
481
  },
458
482
  getPlaceHolder() {
459
- return this.brandPageType === 'brandContact' ? 'your-name' : 'your-business-name';
483
+ return this.brandPageType === 'brandContact'
484
+ ? this.slugInputPlaceholderYourNameLabel
485
+ : this.slugInputPlaceholderYourBusinessNameLabel;
460
486
  },
461
487
  },
462
488
  watch: {
@@ -36,8 +36,8 @@
36
36
  </template>
37
37
 
38
38
  <script>
39
- import Loader from '../../../../src/atoms/components/Loader/Loader.vue';
40
- import Picture from '../../../../src/atoms/components/Picture/Picture.vue';
39
+ import Loader from '../../../atoms/components/Loader/Loader.vue';
40
+ import Picture from '../../../atoms/components/Picture/Picture.vue';
41
41
 
42
42
  import SellDomainNameList from '../SellDomainNameList/SellDomainNameList.vue';
43
43
  import Events from '../../constants/event-constants';