@salesforce/retail-react-app 4.0.0-preview.0 → 4.0.0
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/CHANGELOG.md +9 -12
- package/app/components/header/index.jsx +12 -31
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,29 +1,26 @@
|
|
|
1
|
-
## v4.0.0
|
|
1
|
+
## v4.0.0 (Aug 7, 2024)
|
|
2
2
|
|
|
3
|
-
### New
|
|
3
|
+
### New Features
|
|
4
4
|
|
|
5
5
|
- Support product bundles [#1916](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1916/)
|
|
6
6
|
- Add Store Locator [#1922](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1922)
|
|
7
7
|
|
|
8
8
|
### Bug Fixes
|
|
9
9
|
|
|
10
|
-
- Out of stock and low stock items are removed from cart and checkout as unavailable products [#1865](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1865)
|
|
11
|
-
|
|
12
|
-
## v3.1.0-dev (Jun 25, 2024)
|
|
13
|
-
|
|
14
|
-
### Bug Fixes
|
|
15
|
-
|
|
16
10
|
- Update serialized query data via `beforeHydrate` to prevent data re-fetching on load [#1912](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1912)
|
|
17
|
-
-
|
|
18
|
-
- A11y: Account Nav fixes [#1884](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1884)
|
|
19
|
-
- A11y: Replace `<p>` tags with header tag in home page Features section [#1902](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1902)
|
|
20
|
-
- Out of stock and low stock items are removed from cart and checkout as unavailable products [#1865](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1865)
|
|
11
|
+
- Out of stock and low stock items are removed from cart and checkout as unavailable products [#1881](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1881)
|
|
21
12
|
- Fix infinity sign price on product tile [#1903](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1903)
|
|
13
|
+
- Remove unecessary params from product search [#1873](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1873)
|
|
22
14
|
|
|
23
15
|
### Accessibility Improvements
|
|
24
16
|
|
|
25
17
|
- Improve accessibility readout for strikethrough price on shipping options in checkout page [#1892](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1892)
|
|
26
18
|
- Ensure credit card informational tooltip on checkout page persists after the user is no longer hovering over it [#1890](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1890)
|
|
19
|
+
- A11y: Add aria-label to the address form based on the address type [#1904](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1904)
|
|
20
|
+
- A11y: Account Nav fixes [#1884](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1884)
|
|
21
|
+
- A11y: Replace `<p>` tags with header tag in home page Features section [#1902](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1902)
|
|
22
|
+
- Add aria-label for Checkout's action buttons [#1906](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1906)
|
|
23
|
+
- Avoid forced focus changes that are not user-initiated [#1940](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1940)
|
|
27
24
|
|
|
28
25
|
## v3.0.2 (Jul 11, 2024)
|
|
29
26
|
|
|
@@ -51,35 +51,6 @@ import LoadingSpinner from '@salesforce/retail-react-app/app/components/loading-
|
|
|
51
51
|
import {isHydrated, noop} from '@salesforce/retail-react-app/app/utils/utils'
|
|
52
52
|
import {STORE_LOCATOR_IS_ENABLED} from '@salesforce/retail-react-app/app/constants'
|
|
53
53
|
const IconButtonWithRegistration = withRegistration(IconButton)
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Search bar for the header.
|
|
57
|
-
*
|
|
58
|
-
* The search bar is a simple input field with a search icon.
|
|
59
|
-
* It can be used to search for products or navigate to a
|
|
60
|
-
* specific page.
|
|
61
|
-
*
|
|
62
|
-
* @param props {object} the component props
|
|
63
|
-
* @returns {Element} the search bar element
|
|
64
|
-
*/
|
|
65
|
-
const SearchBar = (props) => {
|
|
66
|
-
const styles = useMultiStyleConfig('Header')
|
|
67
|
-
const intl = useIntl()
|
|
68
|
-
const placeholder = intl.formatMessage({
|
|
69
|
-
id: 'header.field.placeholder.search_for_products',
|
|
70
|
-
defaultMessage: 'Search for products...'
|
|
71
|
-
})
|
|
72
|
-
return (
|
|
73
|
-
<Box {...styles.searchContainer}>
|
|
74
|
-
<Search
|
|
75
|
-
aria-label={placeholder}
|
|
76
|
-
placeholder={placeholder}
|
|
77
|
-
{...styles.search}
|
|
78
|
-
{...props}
|
|
79
|
-
/>
|
|
80
|
-
</Box>
|
|
81
|
-
)
|
|
82
|
-
}
|
|
83
54
|
/**
|
|
84
55
|
* The header is the main source for accessing
|
|
85
56
|
* navigation, search, basket, and other
|
|
@@ -154,6 +125,11 @@ const Header = ({
|
|
|
154
125
|
}
|
|
155
126
|
}
|
|
156
127
|
|
|
128
|
+
const placeholder = intl.formatMessage({
|
|
129
|
+
id: 'header.field.placeholder.search_for_products',
|
|
130
|
+
defaultMessage: 'Search for products...'
|
|
131
|
+
})
|
|
132
|
+
|
|
157
133
|
return (
|
|
158
134
|
<Box {...styles.container} {...props}>
|
|
159
135
|
<Box {...styles.content}>
|
|
@@ -185,7 +161,13 @@ const Header = ({
|
|
|
185
161
|
onClick={onLogoClick}
|
|
186
162
|
/>
|
|
187
163
|
<Box {...styles.bodyContainer}>{children}</Box>
|
|
188
|
-
|
|
164
|
+
<Box {...styles.searchContainer}>
|
|
165
|
+
<Search
|
|
166
|
+
aria-label={placeholder}
|
|
167
|
+
placeholder={placeholder}
|
|
168
|
+
{...styles.search}
|
|
169
|
+
/>
|
|
170
|
+
</Box>
|
|
189
171
|
<IconButtonWithRegistration
|
|
190
172
|
icon={<AccountIcon />}
|
|
191
173
|
aria-label={intl.formatMessage({
|
|
@@ -336,7 +318,6 @@ const Header = ({
|
|
|
336
318
|
{...styles.icons}
|
|
337
319
|
onClick={onMyCartClick}
|
|
338
320
|
/>
|
|
339
|
-
{!isDesktop && <SearchBar />}
|
|
340
321
|
</Flex>
|
|
341
322
|
</Box>
|
|
342
323
|
</Box>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/retail-react-app",
|
|
3
|
-
"version": "4.0.0
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"license": "See license in LICENSE",
|
|
5
5
|
"author": "cc-pwa-kit@salesforce.com",
|
|
6
6
|
"ccExtensibility": {
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"@lhci/cli": "^0.11.0",
|
|
46
46
|
"@loadable/component": "^5.15.3",
|
|
47
47
|
"@peculiar/webcrypto": "^1.4.2",
|
|
48
|
-
"@salesforce/commerce-sdk-react": "3.0.0
|
|
49
|
-
"@salesforce/pwa-kit-dev": "3.7.0
|
|
50
|
-
"@salesforce/pwa-kit-react-sdk": "3.7.0
|
|
51
|
-
"@salesforce/pwa-kit-runtime": "3.7.0
|
|
48
|
+
"@salesforce/commerce-sdk-react": "3.0.0",
|
|
49
|
+
"@salesforce/pwa-kit-dev": "3.7.0",
|
|
50
|
+
"@salesforce/pwa-kit-react-sdk": "3.7.0",
|
|
51
|
+
"@salesforce/pwa-kit-runtime": "3.7.0",
|
|
52
52
|
"@tanstack/react-query": "^4.28.0",
|
|
53
53
|
"@tanstack/react-query-devtools": "^4.29.1",
|
|
54
54
|
"@testing-library/dom": "^9.0.1",
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"maxSize": "320 kB"
|
|
101
101
|
}
|
|
102
102
|
],
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "7a47e6b91a5a0edc69c999115345b9bd5154935f"
|
|
104
104
|
}
|