Skip to content

Commit 4108b61

Browse files
authored
Merge branch 'develop' into PWA-3233
2 parents b2c5025 + d12b8c4 commit 4108b61

File tree

177 files changed

+43110
-1438
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+43110
-1438
lines changed

package-lock.json

+42,112
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
"watch:venia": "yarn venia run watch"
4747
},
4848
"dependencies": {
49-
"@material-ui/core": "~4.12.4",
5049
"caniuse-lite": "~1.0.30001335"
5150
},
5251
"devDependencies": {
@@ -88,7 +87,7 @@
8887
"lodash.debounce": "~4.0.8",
8988
"prettier": "~1.16.4",
9089
"rimraf": "~2.6.3",
91-
"tailwindcss": "~2.2.7"
90+
"tailwindcss": "~3.3.0"
9291
},
9392
"optionalDependencies": {
9493
"bundlesize": "~0.18.1",
@@ -116,4 +115,4 @@
116115
"maxSize": "100 kB"
117116
}
118117
]
119-
}
118+
}

packages/extensions/experience-platform-connector/src/__tests__/__snapshots__/utils.spec.js.snap

-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ Array [
4747
},
4848
"productType": "ConfigurableProduct",
4949
"sku": "VSK02",
50-
"topLevelSku": "VSK02",
5150
},
5251
"quantity": 1,
5352
},
@@ -83,7 +82,6 @@ Array [
8382
},
8483
"productType": "SimpleProduct",
8584
"sku": "VA17-SI-NA",
86-
"topLevelSku": "VA17-SI-NA",
8785
},
8886
"quantity": 2,
8987
},
@@ -132,7 +130,6 @@ Array [
132130
},
133131
"productType": "ConfigurableProduct",
134132
"sku": "VA04",
135-
"topLevelSku": "VA04",
136133
},
137134
"quantity": 3,
138135
},

packages/extensions/experience-platform-connector/src/handlers/__tests__/__snapshots__/shoppingMiniCartView.spec.js.snap

-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ Object {
4747
},
4848
"productType": "ConfigurableProduct",
4949
"sku": "VSK02",
50-
"topLevelSku": "VSK02",
5150
},
5251
"quantity": 1,
5352
},
@@ -79,7 +78,6 @@ Object {
7978
},
8079
"productType": "SimpleProduct",
8180
"sku": "VA17-SI-NA",
82-
"topLevelSku": "VA17-SI-NA",
8381
},
8482
"quantity": 2,
8583
},
@@ -124,7 +122,6 @@ Object {
124122
},
125123
"productType": "ConfigurableProduct",
126124
"sku": "VA04",
127-
"topLevelSku": "VA04",
128125
},
129126
"quantity": 3,
130127
},

packages/extensions/experience-platform-connector/src/handlers/__tests__/shoppingCartPageView.spec.js

-3
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ describe('handle()', () => {
8181
},
8282
"productType": "ConfigurableProduct",
8383
"sku": "VSK02",
84-
"topLevelSku": "VSK02",
8584
},
8685
"quantity": 1,
8786
},
@@ -117,7 +116,6 @@ describe('handle()', () => {
117116
},
118117
"productType": "SimpleProduct",
119118
"sku": "VA17-SI-NA",
120-
"topLevelSku": "VA17-SI-NA",
121119
},
122120
"quantity": 2,
123121
},
@@ -166,7 +164,6 @@ describe('handle()', () => {
166164
},
167165
"productType": "ConfigurableProduct",
168166
"sku": "VA04",
169-
"topLevelSku": "VA04",
170167
},
171168
"quantity": 3,
172169
},

packages/extensions/experience-platform-connector/src/handlers/__tests__/startCheckout.spec.js

-3
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ describe('handle()', () => {
9696
},
9797
"productType": "ConfigurableProduct",
9898
"sku": "VP08",
99-
"topLevelSku": "VP08",
10099
},
101100
"quantity": 3,
102101
},
@@ -139,7 +138,6 @@ describe('handle()', () => {
139138
},
140139
"productType": "ConfigurableProduct",
141140
"sku": "VA09",
142-
"topLevelSku": "VA09",
143141
},
144142
"quantity": 1,
145143
},
@@ -175,7 +173,6 @@ describe('handle()', () => {
175173
},
176174
"productType": "SimpleProduct",
177175
"sku": "VA22-SI-NA",
178-
"topLevelSku": "VA22-SI-NA",
179176
},
180177
"quantity": 1,
181178
},

