@magento/venia-ui 11.5.0 → 11.6.0-alpha.12
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/lib/RootComponents/Category/__tests__/__snapshots__/categoryContent.shimmer.spec.js.snap +12 -12
- package/lib/RootComponents/Category/categoryContent.js +2 -1
- package/lib/components/AuthBar/authBar.js +6 -4
- package/lib/components/CartPage/ProductListing/EditModal/__tests__/__snapshots__/productForm.spec.js.snap +2 -2
- package/lib/components/CartPage/__tests__/__snapshots__/cartPage.spec.js.snap +12 -6
- package/lib/components/CartPage/cartPage.js +12 -6
- package/lib/components/CheckoutPage/ItemsReview/__tests__/__snapshots__/itemsReview.spec.js.snap +3 -3
- package/lib/components/CheckoutPage/ItemsReview/itemsReview.js +1 -16
- package/lib/components/CheckoutPage/OrderConfirmationPage/__fixtures__/cartItems.js +33 -0
- package/lib/components/CheckoutPage/OrderConfirmationPage/__tests__/__snapshots__/orderConfirmationPage.spec.js.snap +135 -1
- package/lib/components/CheckoutPage/OrderConfirmationPage/__tests__/orderConfirmationPage.spec.js +40 -3
- package/lib/components/CheckoutPage/OrderConfirmationPage/orderConfirmationPage.js +118 -103
- package/lib/components/CheckoutPage/checkoutPage.js +15 -7
- package/lib/components/CreateAccount/__tests__/createAccount.spec.js +30 -0
- package/lib/components/FilterModal/CurrentFilters/__tests__/currentFilter.spec.js +6 -1
- package/lib/components/FilterModal/CurrentFilters/currentFilter.js +11 -1
- package/lib/components/FilterModal/FilterList/__tests__/filterList.spec.js +16 -3
- package/lib/components/FilterModal/FilterList/filterList.js +81 -31
- package/lib/components/FilterModal/filterBlock.js +2 -1
- package/lib/components/FilterSidebar/__tests__/filterSidebar.spec.js +51 -19
- package/lib/components/FilterSidebar/filterSidebar.js +36 -2
- package/lib/components/Gallery/__tests__/__snapshots__/gallery.spec.js.snap +2 -2
- package/lib/components/Gallery/__tests__/__snapshots__/item.spec.js.snap +3 -3
- package/lib/components/MiniCart/ProductList/__tests__/__snapshots__/item.spec.js.snap +4 -4
- package/lib/components/MiniCart/miniCart.js +16 -12
- package/lib/components/OrderHistoryPage/OrderDetails/__tests__/__snapshots__/item.spec.js.snap +1 -1
- package/lib/components/OrderHistoryPage/collapsedImageGallery.js +3 -0
- package/lib/components/ProductImageCarousel/__tests__/__snapshots__/carousel.spec.js.snap +7 -7
- package/lib/components/ProductImageCarousel/__tests__/__snapshots__/thumbnail.spec.js.snap +4 -4
- package/lib/components/RangeSlider/rangeSlider.js +127 -0
- package/lib/components/RangeSlider/rangeSlider.module.css +76 -0
- package/lib/components/SearchBar/__tests__/__snapshots__/suggestedProduct.spec.js.snap +1 -1
- package/lib/components/SignIn/__tests__/signIn.spec.js +31 -0
- package/lib/components/SignIn/signIn.js +0 -2
- package/lib/components/WishlistPage/__tests__/__snapshots__/wishlistItem.spec.js.snap +2 -2
- package/lib/defaultRoutes.json +6 -0
- package/package.json +4 -4
- package/upward.yml +31 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
.slider {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.trackslider,
|
|
6
|
+
.rangeslider {
|
|
7
|
+
position: absolute;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.trackslider,
|
|
11
|
+
.rangeslider {
|
|
12
|
+
border-radius: 4px;
|
|
13
|
+
height: 6px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.trackslider {
|
|
17
|
+
background-color: #022140;
|
|
18
|
+
width: 100%;
|
|
19
|
+
z-index: 1;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.rangeslider {
|
|
23
|
+
z-index: 2;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.thumb,
|
|
27
|
+
.thumb::-webkit-slider-thumb {
|
|
28
|
+
-webkit-appearance: none;
|
|
29
|
+
-webkit-tap-highlight-color: transparent;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.thumb {
|
|
33
|
+
pointer-events: none;
|
|
34
|
+
position: absolute;
|
|
35
|
+
height: 0;
|
|
36
|
+
outline: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.thumbleft {
|
|
40
|
+
z-index: 3;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.thumbright {
|
|
44
|
+
z-index: 4;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.thumb::-webkit-slider-thumb {
|
|
48
|
+
background-color: #2954fe;
|
|
49
|
+
border-radius: 50%;
|
|
50
|
+
/* box-shadow: 0 0 1px 1px #f50707; */
|
|
51
|
+
/* border: 4px solid #ff0303; */
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
height: 20px;
|
|
54
|
+
width: 20px;
|
|
55
|
+
margin-top: 4.5px;
|
|
56
|
+
pointer-events: all;
|
|
57
|
+
position: relative;
|
|
58
|
+
transition: transform 0.3s ease-in-out;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.thumb::-webkit-slider-thumb:hover {
|
|
62
|
+
transform: scale(1.2);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.thumb::-moz-range-thumb {
|
|
66
|
+
background-color: #0a0a0a;
|
|
67
|
+
border-radius: 50%;
|
|
68
|
+
/* box-shadow: 0 0 1px 1px #f50707; */
|
|
69
|
+
border: 4px solid #ff0303;
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
height: 28px;
|
|
72
|
+
width: 28px;
|
|
73
|
+
margin-top: 4.5px;
|
|
74
|
+
pointer-events: all;
|
|
75
|
+
position: relative;
|
|
76
|
+
}
|
|
@@ -10,7 +10,7 @@ Array [
|
|
|
10
10
|
aria-hidden="true"
|
|
11
11
|
className="image placeholder"
|
|
12
12
|
loading="eager"
|
|
13
|
-
src="data:image/svg+xml;base64,
|
|
13
|
+
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjU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n';
|
|
|
8
8
|
import { useUserContext } from '@magento/peregrine/lib/context/user';
|
|
9
9
|
import { useMutation } from '@apollo/client';
|
|
10
10
|
|
|
11
|
+
import { useHistory, useLocation } from 'react-router-dom';
|
|
12
|
+
|
|
11
13
|
jest.mock('@apollo/client', () => ({
|
|
12
14
|
gql: jest.fn(),
|
|
13
15
|
useApolloClient: jest.fn().mockImplementation(() => {}),
|
|
@@ -23,6 +25,17 @@ jest.mock('@apollo/client', () => ({
|
|
|
23
25
|
loading: false
|
|
24
26
|
}))
|
|
25
27
|
}));
|
|
28
|
+
|
|
29
|
+
// Mocking the react-router hooks
|
|
30
|
+
|
|
31
|
+
jest.mock('react-router-dom', () => ({
|
|
32
|
+
...jest.requireActual('react-router-dom'),
|
|
33
|
+
|
|
34
|
+
useHistory: jest.fn(),
|
|
35
|
+
|
|
36
|
+
useLocation: jest.fn()
|
|
37
|
+
}));
|
|
38
|
+
|
|
26
39
|
jest.mock('../../../classify');
|
|
27
40
|
jest.mock('../../Button', () => () => <i />);
|
|
28
41
|
jest.mock('../../FormError/formError', () => 'FormError');
|
|
@@ -67,6 +80,24 @@ jest.mock('@magento/peregrine/lib/context/eventing', () => ({
|
|
|
67
80
|
useEventingContext: jest.fn().mockReturnValue([{}, { dispatch: jest.fn() }])
|
|
68
81
|
}));
|
|
69
82
|
|
|
83
|
+
// Mocking useLocation and useHistory for the tests
|
|
84
|
+
|
|
85
|
+
beforeEach(() => {
|
|
86
|
+
useHistory.mockReturnValue({
|
|
87
|
+
push: jest.fn() // mock any methods you need from useHistory
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
useLocation.mockReturnValue({
|
|
91
|
+
pathname: '/mock-path', // mock the location properties
|
|
92
|
+
|
|
93
|
+
search: '',
|
|
94
|
+
|
|
95
|
+
hash: '',
|
|
96
|
+
|
|
97
|
+
state: null
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
|
|
70
101
|
const props = {
|
|
71
102
|
setDefaultUsername: jest.fn(),
|
|
72
103
|
showCreateAccount: jest.fn(),
|
|
@@ -19,7 +19,6 @@ import GoogleRecaptcha from '../GoogleReCaptcha';
|
|
|
19
19
|
const SignIn = props => {
|
|
20
20
|
const classes = useStyle(defaultClasses, props.classes);
|
|
21
21
|
const {
|
|
22
|
-
handleTriggerClick,
|
|
23
22
|
setDefaultUsername,
|
|
24
23
|
showCreateAccount,
|
|
25
24
|
showForgotPassword,
|
|
@@ -28,7 +27,6 @@ const SignIn = props => {
|
|
|
28
27
|
|
|
29
28
|
const { formatMessage } = useIntl();
|
|
30
29
|
const talonProps = useSignIn({
|
|
31
|
-
handleTriggerClick,
|
|
32
30
|
getCartDetailsQuery: GET_CART_DETAILS_QUERY,
|
|
33
31
|
setDefaultUsername,
|
|
34
32
|
showCreateAccount,
|
|
@@ -20,7 +20,7 @@ exports[`it renders a configurable wishlist item 1`] = `
|
|
|
20
20
|
aria-hidden="true"
|
|
21
21
|
className="image placeholder"
|
|
22
22
|
loading="eager"
|
|
23
|
-
src="data:image/svg+xml;base64,
|
|
23
|
+
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjUiIHZpZXdCb3g9Ii0yNSAtMjUgMzEyIDMxMiI+CiAgICA8ZyBpZD0iTGF5ZXJfMi0yIj4KICAgICAgICA8cGF0aCBjbGFzcz0ic3QwIiBzdHlsZT0iZmlsbDogI2YwZjBmMDsgZmlsbC1ydWxlOiBldmVub2RkOyIgZD0iTTM2LDE4OS40di0xMDkuMWMwLTAuNywwLjQtMS42LDEuMS0ybDk0LjctNTcuMWMwLjctMC41LDEuNy0wLjUsMi41LDBsOTEuNSw1N2MwLjcsMC40LDEuMSwxLjEsMS4xLDJ2MTA3LjljMCwwLjctMC40LDEuNS0xLjEsMmwtMTkuMywxMi42Yy0xLjUsMS0zLjYsMC0zLjYtMnYtMTA1LjljMC0wLjctMC40LTEuNi0xLjEtMmwtNjcuNS00MS4zYy0wLjctMC41LTEuNi0wLjUtMi4zLDBsLTY5LjYsNDEuM2MtMC43LDAuNC0xLjEsMS4xLTEuMSwydjEwNS45YzAsMS45LTIsMy0zLjYsMmwtMjEuNS0xMy41aDB2LjJaTTg2LDExMC45djEwNi4zYzAsMC45LDAuNCwxLjYsMS4xLDJsNDQuNSwyNi43YzAuNywwLjUsMS43LDAuNCwyLjUsMGw0Mi41LTI2LjdjMC43LTAuNCwxLjEtMS4xLDEuMS0ydi0xMDUuOGMwLTAuNy0wLjQtMS41LTEuMS0ybC0yOC43LTE3LjljLTEuNS0xLTMuNiwwLjEtMy42LDJ2MTIxLjZjMCwwLjctMC40LDEuNS0xLjEsMmwtOS4zLDUuOWMtMC43LDAuNS0xLjYsMC41LTIuMywwbC0xMS4xLTUuOWMtMC43LTAuNC0xLjItMS4yLTEuMi0yLjF2LTEyMS43YzAtMS43LTItMy0zLjUtMmwtMjguOCwxNi4yYy0wLjcsMC40LTEuMSwxLjEtMS4xLDJ2MS41aC4xWiIvPgogICAgPC9nPgo8L3N2Zz4K"
|
|
24
24
|
style={
|
|
25
25
|
Object {
|
|
26
26
|
"--width": "400px",
|
|
@@ -137,7 +137,7 @@ exports[`it renders a simple wishlist item 1`] = `
|
|
|
137
137
|
aria-hidden="true"
|
|
138
138
|
className="image placeholder"
|
|
139
139
|
loading="eager"
|
|
140
|
-
src="data:image/svg+xml;base64,
|
|
140
|
+
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjUiIHZpZXdCb3g9Ii0yNSAtMjUgMzEyIDMxMiI+CiAgICA8ZyBpZD0iTGF5ZXJfMi0yIj4KICAgICAgICA8cGF0aCBjbGFzcz0ic3QwIiBzdHlsZT0iZmlsbDogI2YwZjBmMDsgZmlsbC1ydWxlOiBldmVub2RkOyIgZD0iTTM2LDE4OS40di0xMDkuMWMwLTAuNywwLjQtMS42LDEuMS0ybDk0LjctNTcuMWMwLjctMC41LDEuNy0wLjUsMi41LDBsOTEuNSw1N2MwLjcsMC40LDEuMSwxLjEsMS4xLDJ2MTA3LjljMCwwLjctMC40LDEuNS0xLjEsMmwtMTkuMywxMi42Yy0xLjUsMS0zLjYsMC0zLjYtMnYtMTA1LjljMC0wLjctMC40LTEuNi0xLjEtMmwtNjcuNS00MS4zYy0wLjctMC41LTEuNi0wLjUtMi4zLDBsLTY5LjYsNDEuM2MtMC43LDAuNC0xLjEsMS4xLTEuMSwydjEwNS45YzAsMS45LTIsMy0zLjYsMmwtMjEuNS0xMy41aDB2LjJaTTg2LDExMC45djEwNi4zYzAsMC45LDAuNCwxLjYsMS4xLDJsNDQuNSwyNi43YzAuNywwLjUsMS43LDAuNCwyLjUsMGw0Mi41LTI2LjdjMC43LTAuNCwxLjEtMS4xLDEuMS0ydi0xMDUuOGMwLTAuNy0wLjQtMS41LTEuMS0ybC0yOC43LTE3LjljLTEuNS0xLTMuNiwwLjEtMy42LDJ2MTIxLjZjMCwwLjctMC40LDEuNS0xLjEsMmwtOS4zLDUuOWMtMC43LDAuNS0xLjYsMC41LTIuMywwbC0xMS4xLTUuOWMtMC43LTAuNC0xLjItMS4yLTEuMi0yLjF2LTEyMS43YzAtMS43LTItMy0zLjUtMmwtMjguOCwxNi4yYy0wLjcsMC40LTEuMSwxLjEtMS4xLDJ2MS41aC4xWiIvPgogICAgPC9nPgo8L3N2Zz4K"
|
|
141
141
|
style={
|
|
142
142
|
Object {
|
|
143
143
|
"--width": "400px",
|
package/lib/defaultRoutes.json
CHANGED
|
@@ -53,6 +53,12 @@
|
|
|
53
53
|
"exact": true,
|
|
54
54
|
"path": "../ForgotPasswordPage"
|
|
55
55
|
},
|
|
56
|
+
{
|
|
57
|
+
"name": "OrderConfirmation",
|
|
58
|
+
"pattern": "/order-confirmation",
|
|
59
|
+
"exact": true,
|
|
60
|
+
"path": "../CheckoutPage/OrderConfirmationPage"
|
|
61
|
+
},
|
|
56
62
|
{
|
|
57
63
|
"name": "OrderHistory",
|
|
58
64
|
"pattern": "/order-history",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magento/venia-ui",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.6.0-alpha.12",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -80,10 +80,10 @@
|
|
|
80
80
|
"peerDependencies": {
|
|
81
81
|
"@apollo/client": "~3.5.0",
|
|
82
82
|
"@magento/babel-preset-peregrine": "~1.3.3",
|
|
83
|
-
"@magento/peregrine": "
|
|
84
|
-
"@magento/pwa-buildpack": "
|
|
83
|
+
"@magento/peregrine": "14.5.1-alpha.12",
|
|
84
|
+
"@magento/pwa-buildpack": "11.5.4-alpha.12",
|
|
85
85
|
"apollo-cache-persist": "~0.1.1",
|
|
86
|
-
"braintree-web-drop-in": "~1.
|
|
86
|
+
"braintree-web-drop-in": "~1.43.0",
|
|
87
87
|
"graphql": "~15.5.0",
|
|
88
88
|
"react": "~17.0.1",
|
|
89
89
|
"react-intl": "~5.20.0",
|
package/upward.yml
CHANGED
|
@@ -23,6 +23,12 @@ veniaResponse:
|
|
|
23
23
|
- matches: urlResolver.redirect_code
|
|
24
24
|
pattern: '(301|302)'
|
|
25
25
|
use: dynamicRedirect
|
|
26
|
+
- matches: request.url.pathname
|
|
27
|
+
pattern: '^/(account-information|address-book|cart|checkout|communications|sign-in|contact-us|create-account|forgot-password|order-confirmation|order-history|customer/account/createPassword|saved-payments|search\.html|wishlist)$'
|
|
28
|
+
use: veniaAppShell
|
|
29
|
+
- matches: urlResolver.redirect_code
|
|
30
|
+
pattern: '(404)'
|
|
31
|
+
use: notFoundResponse
|
|
26
32
|
default: veniaAppShell
|
|
27
33
|
|
|
28
34
|
# A FileResolver for serving certain files directly from document root,
|
|
@@ -255,4 +261,28 @@ dynamicRedirect:
|
|
|
255
261
|
resolver: file
|
|
256
262
|
file:
|
|
257
263
|
resolver: inline
|
|
258
|
-
inline: './index.html'
|
|
264
|
+
inline: './index.html'
|
|
265
|
+
|
|
266
|
+
notFoundResponse:
|
|
267
|
+
resolver: inline
|
|
268
|
+
inline:
|
|
269
|
+
status: urlResolver.redirect_code
|
|
270
|
+
headers:
|
|
271
|
+
resolver: inline
|
|
272
|
+
inline:
|
|
273
|
+
content-type:
|
|
274
|
+
inline: text/html
|
|
275
|
+
cache-control:
|
|
276
|
+
inline: s-maxage=60
|
|
277
|
+
body:
|
|
278
|
+
resolver: template
|
|
279
|
+
engine: mustache
|
|
280
|
+
provide:
|
|
281
|
+
pageType: veniaPageType.data
|
|
282
|
+
pageTypeNonce: veniaPageTypeNonce.nonce
|
|
283
|
+
webpackChunks: veniaWebpackChunks.scripts
|
|
284
|
+
template:
|
|
285
|
+
resolver: file
|
|
286
|
+
file:
|
|
287
|
+
resolver: inline
|
|
288
|
+
inline: './index.html'
|