Skip to content

Commit 1fe6646

Browse files
committed
Cherry pick 4 commits from develop
- Cleanup wrong import path for page-designer component [#1441](#1441) @clavery - Modularize country code source for targeting via extensibility [#1445](#1445) @bfeister - Export icon helper function for target via overrides [#1420](#1420) @cbrother-csu - Migrate Page Designer core types to commerce-sdk-react [#1441](#1441) @clavery
1 parent 92f4e3a commit 1fe6646

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

packages/template-retail-react-app/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
## v2.0.0 (Sep 21, 2023)
22

33
- V3 Fix checkout card number [#1424](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1424)
4+
- Cleanup wrong import path for page-designer component [#1441](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1441) @clavery
5+
- Modularize country code source for targeting via extensibility [#1445](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1445) @bfeister
6+
- Export icon helper function for target via overrides [#1420](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1420) @cbrother-csu
7+
- Migrate Page Designer core types to commerce-sdk-react [#1441](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1441) @clavery
48

59
## v1.0.1 (Jul 26, 2023)
610

packages/template-retail-react-app/app/components/forms/useAddressFields.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
stateOptions,
1111
provinceOptions
1212
} from '@salesforce/retail-react-app/app/components/forms/state-province-options'
13+
import {SHIPPING_COUNTRY_CODES} from '@salesforce/retail-react-app/app/constants'
1314

1415
const messages = defineMessages({
1516
required: {defaultMessage: 'Required', id: 'use_address_fields.error.required'},
@@ -103,10 +104,7 @@ export default function useAddressFields({
103104
label: formatMessage(messages.country),
104105
defaultValue: 'US',
105106
type: 'select',
106-
options: [
107-
{value: 'CA', label: 'Canada'},
108-
{value: 'US', label: 'United States'}
109-
],
107+
options: SHIPPING_COUNTRY_CODES,
110108
rules: {
111109
required: formatMessage({
112110
defaultMessage: 'Please select your country.',

packages/template-retail-react-app/app/components/icons/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ VisaSymbol.viewBox = VisaSymbol.viewBox || '0 0 38 22'
8484
* @param {string} name - the filename of the imported svg (does not include extension)
8585
*/
8686
/* istanbul ignore next */
87-
const icon = (name, passProps) => {
87+
export const icon = (name, passProps) => {
8888
const displayName = name
8989
.toLowerCase()
9090
.replace(/(?:^|[\s-/])\w/g, (match) => match.toUpperCase())

packages/template-retail-react-app/app/constants.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,8 @@ export const EINSTEIN_RECOMMENDERS = {
107107
EMPTY_SEARCH_RESULTS_TOP_SELLERS: 'home-top-revenue-for-category',
108108
EMPTY_SEARCH_RESULTS_MOST_VIEWED: 'products-in-all-categories'
109109
}
110+
111+
export const SHIPPING_COUNTRY_CODES = [
112+
{value: 'CA', label: 'Canada'},
113+
{value: 'US', label: 'United States'}
114+
]

packages/template-retail-react-app/app/page-designer/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
77

8-
import {Page, pageType} from '@salesforce/retail-react-app/app/page-designer/core'
8+
import {Page, pageType} from '@salesforce/commerce-sdk-react/components'
99

1010
export {Page, pageType}

0 commit comments

Comments
 (0)