packages/extensions/experience-platform-connector/src/utils.js

-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ export const getFormattedProducts = products => {
8282
product: {
8383
name: name,
8484
sku: sku,
85-
topLevelSku: product.sku,
8685
productType: type,
8786
pricing: {
8887
regularPrice: prices.price.value,

packages/extensions/venia-sample-payments-checkmo/src/components/summary.module.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
.payment_type {
3636
}
3737

38-
@media (max-width: 960px) {
38+
@media screen(-lg) {
3939
.edit_text {
4040
display: none;
4141
}

packages/pagebuilder/lib/ContentTypes/Column/column.module.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
@media only screen and (max-width: 768px) {
55
.root {
6-
background-attachment: scroll !important;
7-
flex-basis: 100%;
6+
@apply !bg-scroll;
7+
@apply basis-full;
88
}
99
}
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
.root:empty {
2-
display: none;
1+
.root {
2+
composes: empty_hidden from global;
33
}
44

55
.root_inline {
66
composes: root;
7-
display: inline-block;
7+
@apply inline-block;
88
}

packages/pagebuilder/lib/ContentTypes/Tabs/tabs.module.css

+1-4
Original file line numberDiff line numberDiff line change
@@ -125,16 +125,13 @@ ul.navigation::-webkit-scrollbar {
125125

126126
.panel {
127127
min-height: inherit;
128+
composes: !empty_hidden from global;
128129
}
129130

130131
.panelSelected {
131132
display: block;
132133
}
133134

134-
.panel:empty {
135-
display: none !important; /* Necessary because of inline styles; to be fixed in MC-18326 */
136-
}
137-
138135
.content {
139136
border: var(--tabs-border-width) var(--tabs-border) var(--tabs-border-color);
140137
overflow: hidden;

packages/peregrine/lib/hooks/useDropdown.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const useDropdown = () => {
1414
const triggerRef = useRef(null);
1515
const [expanded, setExpanded] = useState(false);
1616

17-
// collapse on mousedown or tab outside of the element and trigger.
17+
// collapse on mousedown outside of the element and trigger.
1818
const maybeCollapse = useCallback(({ target }) => {
1919
const isOutsideElement =
2020
!elementRef.current || !elementRef.current.contains(target);
@@ -27,7 +27,7 @@ export const useDropdown = () => {
2727
}, []);
2828

2929
// add listener to document, as an effect
30-
useEventListener(globalThis.document, 'click', maybeCollapse);
30+
useEventListener(globalThis.document, 'mousedown', maybeCollapse);
3131

3232
/**
3333
* The object returned contains the pieces needed to add the dropdown logic to your components

packages/peregrine/lib/talons/FilterModal/__tests__/useFilterBlock.spec.js

-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ import { useFilterBlock } from '../useFilterBlock';
66

77
const log = jest.fn();
88

9-
jest.mock('react-router-dom', () => ({
10-
useLocation: jest.fn(() => ({ search: '?a=b&c=d' }))
11-
}));
12-
139
let handleClickProp = null;
1410
let inputValues = {};
1511

packages/peregrine/lib/talons/FilterModal/useFilterBlock.js

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
11
import { useCallback, useState, useEffect, useMemo } from 'react';
2-
import { useLocation } from 'react-router-dom';
32

43
export const useFilterBlock = props => {
5-
const { filterState, items, initialOpen, group } = props;
6-
const location = useLocation();
4+
const { filterState, items, initialOpen } = props;
75

86
const hasSelected = useMemo(() => {
9-
const params = new URLSearchParams(location.search);
10-
//expansion of price filter dropdown
11-
if (group == 'price') {
12-
return params.get('price[filter]') ? true : false;
13-
}
147
return items.some(item => {
158
return filterState && filterState.has(item);
169
});
17-
}, [filterState, items, group, location.search]);
10+
}, [filterState, items]);
1811

1912
const [isExpanded, setExpanded] = useState(hasSelected || initialOpen);
2013

packages/peregrine/lib/talons/FilterSidebar/__tests__/useFilterSidebar.spec.js

-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ jest.mock('react-router-dom', () => ({
6868
useHistory: jest.fn(() => ({ push: jest.fn() })),
6969
useLocation: jest.fn(() => ({ pathname: '', search: '' }))
7070
}));
71-
7271
const mockPush = jest.fn();
7372
useHistory.mockImplementation(() => ({ push: mockPush }));
7473

packages/peregrine/lib/talons/FilterSidebar/useFilterSidebar.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,9 @@ export const useFilterSidebar = props => {
182182
}, [handleClose]);
183183

184184
const handleReset = useCallback(() => {
185-
// filterApi.clear();
186-
// setIsApplying(true);
187-
history.replace({ search: 'page=1' });
188-
}, [history]);
185+
filterApi.clear();
186+
setIsApplying(true);
187+
}, [filterApi, setIsApplying]);
189188

190189
const handleKeyDownActions = useCallback(
191190
event => {

packages/peregrine/lib/talons/MagentoRoute/magentoRoute.gql.js

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ export const RESOLVE_URL = gql`
1212
# eslint-disable-next-line @graphql-eslint/require-id-when-available
1313
... on ProductInterface {
1414
uid
15-
sku
1615
__typename
1716
}
1817
# eslint-disable-next-line @graphql-eslint/require-id-when-available

packages/peregrine/lib/talons/RootComponents/Category/__tests__/__snapshots__/useCategoryContent.spec.js.snap

-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ Object {
55
"availableSortMethods": null,
66
"categoryDescription": "Jewelry category",
77
"categoryName": "Jewelry",
8-
"filterOptions": undefined,
98
"filters": null,
109
"items": Array [
1110
null,
@@ -18,7 +17,6 @@ Object {
1817
null,
1918
null,
2019
],
21-
"setFilterOptions": [Function],
2220
"totalCount": null,
2321
"totalPagesFromData": null,
2422
}
@@ -34,7 +32,6 @@ Object {
3432
],
3533
"categoryDescription": "Jewelry category",
3634
"categoryName": "Jewelry",
37-
"filterOptions": undefined,
3835
"filters": Array [
3936
Object {
4037
"label": "Label",
@@ -50,7 +47,6 @@ Object {
5047
"name": "Necklace",
5148
},
5249
],
53-
"setFilterOptions": [Function],
5450
"totalCount": 2,
5551
"totalPagesFromData": 1,
5652
}

packages/peregrine/lib/talons/RootComponents/Category/__tests__/useCategoryContent.spec.js

+1-15
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,6 @@ jest.mock('@apollo/client', () => {
2626
};
2727
});
2828

29-
const mockGetFiltersAttributeCode = {
30-
data: {
31-
products: {
32-
aggregations: [
33-
{
34-
label: 'Label'
35-
}
36-
]
37-
}
38-
}
39-
};
40-
4129
const mockProductFiltersByCategoryData = {
4230
data: {
4331
products: {
@@ -103,22 +91,21 @@ const mockCategoryData = {
10391

10492
const mockGetSortMethods = jest.fn();
10593
const mockGetFilters = jest.fn();
106-
const mockfilterData = jest.fn();
10794

10895
jest.mock('@magento/peregrine/lib/context/eventing', () => ({
10996
useEventingContext: jest.fn().mockReturnValue([{}, { dispatch: jest.fn() }])
11097
}));
11198

11299
const Component = props => {
113100
const talonprops = useCategoryContent(props);
101+
114102
return <i {...talonprops} />;
115103
};
116104

117105
useQuery.mockReturnValue({ data: mockCategoryData });
118106
describe('useCategoryContent tests', () => {
119107
it('returns the proper shape', () => {
120108
useLazyQuery
121-
.mockReturnValueOnce([mockfilterData, mockGetFiltersAttributeCode])
122109
.mockReturnValueOnce([
123110
mockGetFilters,
124111
mockProductFiltersByCategoryData
@@ -137,7 +124,6 @@ describe('useCategoryContent tests', () => {
137124

138125
it('handles default category id', () => {
139126
useLazyQuery
140-
.mockReturnValueOnce([mockfilterData, mockGetFiltersAttributeCode])
141127
.mockReturnValueOnce([
142128
mockGetFilters,
143129
mockProductFiltersByCategoryData

packages/peregrine/lib/talons/RootComponents/Category/categoryContent.gql.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { gql } from '@apollo/client';
22

3-
const GET_PRODUCT_FILTERS_BY_CATEGORY = gql`
3+
export const GET_PRODUCT_FILTERS_BY_CATEGORY = gql`
44
query getProductFiltersByCategory(
55
$categoryIdFilter: FilterEqualTypeInput!
66
) {
@@ -11,8 +11,9 @@ const GET_PRODUCT_FILTERS_BY_CATEGORY = gql`
1111
attribute_code
1212
options {
1313
label
14-
count
14+
value
1515
}
16+
position
1617
}
1718
}
1819
}

0 commit comments

Comments
 (0)