@ecomplus/storefront-components 1.0.0-beta.177 → 1.0.0-beta.179
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/CHANGELOG.md +12 -0
- package/dist/storefront-components.min.js +10 -10
- package/dist/storefront-components.min.js.map +1 -1
- package/package.json +2 -2
- package/src/html/ShippingCalculator.html +31 -1
- package/src/js/LoginBlock.js +26 -2
- package/src/js/ShippingCalculator.js +4 -0
- package/src/scss/ShippingCalculator.scss +12 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ecomplus/storefront-components",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.179",
|
|
4
4
|
"description": "Vue components for E-Com Plus Storefront",
|
|
5
5
|
"main": "dist/storefront-components.min.js",
|
|
6
6
|
"scripts": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@ecomplus/search-engine": "^2.6.1",
|
|
40
40
|
"@ecomplus/shopping-cart": "^2.6.0",
|
|
41
41
|
"@ecomplus/storefront-twbs": "^7.3.6",
|
|
42
|
-
"@glidejs/glide": "^3.6.
|
|
42
|
+
"@glidejs/glide": "^3.6.1",
|
|
43
43
|
"@linusborg/vue-simple-portal": "^0.1.5",
|
|
44
44
|
"axios": "^0.27.2 || ^1.1.2",
|
|
45
45
|
"cleave.js": "^1.6.0",
|
|
@@ -50,6 +50,18 @@
|
|
|
50
50
|
key="services"
|
|
51
51
|
class="list-group"
|
|
52
52
|
>
|
|
53
|
+
<transition
|
|
54
|
+
enter-active-class="animated fadeInUp"
|
|
55
|
+
leave-active-class="animated fadeOutDown"
|
|
56
|
+
>
|
|
57
|
+
<div
|
|
58
|
+
v-if="canSelectServices && !canAutoSelectService && selectedService === null"
|
|
59
|
+
class="shipping-calculator__label"
|
|
60
|
+
>
|
|
61
|
+
<i class="i-arrow-down animated wobble"></i>
|
|
62
|
+
{{ i19selectShippingMsg }}
|
|
63
|
+
</div>
|
|
64
|
+
</transition>
|
|
53
65
|
<component
|
|
54
66
|
:is="canSelectServices ? 'a' : 'div'"
|
|
55
67
|
:href="canSelectServices && '#'"
|
|
@@ -72,7 +84,25 @@
|
|
|
72
84
|
:production-deadline="productionDeadline"
|
|
73
85
|
:data-service-code="service.service_code"
|
|
74
86
|
/>
|
|
75
|
-
<
|
|
87
|
+
<div
|
|
88
|
+
v-if="canSelectServices && !canAutoSelectService"
|
|
89
|
+
class="custom-control custom-radio"
|
|
90
|
+
>
|
|
91
|
+
<input
|
|
92
|
+
type="radio"
|
|
93
|
+
:id="`shipping-method-${service.service_code}`"
|
|
94
|
+
name="shipping-method-select"
|
|
95
|
+
class="custom-control-input"
|
|
96
|
+
:checked="selectedService === i"
|
|
97
|
+
/>
|
|
98
|
+
<label
|
|
99
|
+
class="custom-control-label"
|
|
100
|
+
:for="`shipping-method-${service.service_code}`"
|
|
101
|
+
>
|
|
102
|
+
<small>{{ service.label }}</small>
|
|
103
|
+
</label>
|
|
104
|
+
</div>
|
|
105
|
+
<small v-else>{{ service.label }}</small>
|
|
76
106
|
</slot>
|
|
77
107
|
</span>
|
|
78
108
|
</component>
|
package/src/js/LoginBlock.js
CHANGED
|
@@ -118,8 +118,12 @@ export default {
|
|
|
118
118
|
}
|
|
119
119
|
},
|
|
120
120
|
|
|
121
|
-
oauthPopup (
|
|
122
|
-
|
|
121
|
+
oauthPopup (fnOrLink) {
|
|
122
|
+
if (typeof fnOrLink === 'function') {
|
|
123
|
+
fnOrLink()
|
|
124
|
+
} else {
|
|
125
|
+
this.ecomPassport.popupOauthLink(fnOrLink)
|
|
126
|
+
}
|
|
123
127
|
this.isWaitingPopup = true
|
|
124
128
|
setTimeout(() => {
|
|
125
129
|
this.isWaitingPopup = false
|
|
@@ -138,6 +142,26 @@ export default {
|
|
|
138
142
|
},
|
|
139
143
|
|
|
140
144
|
created () {
|
|
145
|
+
if (Array.isArray(window.OAUTH_PROVIDERS)) {
|
|
146
|
+
this.oauthProviders = []
|
|
147
|
+
if (window.OAUTH_PROVIDERS.includes('google') && window.signInWithGoogle) {
|
|
148
|
+
this.oauthProviders.push({
|
|
149
|
+
link: window.signInWithGoogle,
|
|
150
|
+
faIcon: 'fa-google',
|
|
151
|
+
provider: 'google',
|
|
152
|
+
providerName: 'Google'
|
|
153
|
+
})
|
|
154
|
+
}
|
|
155
|
+
if (window.OAUTH_PROVIDERS.includes('facebook') && window.signInWithFacebook) {
|
|
156
|
+
this.oauthProviders.push({
|
|
157
|
+
link: window.signInWithFacebook,
|
|
158
|
+
faIcon: 'fa-facebook-f',
|
|
159
|
+
provider: 'facebook',
|
|
160
|
+
providerName: 'Facebook'
|
|
161
|
+
})
|
|
162
|
+
}
|
|
163
|
+
if (this.oauthProviders.length) return
|
|
164
|
+
}
|
|
141
165
|
if (!this.canFetchOauth) return
|
|
142
166
|
this.ecomPassport.fetchOauthProviders()
|
|
143
167
|
.then(({ host, baseUri, oauthPath, providers }) => {
|
|
@@ -119,6 +119,10 @@ export default {
|
|
|
119
119
|
i19calculateShipping: () => i18n(i19calculateShipping),
|
|
120
120
|
i19zipCode: () => i18n(i19zipCode),
|
|
121
121
|
i19freeShipping: () => i18n(i19freeShipping).toLowerCase(),
|
|
122
|
+
i19selectShippingMsg: () => i18n({
|
|
123
|
+
pt_br: 'Selecione uma forma de envio abaixo',
|
|
124
|
+
en_us: 'Select a shipping method below'
|
|
125
|
+
}),
|
|
122
126
|
|
|
123
127
|
cleaveOptions () {
|
|
124
128
|
return this.countryCode === 'BR'
|
|
@@ -12,6 +12,18 @@
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
&__label {
|
|
16
|
+
padding: var(--spacer-3) var(--spacer-2);
|
|
17
|
+
|
|
18
|
+
i {
|
|
19
|
+
font-size: var(--font-size-lg);
|
|
20
|
+
animation-duration: 2s;
|
|
21
|
+
animation-iteration-count: infinite;
|
|
22
|
+
margin-right: var(--spacer-2);
|
|
23
|
+
color: var(--primary-light);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
15
27
|
&__option {
|
|
16
28
|
display: flex;
|
|
17
29
|
justify-content: space-between;
|