@designcrowd/fe-shared-lib 1.2.5-ml-jj-3 → 1.2.5-ml-jj-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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@designcrowd/fe-shared-lib",
3
- "version": "1.2.5-ml-jj-3",
3
+ "version": "1.2.5-ml-jj-4",
4
4
  "scripts": {
5
5
  "start": "run-p storybook watch:translation",
6
6
  "build": "npm run build:css --production",
@@ -261,7 +261,7 @@ import SellDomainNameListModal from '../SellDomainNameListModal/SellDomainNameLi
261
261
  import brandCrowdApiClient from '../../clients/brand-crowd-api.client';
262
262
  import Events, { sitePublishedModal } from '../../constants/event-constants';
263
263
  import mediaQueryMixin from '../../mixins/mediaQueryMixin';
264
- import { tr } from '../../../useSharedLibTranslate';
264
+ import { publishBrandPageModalTr } from '../../../useSharedLibTranslate';
265
265
 
266
266
  const DOMAIN_TYPES = {
267
267
  slug: 'slug',
@@ -416,22 +416,22 @@ export default {
416
416
  ],
417
417
  setup() {
418
418
  return {
419
- tr,
420
- sitePublishedLabel: tr('publishBrandPageModal.sitePublishedLabel'),
421
- freePublishCardTitleLabel: tr('publishBrandPageModal.freePublishCardTitleLabel'),
422
- freePublishCardDescriptionLabel: tr('publishBrandPageModal.freePublishCardDescriptionLabel'),
423
- slugInputPlaceholderYourNameLabel: tr('publishBrandPageModal.slugInputPlaceholderYourNameLabel'),
424
- slugInputPlaceholderYourBusinessNameLabel: tr('publishBrandPageModal.slugInputPlaceholderYourBusinessNameLabel'),
425
- freeDomainLabel: tr('publishBrandPageModal.freeDomainLabel'),
426
- purchasedDomainLabel: tr('publishBrandPageModal.purchasedDomainLabel'),
427
- setUrlLabel: tr('publishBrandPageModal.setUrlLabel'),
428
- publishLabel: tr('publishBrandPageModal.publishLabel'),
429
- viewMoreDomainLabel: tr('publishBrandPageModal.viewMoreDomainLabel'),
430
- copyLabel: tr('publishBrandPageModal.copyLabel'),
431
- copySuccessLabel: tr('publishBrandPageModal.copySuccessLabel'),
432
- hasAlreadyPurchasedDomainCloseButtonLabel: tr('publishBrandPageModal.hasAlreadyPurchasedDomainCloseButtonLabel'),
433
- publishedSuccessDescriptionLabel: tr('publishBrandPageModal.publishedSuccessDescriptionLabel'),
434
- selectDomainDropdownPlaceholder: tr('publishBrandPageModal.selectDomainDropdownPlaceholder'),
419
+ publishBrandPageModalTr,
420
+ sitePublishedLabel: publishBrandPageModalTr('sitePublishedLabel'),
421
+ freePublishCardTitleLabel: publishBrandPageModalTr('freePublishCardTitleLabel'),
422
+ freePublishCardDescriptionLabel: publishBrandPageModalTr('freePublishCardDescriptionLabel'),
423
+ slugInputPlaceholderYourNameLabel: publishBrandPageModalTr('slugInputPlaceholderYourNameLabel'),
424
+ slugInputPlaceholderYourBusinessNameLabel: publishBrandPageModalTr('slugInputPlaceholderYourBusinessNameLabel'),
425
+ freeDomainLabel: publishBrandPageModalTr('freeDomainLabel'),
426
+ purchasedDomainLabel: publishBrandPageModalTr('purchasedDomainLabel'),
427
+ setUrlLabel: publishBrandPageModalTr('setUrlLabel'),
428
+ publishLabel: publishBrandPageModalTr('publishLabel'),
429
+ viewMoreDomainLabel: publishBrandPageModalTr('viewMoreDomainLabel'),
430
+ copyLabel: publishBrandPageModalTr('copyLabel'),
431
+ copySuccessLabel: publishBrandPageModalTr('copySuccessLabel'),
432
+ hasAlreadyPurchasedDomainCloseButtonLabel: publishBrandPageModalTr('hasAlreadyPurchasedDomainCloseButtonLabel'),
433
+ publishedSuccessDescriptionLabel: publishBrandPageModalTr('publishedSuccessDescriptionLabel'),
434
+ selectDomainDropdownPlaceholder: publishBrandPageModalTr('selectDomainDropdownPlaceholder'),
435
435
  };
436
436
  },
437
437
  data() {
@@ -454,17 +454,17 @@ export default {
454
454
  return this.brandPageBaseUrl.replace('https://', '');
455
455
  },
456
456
  firstTimePublishHeaderLabel() {
457
- return this.tr('publishBrandPageModal.firstTimePublishHeaderLabel', {
457
+ return this.publishBrandPageModalTr('firstTimePublishHeaderLabel', {
458
458
  brandPageDisplayName: this.brandPageDisplayName,
459
459
  });
460
460
  },
461
461
  publishSuccessLabel() {
462
- return this.tr('publishBrandPageModal.publishSuccessLabel', {
462
+ return this.publishBrandPageModalTr('publishSuccessLabel', {
463
463
  brandPageDisplayName: this.brandPageDisplayName,
464
464
  });
465
465
  },
466
466
  viewMyWebsiteLabel() {
467
- return this.tr('publishBrandPageModal.viewMyWebsiteLabel', {
467
+ return this.publishBrandPageModalTr('viewMyWebsiteLabel', {
468
468
  brandPageDisplayName: this.brandPageDisplayName,
469
469
  });
470
470
  },
@@ -66,7 +66,7 @@
66
66
  import Button from '../../../atoms/components/Button/Button.vue';
67
67
  import Price from '../../../atoms/components/Price/Price.vue';
68
68
  import Events from '../../constants/event-constants';
69
- import { tr } from '../../../useSharedLibTranslate';
69
+ import { sellDomainNameListTr } from '../../../useSharedLibTranslate';
70
70
 
71
71
  export default {
72
72
  components: {
@@ -110,10 +110,10 @@ export default {
110
110
  emits: ['load-more-domains'],
111
111
  setup() {
112
112
  return {
113
- freeDomainButtonLabel: tr('sellDomainNameList.freeDomainButtonLabel'),
114
- buyNowButtonLabel: tr('sellDomainNameList.buyNowButtonLabel'),
115
- pricePerYearLabel: tr('sellDomainNameList.pricePerYearLabel'),
116
- costPriceLabel: tr('sellDomainNameList.costPriceLabel'),
113
+ freeDomainButtonLabel: sellDomainNameListTr('freeDomainButtonLabel'),
114
+ buyNowButtonLabel: sellDomainNameListTr('buyNowButtonLabel'),
115
+ pricePerYearLabel: sellDomainNameListTr('pricePerYearLabel'),
116
+ costPriceLabel: sellDomainNameListTr('costPriceLabel'),
117
117
  };
118
118
  },
119
119
  methods: {
@@ -35,7 +35,7 @@
35
35
  </template>
36
36
  <script>
37
37
  import Modal from '../../../atoms/components/Modal/Modal.vue';
38
- import { tr } from '../../../useSharedLibTranslate';
38
+ import { sellDomainNameListModalTr } from '../../../useSharedLibTranslate';
39
39
 
40
40
  import SellDomainNameSearch from '../SellDomainNameSearch/SellDomainNameSearch.vue';
41
41
  import SellDomainNameSearchResult from '../SellDomainNameSearchResult/SellDomainNameListSearchResult.vue';
@@ -94,8 +94,8 @@ export default {
94
94
  emits: ['close-modal', 'input', 'search'],
95
95
  setup() {
96
96
  return {
97
- domainSearchHeaderTitle: tr('sellDomainNameListModal.domainSearchHeaderTitle'),
98
- domainSearchHeaderSubtitle: tr('sellDomainNameListModal.domainSearchHeaderSubtitle'),
97
+ domainSearchHeaderTitle: sellDomainNameListModalTr('domainSearchHeaderTitle'),
98
+ domainSearchHeaderSubtitle: sellDomainNameListModalTr('domainSearchHeaderSubtitle'),
99
99
  };
100
100
  },
101
101
  methods: {
@@ -76,7 +76,7 @@ import brandCrowdApiClient from '../../clients/brand-crowd-api.client';
76
76
  import SellDomainNameSearch from '../SellDomainNameSearch/SellDomainNameSearch.vue';
77
77
  import SellDomainNameSearchResult from '../SellDomainNameSearchResult/SellDomainNameListSearchResult.vue';
78
78
  import Events from '../../constants/event-constants';
79
- import { tr } from '../../../useSharedLibTranslate';
79
+ import { sellDomainNameModalApplicationTr } from '../../../useSharedLibTranslate';
80
80
 
81
81
  export default {
82
82
  components: {
@@ -122,8 +122,8 @@ export default {
122
122
  },
123
123
  setup() {
124
124
  return {
125
- domainSearchHeaderTitle: tr('sellDomainNameModalApplication.domainSearchHeaderTitle'),
126
- domainSearchHeaderSubtitle: tr('sellDomainNameModalApplication.domainSearchHeaderTitle'),
125
+ domainSearchHeaderTitle: sellDomainNameModalApplicationTr('domainSearchHeaderTitle'),
126
+ domainSearchHeaderSubtitle: sellDomainNameModalApplicationTr('domainSearchHeaderTitle'),
127
127
  };
128
128
  },
129
129
  data: () => ({
@@ -44,7 +44,7 @@
44
44
  import Button from '../../../atoms/components/Button/Button.vue';
45
45
  import TextInput from '../../../atoms/components/TextInput/TextInput.vue';
46
46
  import { sellDomainNameMinSearchTextLength } from '../../constants/sell-domain-name-constants';
47
- import { tr } from '../../../useSharedLibTranslate';
47
+ import { sellDomainNameSearchTr } from '../../../useSharedLibTranslate';
48
48
 
49
49
  export default {
50
50
  components: {
@@ -83,10 +83,10 @@ export default {
83
83
  emits: ['onSearch', 'onSearchTextInputChange'],
84
84
  setup() {
85
85
  return {
86
- searchButtonLabel: tr('sellDomainNameSearch.searchButtonLabel'),
87
- searchBarLabel: tr('sellDomainNameSearch.searchBarLabel'),
88
- searchBarPlaceholder: tr('sellDomainNameSearch.searchBarPlaceholder'),
89
- searchBarPreText: tr('sellDomainNameSearch.searchBarPreText'),
86
+ searchButtonLabel: sellDomainNameSearchTr('searchButtonLabel'),
87
+ searchBarLabel: sellDomainNameSearchTr('searchBarLabel'),
88
+ searchBarPlaceholder: sellDomainNameSearchTr('searchBarPlaceholder'),
89
+ searchBarPreText: sellDomainNameSearchTr('searchBarPreText'),
90
90
  };
91
91
  },
92
92
  data() {
@@ -41,7 +41,7 @@ import Loader from '../../../atoms/components/Loader/Loader.vue';
41
41
  import Picture from '../../../atoms/components/Picture/Picture.vue';
42
42
  import SellDomainNameList from '../SellDomainNameList/SellDomainNameList.vue';
43
43
  import Events from '../../constants/event-constants';
44
- import { tr } from '../../../useSharedLibTranslate';
44
+ import { sellDomainNameListSearchResultTr } from '../../../useSharedLibTranslate';
45
45
 
46
46
  export default {
47
47
  components: {
@@ -104,7 +104,7 @@ export default {
104
104
  setup() {
105
105
  return {
106
106
  tr,
107
- searchAnotherDomainMessage: tr('sellDomainNameListSearchResult.searchAnotherDomainMessage'),
107
+ searchAnotherDomainMessage: sellDomainNameListSearchResultTr('searchAnotherDomainMessage'),
108
108
  };
109
109
  },
110
110
  data() {
@@ -114,7 +114,7 @@ export default {
114
114
  },
115
115
  computed: {
116
116
  domainSearchEmptyMessageWithUserDomainName() {
117
- return tr('sellDomainNameListSearchResult.domainSearchEmptyMessage', {
117
+ return sellDomainNameListSearchResultTr('domainSearchEmptyMessage', {
118
118
  domainNameSearchTerm: this.previousSearchText,
119
119
  });
120
120
  },
@@ -38,7 +38,7 @@
38
38
  </div>
39
39
  </template>
40
40
  <script>
41
- import { tr } from '../../../useSharedLibTranslate';
41
+ import { sellDomainNameWidgetTr } from '../../../useSharedLibTranslate';
42
42
  import Button from '../../../atoms/components/Button/Button.vue';
43
43
  import TextInput from '../../../atoms/components/TextInput/TextInput.vue';
44
44
  import SellDomainNameListModal from '../SellDomainNameListModal/SellDomainNameListModal.vue';
@@ -75,10 +75,10 @@ export default {
75
75
  },
76
76
  setup() {
77
77
  return {
78
- searchButtonLabel: tr('sellDomainNameWidget.searchButtonLabel'),
79
- searchBarLabel: tr('sellDomainNameWidget.searchBarLabel'),
80
- searchBarPlaceholder: tr('sellDomainNameWidget.searchBarPlaceholder'),
81
- domainSearchOrConnectHeaderSubtitle: tr('sellDomainNameWidget.domainSearchOrConnectHeaderSubtitle'),
78
+ searchButtonLabel: sellDomainNameWidgetTr('searchButtonLabel'),
79
+ searchBarLabel: sellDomainNameWidgetTr('searchBarLabel'),
80
+ searchBarPlaceholder: sellDomainNameWidgetTr('searchBarPlaceholder'),
81
+ domainSearchOrConnectHeaderSubtitle: sellDomainNameWidgetTr('domainSearchOrConnectHeaderSubtitle'),
82
82
  };
83
83
  },
84
84
  data: () => ({
@@ -35,4 +35,34 @@ const tr = (key, valuesToInterpolate = {}) => {
35
35
  return translated;
36
36
  };
37
37
 
38
- export { setSharedLibLocaleAsync, tr };
38
+ const publishBrandPageModalTr = (key, valuesToInterpolate = {}) =>
39
+ tr(`publishBrandPageModal.${key}`, valuesToInterpolate);
40
+
41
+ const sellDomainNameWidgetTr = (key, valuesToInterpolate = {}) =>
42
+ tr(`sellDomainNameWidget.${key}`, valuesToInterpolate);
43
+
44
+ const sellDomainNameListSearchResultTr = (key, valuesToInterpolate = {}) =>
45
+ tr(`sellDomainNameListSearchResult.${key}`, valuesToInterpolate);
46
+
47
+ const sellDomainNameSearchTr = (key, valuesToInterpolate = {}) =>
48
+ tr(`sellDomainNameSearch.${key}`, valuesToInterpolate);
49
+
50
+ const sellDomainNameModalApplicationTr = (key, valuesToInterpolate = {}) =>
51
+ tr(`sellDomainNameModalApplication.${key}`, valuesToInterpolate);
52
+
53
+ const sellDomainNameListModalTr = (key, valuesToInterpolate = {}) =>
54
+ tr(`sellDomainNameListModal.${key}`, valuesToInterpolate);
55
+
56
+ const sellDomainNameListTr = (key, valuesToInterpolate = {}) => tr(`sellDomainNameList.${key}`, valuesToInterpolate);
57
+
58
+ export {
59
+ setSharedLibLocaleAsync,
60
+ tr,
61
+ publishBrandPageModalTr,
62
+ sellDomainNameWidgetTr,
63
+ sellDomainNameListSearchResultTr,
64
+ sellDomainNameSearchTr,
65
+ sellDomainNameModalApplicationTr,
66
+ sellDomainNameListModalTr,
67
+ sellDomainNameListTr,
68
+ };