@designcrowd/fe-shared-lib 1.2.0-ml-jj-7 → 1.2.0-ml-jj-8
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 +1 -1
- package/src/experiences/components/SellDomainNameList/SellDomainNameList.vue +5 -5
- package/src/experiences/components/SellDomainNameListModal/SellDomainNameListModal.stories.js +15 -0
- package/src/experiences/components/SellDomainNameListModal/SellDomainNameListModal.vue +3 -2
- package/src/experiences/components/SellDomainNameModalApplication/SellDomainNameModalApplication.vue +3 -2
- package/src/experiences/components/SellDomainNameSearch/SellDomainNameSearch.vue +5 -5
- package/src/experiences/components/SellDomainNameSearch/useSellDomainContent.js +10 -7
- package/src/experiences/components/SellDomainNameSearchResult/SellDomainNameListSearchResult.vue +3 -3
- package/src/experiences/components/SellDomainNameWidget/SellDomainNameWidget.vue +5 -5
package/package.json
CHANGED
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
</div>
|
|
64
64
|
</template>
|
|
65
65
|
<script>
|
|
66
|
+
import { computed } from 'vue';
|
|
66
67
|
import Button from '../../../atoms/components/Button/Button.vue';
|
|
67
68
|
import Price from '../../../atoms/components/Price/Price.vue';
|
|
68
69
|
import useSellDomainContent from '../SellDomainNameSearch/useSellDomainContent';
|
|
69
|
-
|
|
70
70
|
import Events from '../../constants/event-constants';
|
|
71
71
|
|
|
72
72
|
export default {
|
|
@@ -113,10 +113,10 @@ export default {
|
|
|
113
113
|
const contentProvider = useSellDomainContent();
|
|
114
114
|
const content = contentProvider.getContent();
|
|
115
115
|
return {
|
|
116
|
-
freeDomainButtonLabel: content.freeDomainButtonLabel,
|
|
117
|
-
buyNowButtonLabel: content.buyNowButtonLabel,
|
|
118
|
-
pricePerYearLabel: content.pricePerYearLabel,
|
|
119
|
-
costPriceLabel: content.costPriceLabel,
|
|
116
|
+
freeDomainButtonLabel: computed(() => content.value.freeDomainButtonLabel),
|
|
117
|
+
buyNowButtonLabel: computed(() => content.value.buyNowButtonLabel),
|
|
118
|
+
pricePerYearLabel: computed(() => content.value.pricePerYearLabel),
|
|
119
|
+
costPriceLabel: computed(() => content.value.costPriceLabel),
|
|
120
120
|
};
|
|
121
121
|
},
|
|
122
122
|
methods: {
|
package/src/experiences/components/SellDomainNameListModal/SellDomainNameListModal.stories.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { domainNamesFixture } from '../SellDomainNameList/SellDomainNameList.fixtures';
|
|
2
2
|
import SellDomainNameListModal from './SellDomainNameListModal.vue';
|
|
3
|
+
import useSellDomainContent from '../SellDomainNameSearch/useSellDomainContent';
|
|
3
4
|
|
|
4
5
|
export default {
|
|
5
6
|
title: 'Components/SellDomainNameListModal',
|
|
@@ -11,6 +12,20 @@ export const Sample = () => {
|
|
|
11
12
|
components: {
|
|
12
13
|
SellDomainNameListModal,
|
|
13
14
|
},
|
|
15
|
+
setup() {
|
|
16
|
+
const contentProvider = useSellDomainContent();
|
|
17
|
+
|
|
18
|
+
setTimeout(() => {
|
|
19
|
+
console.log('SETTE');
|
|
20
|
+
contentProvider.setGlobalContentHandler(() => {
|
|
21
|
+
return {
|
|
22
|
+
domainSearchHeaderTitle: '++++Search a domain name',
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
}, 7000);
|
|
26
|
+
|
|
27
|
+
return {};
|
|
28
|
+
},
|
|
14
29
|
data() {
|
|
15
30
|
return {
|
|
16
31
|
domainNamesFixture,
|
|
@@ -40,6 +40,7 @@ import Modal from '../../../atoms/components/Modal/Modal.vue';
|
|
|
40
40
|
import SellDomainNameSearch from '../SellDomainNameSearch/SellDomainNameSearch.vue';
|
|
41
41
|
import SellDomainNameSearchResult from '../SellDomainNameSearchResult/SellDomainNameListSearchResult.vue';
|
|
42
42
|
import useSellDomainContent from '../SellDomainNameSearch/useSellDomainContent';
|
|
43
|
+
import { computed } from 'vue';
|
|
43
44
|
|
|
44
45
|
export default {
|
|
45
46
|
components: {
|
|
@@ -101,8 +102,8 @@ export default {
|
|
|
101
102
|
const contentProvider = useSellDomainContent();
|
|
102
103
|
const content = contentProvider.getContent();
|
|
103
104
|
return {
|
|
104
|
-
domainSearchHeaderTitle: content.domainSearchHeaderTitle,
|
|
105
|
-
domainSearchHeaderSubtitle: content.domainSearchHeaderSubtitle,
|
|
105
|
+
domainSearchHeaderTitle: computed(() => content.value.domainSearchHeaderTitle),
|
|
106
|
+
domainSearchHeaderSubtitle: computed(() => content.value.domainSearchHeaderSubtitle),
|
|
106
107
|
};
|
|
107
108
|
},
|
|
108
109
|
methods: {
|
package/src/experiences/components/SellDomainNameModalApplication/SellDomainNameModalApplication.vue
CHANGED
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
</template>
|
|
72
72
|
</template>
|
|
73
73
|
<script>
|
|
74
|
+
import { computed } from 'vue';
|
|
74
75
|
import Modal from '../../../atoms/components/Modal/Modal.vue';
|
|
75
76
|
import brandCrowdApiClient from '../../clients/brand-crowd-api.client';
|
|
76
77
|
import SellDomainNameSearch from '../SellDomainNameSearch/SellDomainNameSearch.vue';
|
|
@@ -124,8 +125,8 @@ export default {
|
|
|
124
125
|
const contentProvider = useSellDomainContent();
|
|
125
126
|
const content = contentProvider.getContent();
|
|
126
127
|
return {
|
|
127
|
-
domainSearchHeaderTitle: content.domainSearchHeaderTitle,
|
|
128
|
-
domainSearchHeaderSubtitle: content.domainSearchHeaderSubtitle,
|
|
128
|
+
domainSearchHeaderTitle: computed(() => content.value.domainSearchHeaderTitle),
|
|
129
|
+
domainSearchHeaderSubtitle: computed(() => content.value.domainSearchHeaderSubtitle),
|
|
129
130
|
};
|
|
130
131
|
},
|
|
131
132
|
data: () => ({
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
</div>
|
|
42
42
|
</template>
|
|
43
43
|
<script>
|
|
44
|
+
import { computed } from 'vue';
|
|
44
45
|
import Button from '../../../atoms/components/Button/Button.vue';
|
|
45
46
|
import TextInput from '../../../atoms/components/TextInput/TextInput.vue';
|
|
46
47
|
import useSellDomainContent from './useSellDomainContent';
|
|
47
|
-
|
|
48
48
|
import { sellDomainNameMinSearchTextLength } from '../../constants/sell-domain-name-constants';
|
|
49
49
|
|
|
50
50
|
export default {
|
|
@@ -87,10 +87,10 @@ export default {
|
|
|
87
87
|
const content = contentProvider.getContent();
|
|
88
88
|
|
|
89
89
|
return {
|
|
90
|
-
searchButtonLabel: content.searchButtonLabel,
|
|
91
|
-
searchBarLabel: content.searchBarLabel,
|
|
92
|
-
searchBarPlaceholder: content.searchBarPlaceholder,
|
|
93
|
-
searchBarPreText: content.searchBarPreText,
|
|
90
|
+
searchButtonLabel: computed(() => content.value.searchButtonLabel),
|
|
91
|
+
searchBarLabel: computed(() => content.value.searchBarLabel),
|
|
92
|
+
searchBarPlaceholder: computed(() => content.value.searchBarPlaceholder),
|
|
93
|
+
searchBarPreText: computed(() => content.value.searchBarPreText),
|
|
94
94
|
};
|
|
95
95
|
},
|
|
96
96
|
data() {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { ref, computed } from 'vue';
|
|
1
2
|
import {
|
|
2
3
|
sellDomainNameSearchBarLabel,
|
|
3
4
|
sellDomainNameSearchBarPlaceholder,
|
|
4
5
|
sellDomainNameSearchBarPreText,
|
|
5
6
|
} from '../../constants/sell-domain-name-constants';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
const globalContentProvider = ref(null);
|
|
8
9
|
|
|
9
10
|
const defaultContent = {
|
|
10
11
|
searchButtonLabel: 'Search',
|
|
@@ -25,17 +26,19 @@ const defaultContent = {
|
|
|
25
26
|
|
|
26
27
|
const useSellDomainContent = (overrides = {}) => {
|
|
27
28
|
const setGlobalContentHandler = (handler) => {
|
|
28
|
-
globalContentProvider = handler;
|
|
29
|
+
globalContentProvider.value = handler;
|
|
29
30
|
};
|
|
30
31
|
|
|
31
32
|
return {
|
|
32
33
|
setGlobalContentHandler,
|
|
33
34
|
getContent: () => {
|
|
34
|
-
return {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
return computed(() => {
|
|
36
|
+
return {
|
|
37
|
+
...defaultContent,
|
|
38
|
+
...(globalContentProvider.value ? globalContentProvider.value() : {}), // provide global content through global injection
|
|
39
|
+
...overrides, // can override specific contents on demand
|
|
40
|
+
};
|
|
41
|
+
});
|
|
39
42
|
},
|
|
40
43
|
};
|
|
41
44
|
};
|
package/src/experiences/components/SellDomainNameSearchResult/SellDomainNameListSearchResult.vue
CHANGED
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
</template>
|
|
37
37
|
|
|
38
38
|
<script>
|
|
39
|
+
import { computed } from 'vue';
|
|
39
40
|
import Loader from '../../../atoms/components/Loader/Loader.vue';
|
|
40
41
|
import Picture from '../../../atoms/components/Picture/Picture.vue';
|
|
41
|
-
|
|
42
42
|
import SellDomainNameList from '../SellDomainNameList/SellDomainNameList.vue';
|
|
43
43
|
import Events from '../../constants/event-constants';
|
|
44
44
|
import useSellDomainContent from '../SellDomainNameSearch/useSellDomainContent';
|
|
@@ -106,8 +106,8 @@ export default {
|
|
|
106
106
|
const content = contentProvider.getContent();
|
|
107
107
|
|
|
108
108
|
return {
|
|
109
|
-
domainSearchEmptyMessage: content.domainSearchEmptyMessage,
|
|
110
|
-
searchAnotherDomainMessage: content.searchAnotherDomainMessage,
|
|
109
|
+
domainSearchEmptyMessage: computed(() => content.value.domainSearchEmptyMessage),
|
|
110
|
+
searchAnotherDomainMessage: computed(() => content.value.searchAnotherDomainMessage),
|
|
111
111
|
};
|
|
112
112
|
},
|
|
113
113
|
data() {
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
</div>
|
|
39
39
|
</template>
|
|
40
40
|
<script>
|
|
41
|
+
import { computed } from 'vue';
|
|
41
42
|
import Button from '../../../atoms/components/Button/Button.vue';
|
|
42
43
|
import TextInput from '../../../atoms/components/TextInput/TextInput.vue';
|
|
43
|
-
|
|
44
44
|
import SellDomainNameListModal from '../SellDomainNameListModal/SellDomainNameListModal.vue';
|
|
45
45
|
import { sellDomainNameMinSearchTextLength } from '../../constants/sell-domain-name-constants';
|
|
46
46
|
import Events from '../../constants/event-constants';
|
|
@@ -78,10 +78,10 @@ export default {
|
|
|
78
78
|
const contentProvider = useSellDomainContent();
|
|
79
79
|
const content = contentProvider.getContent();
|
|
80
80
|
return {
|
|
81
|
-
searchButtonLabel: content.searchButtonLabel,
|
|
82
|
-
searchBarLabel: content.searchBarLabel,
|
|
83
|
-
searchBarPlaceholder: content.searchBarPlaceholder,
|
|
84
|
-
domainSearchOrConnectHeaderSubtitle: content.domainSearchOrConnectHeaderSubtitle,
|
|
81
|
+
searchButtonLabel: computed(() => content.value.searchButtonLabel),
|
|
82
|
+
searchBarLabel: computed(() => content.value.searchBarLabel),
|
|
83
|
+
searchBarPlaceholder: computed(() => content.value.searchBarPlaceholder),
|
|
84
|
+
domainSearchOrConnectHeaderSubtitle: computed(() => content.value.domainSearchOrConnectHeaderSubtitle),
|
|
85
85
|
};
|
|
86
86
|
},
|
|
87
87
|
data: () => ({
|