Skip to content

Commit

Permalink
Merge branch 'release/14.2.0' into feature/venia-sample-payments-cash…
Browse files Browse the repository at this point in the history
…ondelivery-from-latest-develop
  • Loading branch information
del15881 authored Feb 13, 2025
2 parents cd20e95 + 83a4d6e commit 1f5e03e
Show file tree
Hide file tree
Showing 39 changed files with 647 additions and 145 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@magento/pwa-studio",
"version": "14.1.0",
"version": "14.2.0-alpha.6",
"private": true,
"workspaces": [
"packages/babel-preset-peregrine",
Expand Down Expand Up @@ -47,6 +47,7 @@
},
"dependencies": {
"caniuse-lite": "~1.0.30001335",
"dompurify": "^2.3.8",
"path-to-regexp": "^8.2.0",
"qs": "^6.13.0",
"setimmediate": "^1.0.5"
Expand Down
6 changes: 3 additions & 3 deletions packages/create-pwa/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@magento/create-pwa",
"version": "2.4.6",
"version": "2.5.6-alpha.6",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -29,8 +29,8 @@
},
"homepage": "https://github.com/magento/pwa-studio/tree/main/packages/create-pwa#readme",
"dependencies": {
"@magento/pwa-buildpack": "~11.5.3",
"@magento/venia-concept": "~14.1.0",
"@magento/pwa-buildpack": "11.5.4-alpha.6",
"@magento/venia-concept": "14.2.0-alpha.6",
"chalk": "^2.4.2",
"change-case": "^3.1.0",
"compression": "~1.7.4",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@magento/experience-platform-connector",
"version": "1.0.8",
"version": "1.0.9-alpha.6",
"publishConfig": {
"access": "public"
},
Expand All @@ -18,8 +18,8 @@
"devDependencies": {},
"peerDependencies": {
"@apollo/client": "~3.5.0",
"@magento/peregrine": "~14.4.1",
"@magento/pwa-buildpack": "~11.5.3",
"@magento/peregrine": "14.5.1-alpha.6",
"@magento/pwa-buildpack": "11.5.4-alpha.6",
"react": "~17.0.1"
},
"pwa-studio": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
"name": "@gomage/plugin-braintree-three-d-secure",
"version": "3.94.0",
"publishConfig": {
"access": "public"
},
"description": "GoMage Braintree 3D Secure",
"main": "./index.js",
"author": "GoMage",
"dependencies": {
"braintree-web-drop-in": "~1.43.0"
},

"scripts": {
"clean": " "
},
Expand All @@ -17,4 +19,4 @@
"intercept": "./intercept.js"
}
}
}
}
6 changes: 3 additions & 3 deletions packages/extensions/upward-security-headers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@magento/upward-security-headers",
"version": "1.0.17",
"version": "1.1.17-alpha.6",
"publishConfig": {
"access": "public"
},
Expand All @@ -13,8 +13,8 @@
"author": "Adobe Commerce",
"license": "(OSL-3.0 OR AFL-3.0)",
"peerDependencies": {
"@magento/pwa-buildpack": "~11.5.3",
"@magento/venia-ui": "~11.5.0",
"@magento/pwa-buildpack": "11.5.4-alpha.6",
"@magento/venia-ui": "11.6.0-alpha.6",
"webpack": "~4.46.0"
},
"pwa-studio": {
Expand Down
4 changes: 2 additions & 2 deletions packages/extensions/venia-sample-backends/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@magento/venia-sample-backends",
"version": "0.0.11",
"version": "0.0.12-alpha.6",
"publishConfig": {
"access": "public"
},
Expand All @@ -13,7 +13,7 @@
"repository": "github:magento/pwa-studio",
"license": "(OSL-3.0 OR AFL-3.0)",
"peerDependencies": {
"@magento/pwa-buildpack": "~11.5.3",
"@magento/pwa-buildpack": "11.5.4-alpha.6",
"node-fetch": "~2.3.0"
},
"pwa-studio": {
Expand Down
6 changes: 3 additions & 3 deletions packages/extensions/venia-sample-eventing/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@magento/venia-sample-eventing",
"version": "0.0.9",
"version": "0.0.10-alpha.6",
"publishConfig": {
"access": "public"
},
Expand All @@ -12,8 +12,8 @@
"repository": "github:magento/pwa-studio",
"license": "(OSL-3.0 OR AFL-3.0)",
"peerDependencies": {
"@magento/peregrine": "~14.4.1",
"@magento/pwa-buildpack": "~11.5.3",
"@magento/peregrine": "14.5.1-alpha.6",
"@magento/pwa-buildpack": "11.5.4-alpha.6",
"react": "~17.0.1"
},
"pwa-studio": {
Expand Down
6 changes: 3 additions & 3 deletions packages/extensions/venia-sample-language-packs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@magento/venia-sample-language-packs",
"version": "0.0.17",
"version": "0.0.18-alpha.6",
"publishConfig": {
"access": "public"
},
Expand All @@ -12,8 +12,8 @@
"repository": "github:magento/pwa-studio",
"license": "(OSL-3.0 OR AFL-3.0)",
"peerDependencies": {
"@magento/pwa-buildpack": "~11.5.3",
"@magento/venia-ui": "~11.5.0"
"@magento/pwa-buildpack": "11.5.4-alpha.6",
"@magento/venia-ui": "11.6.0-alpha.6"
},
"pwa-studio": {
"targets": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,20 @@ module.exports = targets => {
checkoutPagePaymentTypes.tap(payments =>
payments.add({
paymentCode: 'cashondelivery',
importPath:
'@adobe/venia-sample-payments-cashondelivery/src/components/cashondelivery.js'
importPath: '@adobe/venia-sample-payments-cashondelivery/src/components/cashondelivery.js'
})
);
editablePaymentTypes.tap(editablePaymentTypes => {
editablePaymentTypes.add({
paymentCode: 'cashondelivery',
importPath:
'@adobe/venia-sample-payments-cashondelivery/src/components/editcod.js'
importPath: '@adobe/venia-sample-payments-cashondelivery/src/components/editcod.js'

});
});
summaryPagePaymentTypes.tap(paymentSummaries =>
paymentSummaries.add({
paymentCode: 'cashondelivery',
importPath:
'@adobe/venia-sample-payments-cashondelivery/src/components/summarycod.js'
importPath: '@adobe/venia-sample-payments-cashondelivery/src/components/summarycod.js'
})
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"repository": "github:magento/pwa-studio",
"license": "(OSL-3.0 OR AFL-3.0)",
"peerDependencies": {
"@magento/peregrine": "~14.4.1",
"@magento/pwa-buildpack": "~11.5.3",
"@magento/venia-ui": "~11.5.0",
"@magento/peregrine": "14.5.1-alpha.6",
"@magento/pwa-buildpack": "11.5.4-alpha.6",
"@magento/venia-ui": "11.6.0-alpha.6",
"react": "~17.0.1",
"react-intl": "~5.20.0",
"react-router-dom": "~5.2.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@magento/venia-sample-payments-checkmo",
"version": "0.0.15",
"version": "0.0.15-alpha.6",
"publishConfig": {
"access": "public"
},
Expand All @@ -12,9 +12,9 @@
"repository": "github:magento/pwa-studio",
"license": "(OSL-3.0 OR AFL-3.0)",
"peerDependencies": {
"@magento/peregrine": "~14.4.1",
"@magento/pwa-buildpack": "~11.5.3",
"@magento/venia-ui": "~11.5.0",
"@magento/peregrine": "14.5.1-alpha.6",
"@magento/pwa-buildpack": "11.5.4-alpha.6",
"@magento/venia-ui": "11.6.0-alpha.6",
"react": "~17.0.1",
"react-intl": "~5.20.0",
"react-router-dom": "~5.2.0"
Expand Down
10 changes: 9 additions & 1 deletion packages/pagebuilder/lib/ContentTypes/Block/configAggregator.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
import DOMPurify from 'dompurify';
import { getAdvanced } from '../../utils';

export default node => {
// Get the raw HTML content from the first child node
const rawHTML = node.childNodes[0] ? node.childNodes[0].innerHTML : '';

// Sanitize the raw HTML using DOMPurify
const sanitizedHTML = DOMPurify.sanitize(rawHTML);

return {
richContent: node.childNodes[0] ? node.childNodes[0].innerHTML : '',
// Return the sanitized HTML content, along with the result from getAdvanced
richContent: sanitizedHTML,
...getAdvanced(node)
};
};
14 changes: 7 additions & 7 deletions packages/pagebuilder/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@magento/pagebuilder",
"version": "9.3.2",
"version": "9.3.3-alpha.6",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -34,9 +34,9 @@
"homepage": "https://github.com/magento/pwa-studio/tree/main/packages/pagebuilder#readme",
"dependencies": {},
"devDependencies": {
"@magento/peregrine": "~14.4.1",
"@magento/pwa-buildpack": "~11.5.3",
"@magento/venia-ui": "~11.5.0",
"@magento/peregrine": "14.5.1-alpha.6",
"@magento/pwa-buildpack": "11.5.4-alpha.6",
"@magento/venia-ui": "11.6.0-alpha.6",
"@storybook/react": "~6.3.7",
"jarallax": "~1.11.1",
"load-google-maps-api": "~2.0.1",
Expand All @@ -50,9 +50,9 @@
"peerDependencies": {
"@apollo/client": "~3.5.0",
"@magento/babel-preset-peregrine": "~1.3.3",
"@magento/peregrine": "~14.4.1",
"@magento/pwa-buildpack": "~11.5.3",
"@magento/venia-ui": "~11.5.0",
"@magento/peregrine": "14.5.1-alpha.6",
"@magento/pwa-buildpack": "11.5.4-alpha.6",
"@magento/venia-ui": "11.6.0-alpha.6",
"jarallax": "~1.11.1",
"load-google-maps-api": "~2.0.1",
"lodash.escape": "~4.0.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useEffect } from 'react';
import { act } from 'react-test-renderer';

import { MemoryRouter } from 'react-router-dom';
import { createTestInstance } from '@magento/peregrine';
import { useFilterBlock } from '../useFilterBlock';

Expand Down Expand Up @@ -56,7 +56,11 @@ describe('#useFilterBlock', () => {
});

it('is closed by default', () => {
createTestInstance(<Component />);
createTestInstance(
<MemoryRouter>
<Component />
</MemoryRouter>
);

expect(log).toHaveBeenCalledWith({
handleClick: expect.any(Function),
Expand All @@ -66,7 +70,11 @@ describe('#useFilterBlock', () => {

it('is open if passed initially open', () => {
givenInitiallyOpen();
createTestInstance(<Component />);
createTestInstance(
<MemoryRouter>
<Component />
</MemoryRouter>
);

expect(log).toHaveBeenCalledWith({
handleClick: expect.any(Function),
Expand All @@ -76,7 +84,11 @@ describe('#useFilterBlock', () => {

it('is open if items are selected', () => {
givenSelectedItems();
createTestInstance(<Component />);
createTestInstance(
<MemoryRouter>
<Component />
</MemoryRouter>
);

expect(log).toHaveBeenCalledWith({
handleClick: expect.any(Function),
Expand All @@ -85,7 +97,11 @@ describe('#useFilterBlock', () => {
});

it('can toggle visibility', () => {
createTestInstance(<Component />);
createTestInstance(
<MemoryRouter>
<Component />
</MemoryRouter>
);

expect(typeof handleClickProp).toBe('function');

Expand Down
2 changes: 1 addition & 1 deletion packages/peregrine/lib/talons/FilterModal/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const getStateFromSearch = (initialValue, filterKeys, filterItems) => {

if (existingFilter) {
items.add(existingFilter);
} else {
} else if (group !== 'price') {
console.warn(
`Existing filter ${value} not found in possible filters`
);
Expand Down
11 changes: 9 additions & 2 deletions packages/peregrine/lib/talons/FilterModal/useFilterBlock.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
import { useCallback, useState, useEffect, useMemo } from 'react';
import { useLocation } from 'react-router-dom';

export const useFilterBlock = props => {
const { filterState, items, initialOpen } = props;
const { filterState, items, initialOpen, group } = props;
const location = useLocation();

const hasSelected = useMemo(() => {
const params = new URLSearchParams(location.search);
//expansion of price filter dropdown
if (group == 'price') {
return params.get('price[filter]') ? true : false;
}
return items.some(item => {
return filterState && filterState.has(item);
});
}, [filterState, items]);
}, [filterState, items, group, location.search]);

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,10 @@ export const useFilterSidebar = props => {
}, [handleClose]);

const handleReset = useCallback(() => {
filterApi.clear();
setIsApplying(true);
}, [filterApi, setIsApplying]);
//filterApi.clear();
//setIsApplying(true);
history.replace({ search: 'page=1' });
}, [history]);

const handleKeyDownActions = useCallback(
event => {
Expand Down
Loading

0 comments on commit 1f5e03e

Please sign in to comment.