Skip to content

Commit 2db6847

Browse files
author
rebeca
committed
Merge branch 'master' of https://github.com/rebecastilho/store-components into fix/sortVariations
2 parents fea6577 + fcee24e commit 2db6847

File tree

17 files changed

+340
-244
lines changed

17 files changed

+340
-244
lines changed

CHANGELOG.md

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,59 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10-
## [3.160.0] - 2022-06-21
10+
## [3.161.21] - 2022-07-14
11+
12+
## [3.161.20] - 2022-07-14
13+
14+
## [3.161.19] - 2022-07-14
15+
16+
## [3.161.18] - 2022-07-14
17+
18+
## [3.161.17] - 2022-07-13
19+
20+
## [3.161.16] - 2022-07-13
21+
22+
## [3.161.15] - 2022-07-13
23+
24+
## [3.161.14] - 2022-07-13
25+
26+
## [3.161.13] - 2022-07-07
27+
28+
## [3.161.12] - 2022-07-06
29+
30+
## [3.161.11] - 2022-07-06
31+
32+
## [3.161.10] - 2022-07-06
33+
34+
## [3.161.9] - 2022-07-06
35+
36+
## [3.161.8] - 2022-07-06
1137

38+
## [3.161.7] - 2022-07-06
39+
40+
## [3.161.6] - 2022-07-06
41+
42+
## [3.161.5] - 2022-07-06
43+
44+
## [3.161.4] - 2022-07-06
45+
46+
## [3.161.3] - 2022-07-06
47+
48+
## [3.161.2] - 2022-07-06
49+
50+
## [3.161.1] - 2022-07-06
51+
### Fixed
52+
- Lint issues
53+
54+
## [3.161.0] - 2022-07-05
55+
### Added
56+
- Call To Action mode on contentSchema
57+
58+
## [3.160.1] - 2022-06-23
59+
### Added
60+
- Added ` (grave accent) and ’ (apostrophe) to be removed when SKU slugified
61+
62+
## [3.160.0] - 2022-06-21
1263

1364
### Added
1465
- Added color definition for Bulgarian

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"vendor": "vtex",
33
"name": "store-components",
4-
"version": "3.160.0",
4+
"version": "3.161.21",
55
"title": "VTEX Store Components",
66
"defaultLocale": "pt-BR",
77
"description": "The VTEX store components for that render apps can use",

react/AvailabilitySubscriber.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ function AvailabilitySubscriber(props: Props) {
120120
}
121121

122122
const validateEmail = (newEmail: string) => {
123-
const emailRegex = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
123+
const emailRegex =
124+
/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
124125

125126
setEmailError(!emailRegex.test(newEmail.toLowerCase()))
126127
}

react/__mocks__/vtex.css-handles.js

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable default-param-last */
12
import React, { createContext, useContext, useMemo } from 'react'
23

34
export const useCssHandles = cssHandles => {
@@ -99,17 +100,18 @@ export const applyModifiers = (handles, modifier) => {
99100
return splitHandles.concat(modifiedHandles).join(' ').trim()
100101
}
101102

102-
// eslint-disable-next-line default-param-last
103-
export const withCssHandles = (handles = [], options) => Component => {
104-
const EnhancedComponent = props => {
105-
const { handles: cssHandles } = useCssHandles(handles, options)
103+
export const withCssHandles =
104+
(handles = [], options) =>
105+
Component => {
106+
const EnhancedComponent = props => {
107+
const { handles: cssHandles } = useCssHandles(handles, options)
106108

107-
return <Component handles={cssHandles} {...props} />
108-
}
109+
return <Component handles={cssHandles} {...props} />
110+
}
109111

110-
const displayName = Component.displayName || Component.name || 'Component'
112+
const displayName = Component.displayName || Component.name || 'Component'
111113

112-
EnhancedComponent.displayName = `withCssHandles(${displayName})`
114+
EnhancedComponent.displayName = `withCssHandles(${displayName})`
113115

114-
return EnhancedComponent
115-
}
116+
return EnhancedComponent
117+
}

react/components/Greeting/index.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ function Wrapper({ children }) {
2020
}
2121

2222
// eslint-disable-next-line react/display-name
23-
const withWrapper = Component => props => (
24-
<Wrapper>
25-
<Component {...props} />
26-
</Wrapper>
27-
)
23+
const withWrapper = Component => props =>
24+
(
25+
<Wrapper>
26+
<Component {...props} />
27+
</Wrapper>
28+
)
2829

2930
/**
3031
* @deprecated This component is deprecated.

react/components/InfoCard/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ const InfoCard = ({
148148
const containerClasses = classNames(
149149
`${handles.infoCardContainer} items-center`,
150150
{
151-
[`flex-ns ${flexOrderToken} bg-base ph2-ns pb2 justify-between`]: !isFullModeStyle,
151+
[`flex-ns ${flexOrderToken} bg-base ph2-ns pb2 justify-between`]:
152+
!isFullModeStyle,
152153
[`bg-center bb b--muted-4 flex ${justifyToken}`]: isFullModeStyle,
153154
lazyload: lazyLoad,
154155
}

react/components/Newsletter/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ import { PixelContext } from 'vtex.pixel-manager'
1010

1111
import SUBSCRIBE_NEWSLETTER from './mutations/subscribeNewsletter.graphql'
1212

13-
const EMAIL_REGEX = /^[A-z0-9+_-]+(?:\.[A-z0-9+_-]+)*@(?:[A-z0-9](?:[A-z0-9-]*[A-z0-9])?\.)+[A-z0-9](?:[A-z0-9-]*[A-z0-9])?$/
13+
const EMAIL_REGEX =
14+
/^[A-z0-9+_-]+(?:\.[A-z0-9+_-]+)*@(?:[A-z0-9](?:[A-z0-9-]*[A-z0-9])?\.)+[A-z0-9](?:[A-z0-9-]*[A-z0-9])?$/
15+
1416
const CSS_HANDLES = [
1517
'newsletter',
1618
'confirmation',

react/components/ProductImages/components/Carousel/ThumbnailSwiper.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,10 @@ const ThumbnailSwiper = props => {
107107
'swiper-thumbnails-caret-next',
108108
thumbCaretClassName,
109109
{
110-
[`bottom-0 pt7 left-0 justify-center w-100 ${styles.gradientBaseBottom}`]: isThumbsVertical,
111-
[`right-0 top-0 items-center h-100 pl6 ${styles.gradientBaseRight}`]: !isThumbsVertical,
110+
[`bottom-0 pt7 left-0 justify-center w-100 ${styles.gradientBaseBottom}`]:
111+
isThumbsVertical,
112+
[`right-0 top-0 items-center h-100 pl6 ${styles.gradientBaseRight}`]:
113+
!isThumbsVertical,
112114
}
113115
)
114116

react/components/ProductImages/components/Video/Youtube.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ class Youtube extends Component {
2424
}
2525

2626
static extractVideoID = url => {
27-
const regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/
27+
const regExp =
28+
/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/
29+
2830
const match = url.match(regExp)
2931

3032
if (match && match[7].length === 11) return match[7]

react/components/ProductPrice/Installments.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ const Installments = ({
4040
* - The selected installment will be the one with the highest `NumberOfInstallments`;
4141
* - If there is no 'interest-free' installments, the normal installments will be analyzed.
4242
*/
43-
const installment = (isEmpty(noInterestRateInstallments)
44-
? installments
45-
: noInterestRateInstallments
43+
const installment = (
44+
isEmpty(noInterestRateInstallments)
45+
? installments
46+
: noInterestRateInstallments
4647
).reduce((previous, current) =>
4748
previous.NumberOfInstallments > current.NumberOfInstallments
4849
? previous

0 commit comments

Comments
 (0)