@designcrowd/fe-shared-lib 1.2.18-kp-2 → 1.2.18-ml-currency
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/Dockerfile +1 -1
- package/dist/css/tailwind-brandCrowd.css +2459 -0
- package/dist/css/tailwind-brandPage.css +2147 -0
- package/dist/css/tailwind-crazyDomains.css +2459 -0
- package/dist/css/tailwind-designCom.css +2459 -0
- package/dist/css/tailwind-designCrowd.css +2459 -0
- package/package.json +1 -1
- package/public/css/tailwind-brandCrowd.css +10 -3
- package/public/css/tailwind-brandPage.css +10 -3
- package/public/css/tailwind-crazyDomains.css +10 -3
- package/public/css/tailwind-designCom.css +10 -3
- package/public/css/tailwind-designCrowd.css +10 -3
- package/src/atoms/components/Price/Price.fixtures.js +63 -3
- package/src/atoms/components/Price/Price.stories.js +127 -5
- package/src/atoms/components/Price/Price.vue +24 -3
- package/src/bundles/bundled-translations.de-DE.json +1 -3
- package/src/bundles/bundled-translations.es-ES.json +1 -3
- package/src/bundles/bundled-translations.fr-FR.json +1 -3
- package/src/bundles/bundled-translations.json +1 -3
- package/src/bundles/bundled-translations.pt-PT.json +1 -3
- package/src/experiences/components/PublishBrandPageModal/PublishBrandPageModal.vue +1 -16
- package/src/experiences/components/PublishBrandPageModal/i18n/publish-brand-page-modal.de-DE.json +20 -22
- package/src/experiences/components/PublishBrandPageModal/i18n/publish-brand-page-modal.es-ES.json +20 -22
- package/src/experiences/components/PublishBrandPageModal/i18n/publish-brand-page-modal.fr-FR.json +20 -22
- package/src/experiences/components/PublishBrandPageModal/i18n/publish-brand-page-modal.json +21 -23
- package/src/experiences/components/PublishBrandPageModal/i18n/publish-brand-page-modal.pt-PT.json +20 -22
- package/src/useSharedLibTranslate.js +42 -0
package/package.json
CHANGED
|
@@ -643,6 +643,10 @@ video {
|
|
|
643
643
|
margin-top: 0px;
|
|
644
644
|
margin-bottom: 0px;
|
|
645
645
|
}
|
|
646
|
+
.theme-brandCrowd .tw-my-1 {
|
|
647
|
+
margin-top: 0.25rem;
|
|
648
|
+
margin-bottom: 0.25rem;
|
|
649
|
+
}
|
|
646
650
|
.theme-brandCrowd .tw-my-10 {
|
|
647
651
|
margin-top: 2.5rem;
|
|
648
652
|
margin-bottom: 2.5rem;
|
|
@@ -849,9 +853,6 @@ video {
|
|
|
849
853
|
.theme-brandCrowd .tw-max-h-screen {
|
|
850
854
|
max-height: 100vh;
|
|
851
855
|
}
|
|
852
|
-
.theme-brandCrowd .tw-w-1\/3 {
|
|
853
|
-
width: 33.333333%;
|
|
854
|
-
}
|
|
855
856
|
.theme-brandCrowd .tw-w-10 {
|
|
856
857
|
width: 2.5rem;
|
|
857
858
|
}
|
|
@@ -1020,6 +1021,9 @@ video {
|
|
|
1020
1021
|
.theme-brandCrowd .tw-animate-spin {
|
|
1021
1022
|
animation: tw-spin 1s linear infinite;
|
|
1022
1023
|
}
|
|
1024
|
+
.\!tw-cursor-not-allowed {
|
|
1025
|
+
cursor: not-allowed !important;
|
|
1026
|
+
}
|
|
1023
1027
|
.theme-brandCrowd .tw-cursor-not-allowed {
|
|
1024
1028
|
cursor: not-allowed;
|
|
1025
1029
|
}
|
|
@@ -2227,6 +2231,9 @@ video {
|
|
|
2227
2231
|
.theme-brandCrowd .md\:tw-ml-4 {
|
|
2228
2232
|
margin-left: 1rem;
|
|
2229
2233
|
}
|
|
2234
|
+
.theme-brandCrowd .md\:tw-mr-2 {
|
|
2235
|
+
margin-right: 0.5rem;
|
|
2236
|
+
}
|
|
2230
2237
|
.theme-brandCrowd .md\:tw-mt-0 {
|
|
2231
2238
|
margin-top: 0px;
|
|
2232
2239
|
}
|
|
@@ -643,6 +643,10 @@ video {
|
|
|
643
643
|
margin-top: 0px;
|
|
644
644
|
margin-bottom: 0px;
|
|
645
645
|
}
|
|
646
|
+
.theme-brandPage .tw-my-1 {
|
|
647
|
+
margin-top: 0.25rem;
|
|
648
|
+
margin-bottom: 0.25rem;
|
|
649
|
+
}
|
|
646
650
|
.theme-brandPage .tw-my-10 {
|
|
647
651
|
margin-top: 2.5rem;
|
|
648
652
|
margin-bottom: 2.5rem;
|
|
@@ -849,9 +853,6 @@ video {
|
|
|
849
853
|
.theme-brandPage .tw-max-h-screen {
|
|
850
854
|
max-height: 100vh;
|
|
851
855
|
}
|
|
852
|
-
.theme-brandPage .tw-w-1\/3 {
|
|
853
|
-
width: 33.333333%;
|
|
854
|
-
}
|
|
855
856
|
.theme-brandPage .tw-w-10 {
|
|
856
857
|
width: 2.5rem;
|
|
857
858
|
}
|
|
@@ -1020,6 +1021,9 @@ video {
|
|
|
1020
1021
|
.theme-brandPage .tw-animate-spin {
|
|
1021
1022
|
animation: tw-spin 1s linear infinite;
|
|
1022
1023
|
}
|
|
1024
|
+
.\!tw-cursor-not-allowed {
|
|
1025
|
+
cursor: not-allowed !important;
|
|
1026
|
+
}
|
|
1023
1027
|
.theme-brandPage .tw-cursor-not-allowed {
|
|
1024
1028
|
cursor: not-allowed;
|
|
1025
1029
|
}
|
|
@@ -1911,6 +1915,9 @@ video {
|
|
|
1911
1915
|
.theme-brandPage .md\:tw-ml-4 {
|
|
1912
1916
|
margin-left: 1rem;
|
|
1913
1917
|
}
|
|
1918
|
+
.theme-brandPage .md\:tw-mr-2 {
|
|
1919
|
+
margin-right: 0.5rem;
|
|
1920
|
+
}
|
|
1914
1921
|
.theme-brandPage .md\:tw-mt-0 {
|
|
1915
1922
|
margin-top: 0px;
|
|
1916
1923
|
}
|
|
@@ -643,6 +643,10 @@ video {
|
|
|
643
643
|
margin-top: 0px;
|
|
644
644
|
margin-bottom: 0px;
|
|
645
645
|
}
|
|
646
|
+
.theme-crazyDomains .tw-my-1 {
|
|
647
|
+
margin-top: 0.25rem;
|
|
648
|
+
margin-bottom: 0.25rem;
|
|
649
|
+
}
|
|
646
650
|
.theme-crazyDomains .tw-my-10 {
|
|
647
651
|
margin-top: 2.5rem;
|
|
648
652
|
margin-bottom: 2.5rem;
|
|
@@ -849,9 +853,6 @@ video {
|
|
|
849
853
|
.theme-crazyDomains .tw-max-h-screen {
|
|
850
854
|
max-height: 100vh;
|
|
851
855
|
}
|
|
852
|
-
.theme-crazyDomains .tw-w-1\/3 {
|
|
853
|
-
width: 33.333333%;
|
|
854
|
-
}
|
|
855
856
|
.theme-crazyDomains .tw-w-10 {
|
|
856
857
|
width: 2.5rem;
|
|
857
858
|
}
|
|
@@ -1020,6 +1021,9 @@ video {
|
|
|
1020
1021
|
.theme-crazyDomains .tw-animate-spin {
|
|
1021
1022
|
animation: tw-spin 1s linear infinite;
|
|
1022
1023
|
}
|
|
1024
|
+
.\!tw-cursor-not-allowed {
|
|
1025
|
+
cursor: not-allowed !important;
|
|
1026
|
+
}
|
|
1023
1027
|
.theme-crazyDomains .tw-cursor-not-allowed {
|
|
1024
1028
|
cursor: not-allowed;
|
|
1025
1029
|
}
|
|
@@ -2227,6 +2231,9 @@ video {
|
|
|
2227
2231
|
.theme-crazyDomains .md\:tw-ml-4 {
|
|
2228
2232
|
margin-left: 1rem;
|
|
2229
2233
|
}
|
|
2234
|
+
.theme-crazyDomains .md\:tw-mr-2 {
|
|
2235
|
+
margin-right: 0.5rem;
|
|
2236
|
+
}
|
|
2230
2237
|
.theme-crazyDomains .md\:tw-mt-0 {
|
|
2231
2238
|
margin-top: 0px;
|
|
2232
2239
|
}
|
|
@@ -643,6 +643,10 @@ video {
|
|
|
643
643
|
margin-top: 0px;
|
|
644
644
|
margin-bottom: 0px;
|
|
645
645
|
}
|
|
646
|
+
.theme-designCom .tw-my-1 {
|
|
647
|
+
margin-top: 0.25rem;
|
|
648
|
+
margin-bottom: 0.25rem;
|
|
649
|
+
}
|
|
646
650
|
.theme-designCom .tw-my-10 {
|
|
647
651
|
margin-top: 2.5rem;
|
|
648
652
|
margin-bottom: 2.5rem;
|
|
@@ -849,9 +853,6 @@ video {
|
|
|
849
853
|
.theme-designCom .tw-max-h-screen {
|
|
850
854
|
max-height: 100vh;
|
|
851
855
|
}
|
|
852
|
-
.theme-designCom .tw-w-1\/3 {
|
|
853
|
-
width: 33.333333%;
|
|
854
|
-
}
|
|
855
856
|
.theme-designCom .tw-w-10 {
|
|
856
857
|
width: 2.5rem;
|
|
857
858
|
}
|
|
@@ -1020,6 +1021,9 @@ video {
|
|
|
1020
1021
|
.theme-designCom .tw-animate-spin {
|
|
1021
1022
|
animation: tw-spin 1s linear infinite;
|
|
1022
1023
|
}
|
|
1024
|
+
.\!tw-cursor-not-allowed {
|
|
1025
|
+
cursor: not-allowed !important;
|
|
1026
|
+
}
|
|
1023
1027
|
.theme-designCom .tw-cursor-not-allowed {
|
|
1024
1028
|
cursor: not-allowed;
|
|
1025
1029
|
}
|
|
@@ -2227,6 +2231,9 @@ video {
|
|
|
2227
2231
|
.theme-designCom .md\:tw-ml-4 {
|
|
2228
2232
|
margin-left: 1rem;
|
|
2229
2233
|
}
|
|
2234
|
+
.theme-designCom .md\:tw-mr-2 {
|
|
2235
|
+
margin-right: 0.5rem;
|
|
2236
|
+
}
|
|
2230
2237
|
.theme-designCom .md\:tw-mt-0 {
|
|
2231
2238
|
margin-top: 0px;
|
|
2232
2239
|
}
|
|
@@ -643,6 +643,10 @@ video {
|
|
|
643
643
|
margin-top: 0px;
|
|
644
644
|
margin-bottom: 0px;
|
|
645
645
|
}
|
|
646
|
+
.theme-designCrowd .tw-my-1 {
|
|
647
|
+
margin-top: 0.25rem;
|
|
648
|
+
margin-bottom: 0.25rem;
|
|
649
|
+
}
|
|
646
650
|
.theme-designCrowd .tw-my-10 {
|
|
647
651
|
margin-top: 2.5rem;
|
|
648
652
|
margin-bottom: 2.5rem;
|
|
@@ -849,9 +853,6 @@ video {
|
|
|
849
853
|
.theme-designCrowd .tw-max-h-screen {
|
|
850
854
|
max-height: 100vh;
|
|
851
855
|
}
|
|
852
|
-
.theme-designCrowd .tw-w-1\/3 {
|
|
853
|
-
width: 33.333333%;
|
|
854
|
-
}
|
|
855
856
|
.theme-designCrowd .tw-w-10 {
|
|
856
857
|
width: 2.5rem;
|
|
857
858
|
}
|
|
@@ -1020,6 +1021,9 @@ video {
|
|
|
1020
1021
|
.theme-designCrowd .tw-animate-spin {
|
|
1021
1022
|
animation: tw-spin 1s linear infinite;
|
|
1022
1023
|
}
|
|
1024
|
+
.\!tw-cursor-not-allowed {
|
|
1025
|
+
cursor: not-allowed !important;
|
|
1026
|
+
}
|
|
1023
1027
|
.theme-designCrowd .tw-cursor-not-allowed {
|
|
1024
1028
|
cursor: not-allowed;
|
|
1025
1029
|
}
|
|
@@ -2227,6 +2231,9 @@ video {
|
|
|
2227
2231
|
.theme-designCrowd .md\:tw-ml-4 {
|
|
2228
2232
|
margin-left: 1rem;
|
|
2229
2233
|
}
|
|
2234
|
+
.theme-designCrowd .md\:tw-mr-2 {
|
|
2235
|
+
margin-right: 0.5rem;
|
|
2236
|
+
}
|
|
2230
2237
|
.theme-designCrowd .md\:tw-mt-0 {
|
|
2231
2238
|
margin-top: 0px;
|
|
2232
2239
|
}
|
|
@@ -11,15 +11,75 @@ export const audCurrency = {
|
|
|
11
11
|
name: 'Australian Dollars',
|
|
12
12
|
iso4127Code: 'AUD',
|
|
13
13
|
symbol: '$',
|
|
14
|
-
abbreviation: '
|
|
14
|
+
abbreviation: 'A',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const gbpCurrency = {
|
|
18
|
+
id: 3,
|
|
19
|
+
name: 'British Pound',
|
|
20
|
+
iso4127Code: 'GBP',
|
|
21
|
+
symbol: '£',
|
|
22
|
+
abbreviation: 'UK',
|
|
15
23
|
};
|
|
16
24
|
|
|
17
25
|
export const euroCurrency = {
|
|
18
|
-
id:
|
|
26
|
+
id: 4,
|
|
19
27
|
name: 'Euro',
|
|
20
28
|
iso4127Code: 'EUR',
|
|
21
29
|
symbol: '€',
|
|
22
30
|
abbreviation: 'EU',
|
|
23
31
|
};
|
|
24
32
|
|
|
25
|
-
export const
|
|
33
|
+
export const inrCurrency = {
|
|
34
|
+
id: 5,
|
|
35
|
+
name: 'Indian Rupee',
|
|
36
|
+
iso4127Code: 'INR',
|
|
37
|
+
symbol: '₹',
|
|
38
|
+
abbreviation: 'IN',
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const phpCurrency = {
|
|
42
|
+
id: 6,
|
|
43
|
+
name: 'Philippine Peso',
|
|
44
|
+
iso4127Code: 'PHP',
|
|
45
|
+
symbol: '₱',
|
|
46
|
+
abbreviation: 'PH',
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const brlCurrency = {
|
|
50
|
+
id: 7,
|
|
51
|
+
name: 'Brazilian Real',
|
|
52
|
+
iso4127Code: 'BRL',
|
|
53
|
+
symbol: 'R$',
|
|
54
|
+
abbreviation: 'R',
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export const mxnCurrency = {
|
|
58
|
+
id: 8,
|
|
59
|
+
name: 'Mexican Peso',
|
|
60
|
+
iso4127Code: 'MXN',
|
|
61
|
+
symbol: 'MX$',
|
|
62
|
+
abbreviation: 'MX',
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const zarCurrency = {
|
|
66
|
+
id: 9,
|
|
67
|
+
name: 'South African Rand',
|
|
68
|
+
iso4127Code: 'ZAR',
|
|
69
|
+
symbol: 'R',
|
|
70
|
+
abbreviation: 'R',
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export const currencies = [
|
|
74
|
+
usdCurrency,
|
|
75
|
+
audCurrency,
|
|
76
|
+
gbpCurrency,
|
|
77
|
+
euroCurrency,
|
|
78
|
+
inrCurrency,
|
|
79
|
+
phpCurrency,
|
|
80
|
+
brlCurrency,
|
|
81
|
+
mxnCurrency,
|
|
82
|
+
zarCurrency,
|
|
83
|
+
];
|
|
84
|
+
|
|
85
|
+
export const locales = [ 'en-US', 'fr-FR', 'es-ES', 'pt-PT', 'de-DE']
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import Price from './Price.vue';
|
|
2
|
-
import { currencies } from './Price.fixtures';
|
|
2
|
+
import { currencies, locales } from './Price.fixtures';
|
|
3
|
+
import { setSharedLibLocaleAsync } from "../../../useSharedLibTranslate";
|
|
4
|
+
import { defineComponent } from "vue";
|
|
5
|
+
|
|
6
|
+
await setSharedLibLocaleAsync();
|
|
3
7
|
|
|
4
8
|
// noinspection JSUnusedGlobalSymbols
|
|
5
9
|
export default {
|
|
@@ -7,6 +11,7 @@ export default {
|
|
|
7
11
|
component: Price,
|
|
8
12
|
args: {
|
|
9
13
|
currencyName: currencies[0].name,
|
|
14
|
+
locale: locales[0]
|
|
10
15
|
},
|
|
11
16
|
argTypes: {
|
|
12
17
|
amount: {
|
|
@@ -16,6 +21,10 @@ export default {
|
|
|
16
21
|
control: { type: 'select' },
|
|
17
22
|
options: currencies.map((x) => x.name),
|
|
18
23
|
},
|
|
24
|
+
locale: {
|
|
25
|
+
control: { type: 'select' },
|
|
26
|
+
options: locales,
|
|
27
|
+
},
|
|
19
28
|
},
|
|
20
29
|
};
|
|
21
30
|
|
|
@@ -31,12 +40,16 @@ export const Sample = {
|
|
|
31
40
|
selectedCurrency() {
|
|
32
41
|
return currencies.find((x) => x.name === this.args.currencyName);
|
|
33
42
|
},
|
|
43
|
+
selectedLocale() {
|
|
44
|
+
return locales.find((x) => x === this.args.locale);
|
|
45
|
+
},
|
|
34
46
|
},
|
|
35
47
|
template: `
|
|
36
48
|
<span>
|
|
37
49
|
<price
|
|
38
50
|
v-bind="args"
|
|
39
51
|
:currency="selectedCurrency"
|
|
52
|
+
:locale="selectedLocale"
|
|
40
53
|
/>
|
|
41
54
|
</span>
|
|
42
55
|
`,
|
|
@@ -59,6 +72,9 @@ export const WithFraction = {
|
|
|
59
72
|
selectedCurrency() {
|
|
60
73
|
return currencies.find((x) => x.name === this.args.currencyName);
|
|
61
74
|
},
|
|
75
|
+
selectedLocale() {
|
|
76
|
+
return locales.find((x) => x === this.args.locale);
|
|
77
|
+
},
|
|
62
78
|
},
|
|
63
79
|
template: `
|
|
64
80
|
<span>
|
|
@@ -66,7 +82,7 @@ export const WithFraction = {
|
|
|
66
82
|
v-bind="args"
|
|
67
83
|
:currency="selectedCurrency"
|
|
68
84
|
fraction="2"
|
|
69
|
-
:
|
|
85
|
+
:locale="selectedLocale"
|
|
70
86
|
/>
|
|
71
87
|
</span>
|
|
72
88
|
`,
|
|
@@ -89,6 +105,9 @@ export const AlwaysShowFractionOn = {
|
|
|
89
105
|
selectedCurrency() {
|
|
90
106
|
return currencies.find((x) => x.name === this.args.currencyName);
|
|
91
107
|
},
|
|
108
|
+
selectedLocale() {
|
|
109
|
+
return locales.find((x) => x === this.args.locale);
|
|
110
|
+
},
|
|
92
111
|
},
|
|
93
112
|
template: `
|
|
94
113
|
<span>
|
|
@@ -97,7 +116,7 @@ export const AlwaysShowFractionOn = {
|
|
|
97
116
|
:always-show-fraction="true"
|
|
98
117
|
:currency="selectedCurrency"
|
|
99
118
|
fraction="2"
|
|
100
|
-
:
|
|
119
|
+
:locale="selectedLocale"
|
|
101
120
|
/>
|
|
102
121
|
</span>
|
|
103
122
|
`,
|
|
@@ -128,7 +147,7 @@ export const AlwaysShowFractionOff = {
|
|
|
128
147
|
:always-show-fraction="false"
|
|
129
148
|
:currency="selectedCurrency"
|
|
130
149
|
fraction="2"
|
|
131
|
-
:
|
|
150
|
+
:locale="selectedLocale"
|
|
132
151
|
/>
|
|
133
152
|
</span>
|
|
134
153
|
`,
|
|
@@ -151,6 +170,9 @@ export const WithSuffix = {
|
|
|
151
170
|
selectedCurrency() {
|
|
152
171
|
return currencies.find((x) => x.name === this.args.currencyName);
|
|
153
172
|
},
|
|
173
|
+
selectedLocale() {
|
|
174
|
+
return locales.find((x) => x === this.args.locale);
|
|
175
|
+
},
|
|
154
176
|
},
|
|
155
177
|
template: `
|
|
156
178
|
<span>
|
|
@@ -159,8 +181,8 @@ export const WithSuffix = {
|
|
|
159
181
|
:always-show-fraction="true"
|
|
160
182
|
:currency="selectedCurrency"
|
|
161
183
|
fraction="2"
|
|
162
|
-
:show-abbreviation="true"
|
|
163
184
|
:suffix="suffix"
|
|
185
|
+
:locale="selectedLocale"
|
|
164
186
|
/>
|
|
165
187
|
</span>
|
|
166
188
|
`,
|
|
@@ -171,3 +193,103 @@ export const WithSuffix = {
|
|
|
171
193
|
suffix: '/yr',
|
|
172
194
|
},
|
|
173
195
|
};
|
|
196
|
+
|
|
197
|
+
export const WithLocale = {
|
|
198
|
+
render: (args, { argTypes }) => {
|
|
199
|
+
return {
|
|
200
|
+
components: { Price },
|
|
201
|
+
props: Object.keys(argTypes),
|
|
202
|
+
setup() {
|
|
203
|
+
return { args };
|
|
204
|
+
},
|
|
205
|
+
computed: {
|
|
206
|
+
selectedCurrency() {
|
|
207
|
+
return currencies.find((x) => x.name === this.args.currencyName);
|
|
208
|
+
},
|
|
209
|
+
selectedLocale() {
|
|
210
|
+
return locales.find((x) => x === this.args.locale);
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
template: `
|
|
214
|
+
<span>
|
|
215
|
+
<price
|
|
216
|
+
v-bind="args"
|
|
217
|
+
:currency="selectedCurrency"
|
|
218
|
+
:locale="selectedLocale"
|
|
219
|
+
/>
|
|
220
|
+
</span>
|
|
221
|
+
`,
|
|
222
|
+
};
|
|
223
|
+
},
|
|
224
|
+
args: {
|
|
225
|
+
amount: 22.0,
|
|
226
|
+
},
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
export const AllLocalesAndCurrencies = (args, { argTypes }) => {
|
|
230
|
+
return {
|
|
231
|
+
components: {
|
|
232
|
+
StorybookPriceComponent,
|
|
233
|
+
},
|
|
234
|
+
props: Object.keys(argTypes),
|
|
235
|
+
data() {
|
|
236
|
+
const combos = new Array(locales.length).fill(0);
|
|
237
|
+
combos.forEach((item, index) => {
|
|
238
|
+
combos[index] = new Array(currencies.length).fill(0).map((item2, index2) => ({"locale": locales[index], "currency": currencies[index2]}))
|
|
239
|
+
})
|
|
240
|
+
currencies.forEach((item) => {
|
|
241
|
+
console.log(item.iso4127Code);
|
|
242
|
+
})
|
|
243
|
+
return {
|
|
244
|
+
variants: combos,
|
|
245
|
+
};
|
|
246
|
+
},
|
|
247
|
+
template: `
|
|
248
|
+
<StorybookPriceComponent
|
|
249
|
+
:variants="variants"/>
|
|
250
|
+
<StorybookPriceComponent
|
|
251
|
+
:variants="variants"
|
|
252
|
+
:show-abbreviation="true"
|
|
253
|
+
/>
|
|
254
|
+
`,
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
const StorybookPriceComponent = defineComponent({
|
|
259
|
+
components: {
|
|
260
|
+
Price,
|
|
261
|
+
},
|
|
262
|
+
props: {
|
|
263
|
+
variants: {
|
|
264
|
+
type: Array,
|
|
265
|
+
required: true,
|
|
266
|
+
},
|
|
267
|
+
showAbbreviation: {
|
|
268
|
+
type: Boolean,
|
|
269
|
+
default: false,
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
template: `
|
|
273
|
+
<table class="tw-w-full">
|
|
274
|
+
<thead>
|
|
275
|
+
<tr>
|
|
276
|
+
<th class="tw-text-left tw-p-4 tw-bg-grayscale-400 tw-font-sans">Price</th>
|
|
277
|
+
</tr>
|
|
278
|
+
</thead>
|
|
279
|
+
<tbody>
|
|
280
|
+
<tr v-for="locale in variants" class="tw-bg-grayscale-200">
|
|
281
|
+
<td>{{ locale[0].locale }}</td>
|
|
282
|
+
<td v-for="item in locale" class="tw-p-4">
|
|
283
|
+
<price
|
|
284
|
+
:amount=10.00
|
|
285
|
+
:currency="item.currency"
|
|
286
|
+
:locale="item.locale"
|
|
287
|
+
:show-abbreviation="showAbbreviation"
|
|
288
|
+
fraction="2"
|
|
289
|
+
/>
|
|
290
|
+
</td>
|
|
291
|
+
</tr>
|
|
292
|
+
</tbody>
|
|
293
|
+
</table>
|
|
294
|
+
`,
|
|
295
|
+
});
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
</span>
|
|
6
6
|
</template>
|
|
7
7
|
<script>
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
import { priceTr, formatCurrency } from "../../../useSharedLibTranslate";
|
|
9
10
|
|
|
10
11
|
export default {
|
|
11
12
|
props: {
|
|
@@ -24,6 +25,11 @@ export default {
|
|
|
24
25
|
required: false,
|
|
25
26
|
default: null,
|
|
26
27
|
},
|
|
28
|
+
locale: {
|
|
29
|
+
type: String,
|
|
30
|
+
required: false,
|
|
31
|
+
default: null,
|
|
32
|
+
},
|
|
27
33
|
fraction: {
|
|
28
34
|
type: [Number, String],
|
|
29
35
|
required: false,
|
|
@@ -66,6 +72,21 @@ export default {
|
|
|
66
72
|
return this.free;
|
|
67
73
|
}
|
|
68
74
|
|
|
75
|
+
if (this.locale != null)
|
|
76
|
+
{
|
|
77
|
+
const formattedCurrency = formatCurrency(
|
|
78
|
+
this.amount,
|
|
79
|
+
this.locale,
|
|
80
|
+
this.currency,
|
|
81
|
+
this.fraction,
|
|
82
|
+
this.showAbbreviation
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
if (formattedCurrency) {
|
|
86
|
+
return formattedCurrency;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
69
90
|
const parsedAmount = Number.parseFloat(this.amount);
|
|
70
91
|
|
|
71
92
|
if (Number.isNaN(parsedAmount)) {
|
|
@@ -81,10 +102,10 @@ export default {
|
|
|
81
102
|
return parsedAmount.toFixed(this.fraction);
|
|
82
103
|
},
|
|
83
104
|
currencyAbbreviation() {
|
|
84
|
-
return this.showAbbreviation && this.amount
|
|
105
|
+
return this.showAbbreviation && this.amount && !this.locale ? this.currency?.abbreviation?.trim() : '';
|
|
85
106
|
},
|
|
86
107
|
currencySymbol() {
|
|
87
|
-
if (!this.amount || this.amount === 0) {
|
|
108
|
+
if (!this.amount || this.amount === 0 || this.locale) {
|
|
88
109
|
return '';
|
|
89
110
|
}
|
|
90
111
|
|
|
@@ -29,9 +29,7 @@
|
|
|
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"
|
|
33
|
-
"websiteFriendlyName": "Website",
|
|
34
|
-
"digitalBusinessCardFriendlyName": "digitale Visitenkarte"
|
|
32
|
+
"selectDomainDropdownPlaceholder": "Domain auswählen"
|
|
35
33
|
},
|
|
36
34
|
"sellDomainNameList": {
|
|
37
35
|
"freeDomainButtonLabel": "Kostenlose Domain",
|
|
@@ -29,9 +29,7 @@
|
|
|
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"
|
|
33
|
-
"websiteFriendlyName": "sitio web",
|
|
34
|
-
"digitalBusinessCardFriendlyName": "tarjeta de visita digital"
|
|
32
|
+
"selectDomainDropdownPlaceholder": "Selecciona un nombre de dominio"
|
|
35
33
|
},
|
|
36
34
|
"sellDomainNameList": {
|
|
37
35
|
"freeDomainButtonLabel": "Dominio gratis",
|
|
@@ -29,9 +29,7 @@
|
|
|
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"
|
|
33
|
-
"websiteFriendlyName": "site Web",
|
|
34
|
-
"digitalBusinessCardFriendlyName": "carte de visite numérique"
|
|
32
|
+
"selectDomainDropdownPlaceholder": "Sélectionner un nom de domaine"
|
|
35
33
|
},
|
|
36
34
|
"sellDomainNameList": {
|
|
37
35
|
"freeDomainButtonLabel": "Domaine gratuit",
|
|
@@ -29,9 +29,7 @@
|
|
|
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"
|
|
33
|
-
"websiteFriendlyName": "Website",
|
|
34
|
-
"digitalBusinessCardFriendlyName": "Digital Business Card"
|
|
32
|
+
"selectDomainDropdownPlaceholder": "Select domain name"
|
|
35
33
|
},
|
|
36
34
|
"sellDomainNameList": {
|
|
37
35
|
"freeDomainButtonLabel": "Free Domain",
|
|
@@ -29,9 +29,7 @@
|
|
|
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"
|
|
33
|
-
"websiteFriendlyName": "website",
|
|
34
|
-
"digitalBusinessCardFriendlyName": "cartão de visita digital"
|
|
32
|
+
"selectDomainDropdownPlaceholder": "Selecionar nome de domínio"
|
|
35
33
|
},
|
|
36
34
|
"sellDomainNameList": {
|
|
37
35
|
"freeDomainButtonLabel": "Domínio gratuito",
|
|
@@ -270,8 +270,6 @@ const DOMAIN_TYPES = {
|
|
|
270
270
|
|
|
271
271
|
const DCOM_IMG_FREE = 'https://brandcrowd-cdn.s3.amazonaws.com/public/assets/images/icons/publish/dcom-free-url.svg';
|
|
272
272
|
const BC_IMG_FREE = 'https://brandcrowd-cdn.s3.amazonaws.com/public/assets/images/icons/publish/bc-free-url.svg';
|
|
273
|
-
const WEBSITE_FRIENDLY_NAME = 'Website';
|
|
274
|
-
export const DIGITAL_BUSINESS_CARD = 'Digital Business Card';
|
|
275
273
|
|
|
276
274
|
export default {
|
|
277
275
|
components: {
|
|
@@ -456,9 +454,8 @@ export default {
|
|
|
456
454
|
return this.brandPageBaseUrl.replace('https://', '');
|
|
457
455
|
},
|
|
458
456
|
firstTimePublishHeaderLabel() {
|
|
459
|
-
const translatedBrandPageName = this.getLanguageAwareBrandPageDisplayName(this.brandPageDisplayName);
|
|
460
457
|
return this.publishBrandPageModalTr('firstTimePublishHeaderLabel', {
|
|
461
|
-
brandPageDisplayName:
|
|
458
|
+
brandPageDisplayName: this.brandPageDisplayName,
|
|
462
459
|
});
|
|
463
460
|
},
|
|
464
461
|
publishSuccessLabel() {
|
|
@@ -523,18 +520,6 @@ export default {
|
|
|
523
520
|
this.isModalVisible = this.isSearchDomainListModalVisible;
|
|
524
521
|
},
|
|
525
522
|
methods: {
|
|
526
|
-
getLanguageAwareBrandPageDisplayName(brandPageName) {
|
|
527
|
-
switch (brandPageName) {
|
|
528
|
-
case WEBSITE_FRIENDLY_NAME:
|
|
529
|
-
return this.te('websiteFriendlyName') ? this.t('websiteFriendlyName') : 'Website';
|
|
530
|
-
case DIGITAL_BUSINESS_CARD:
|
|
531
|
-
return this.te('digitalBusinessCardFriendlyName')
|
|
532
|
-
? this.t('digitalBusinessCardFriendlyName')
|
|
533
|
-
: 'Digital Business Card';
|
|
534
|
-
default:
|
|
535
|
-
return brandPageName;
|
|
536
|
-
}
|
|
537
|
-
},
|
|
538
523
|
onDomainTypeRadioButtonClick(domain) {
|
|
539
524
|
this.domainTypeValue = domain;
|
|
540
525
|
this.closePurchasedDomainDropdown();
|