@graphcommerce/magento-cart-payment-method 3.3.4 → 3.4.1
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
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 3.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`8d8fda262`](https://github.com/graphcommerce-org/graphcommerce/commit/8d8fda2623e561cb43441110c67ffa34b692668a), [`d41cff721`](https://github.com/graphcommerce-org/graphcommerce/commit/d41cff7211230561ceeb7786cf75790efd6377cd), [`cefa7b365`](https://github.com/graphcommerce-org/graphcommerce/commit/cefa7b3652b55108d2178927e3c5d98a111cf373), [`584b683a2`](https://github.com/graphcommerce-org/graphcommerce/commit/584b683a2aedcdf5067644c8dcc0e63a5b9e894c)]:
|
|
8
|
+
- @graphcommerce/next-ui@4.13.0
|
|
9
|
+
- @graphcommerce/magento-store@4.2.16
|
|
10
|
+
- @graphcommerce/framer-scroller@2.1.22
|
|
11
|
+
- @graphcommerce/magento-cart@4.5.1
|
|
12
|
+
|
|
13
|
+
## 3.4.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- [#1544](https://github.com/graphcommerce-org/graphcommerce/pull/1544) [`5f927ebdc`](https://github.com/graphcommerce-org/graphcommerce/commit/5f927ebdc6f0331833e02b96e4f169bfe475ac6b) Thanks [@mikekeehnen](https://github.com/mikekeehnen)! - Fixed hydration errors on account, cart and wishlist
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies [[`5f927ebdc`](https://github.com/graphcommerce-org/graphcommerce/commit/5f927ebdc6f0331833e02b96e4f169bfe475ac6b), [`c87a28e7d`](https://github.com/graphcommerce-org/graphcommerce/commit/c87a28e7dad87bffd0bd125ad5fdca65aaa389cc), [`c756f42e5`](https://github.com/graphcommerce-org/graphcommerce/commit/c756f42e503761a497e4a5a7a02d02141df231c3)]:
|
|
22
|
+
- @graphcommerce/graphql@3.4.0
|
|
23
|
+
- @graphcommerce/magento-cart@4.5.0
|
|
24
|
+
- @graphcommerce/react-hook-form@3.3.0
|
|
25
|
+
- @graphcommerce/next-ui@4.12.0
|
|
26
|
+
- @graphcommerce/magento-store@4.2.15
|
|
27
|
+
- @graphcommerce/framer-scroller@2.1.21
|
|
28
|
+
|
|
29
|
+
## 3.3.5
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- [#1538](https://github.com/graphcommerce-org/graphcommerce/pull/1538) [`fe4baa42d`](https://github.com/graphcommerce-org/graphcommerce/commit/fe4baa42db0081ed960d62aef688bd36a7ac974f) Thanks [@paales](https://github.com/paales)! - add missing translations
|
|
34
|
+
|
|
35
|
+
- Updated dependencies [[`fe4baa42d`](https://github.com/graphcommerce-org/graphcommerce/commit/fe4baa42db0081ed960d62aef688bd36a7ac974f)]:
|
|
36
|
+
- @graphcommerce/magento-cart@4.4.8
|
|
37
|
+
- @graphcommerce/next-ui@4.11.2
|
|
38
|
+
- @graphcommerce/framer-scroller@2.1.20
|
|
39
|
+
- @graphcommerce/magento-store@4.2.14
|
|
40
|
+
|
|
3
41
|
## 3.3.4
|
|
4
42
|
|
|
5
43
|
### Patch Changes
|
|
@@ -13,18 +13,18 @@ export function PaymentMethodPlaceOrderNoop(props: PaymentPlaceOrderProps) {
|
|
|
13
13
|
const { step, code } = props
|
|
14
14
|
const clearCurrentCartId = useClearCurrentCartId()
|
|
15
15
|
|
|
16
|
-
const
|
|
16
|
+
const { currentCartId } = useCurrentCartId()
|
|
17
17
|
const form = useFormGqlMutationCart(PaymentMethodPlaceOrderNoopDocument)
|
|
18
18
|
|
|
19
19
|
const { handleSubmit, data, error } = form
|
|
20
20
|
const { push } = useRouter()
|
|
21
21
|
|
|
22
22
|
useEffect(() => {
|
|
23
|
-
if (!data?.placeOrder?.order || error || !
|
|
23
|
+
if (!data?.placeOrder?.order || error || !currentCartId) return
|
|
24
24
|
clearCurrentCartId()
|
|
25
25
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
26
|
-
push({ pathname: '/checkout/success', query: { cart_id:
|
|
27
|
-
}, [
|
|
26
|
+
push({ pathname: '/checkout/success', query: { cart_id: currentCartId } })
|
|
27
|
+
}, [clearCurrentCartId, currentCartId, data?.placeOrder?.order, error, push])
|
|
28
28
|
|
|
29
29
|
const submit = handleSubmit(() => {})
|
|
30
30
|
|
|
@@ -125,7 +125,7 @@ export function PaymentMethodToggles(props: PaymentMethodTogglesProps) {
|
|
|
125
125
|
defaultValue=''
|
|
126
126
|
control={control}
|
|
127
127
|
name='paymentMethod'
|
|
128
|
-
rules={{ required: i18n._(/* i18n */
|
|
128
|
+
rules={{ required: i18n._(/* i18n */ 'Please select a payment method') }}
|
|
129
129
|
render={({ field: { onChange, value, name, onBlur } }) => (
|
|
130
130
|
<Scroller
|
|
131
131
|
className={classes.scrollerRoot}
|
package/hooks/useCartLock.ts
CHANGED
|
@@ -15,7 +15,7 @@ export type CartLockState = {
|
|
|
15
15
|
* Todo: Block all operations on the cart while the cart is being blocked.
|
|
16
16
|
*/
|
|
17
17
|
export function useCartLock<E extends CartLockState>() {
|
|
18
|
-
const currentCartId = useCurrentCartId()
|
|
18
|
+
const { currentCartId } = useCurrentCartId()
|
|
19
19
|
const [justLocked, setJustLocked] = useState(false)
|
|
20
20
|
const [queryState, setRouterQuery] = useUrlQuery<E>()
|
|
21
21
|
|
|
@@ -26,7 +26,7 @@ export function useCartLock<E extends CartLockState>() {
|
|
|
26
26
|
locked: '1',
|
|
27
27
|
cart_id: currentCartId,
|
|
28
28
|
...params,
|
|
29
|
-
} as E)
|
|
29
|
+
} as unknown as E)
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
const unlock = (params: Omit<E, 'locked' | 'cart_id' | 'method'>) => {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/magento-cart-payment-method",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "3.
|
|
5
|
+
"version": "3.4.1",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -15,18 +15,18 @@
|
|
|
15
15
|
"@graphcommerce/eslint-config-pwa": "^4.1.8",
|
|
16
16
|
"@graphcommerce/prettier-config-pwa": "^4.0.6",
|
|
17
17
|
"@graphcommerce/typescript-config-pwa": "^4.0.3",
|
|
18
|
-
"@graphcommerce/magento-cart-shipping-address": "3.2.
|
|
18
|
+
"@graphcommerce/magento-cart-shipping-address": "3.2.6",
|
|
19
19
|
"@playwright/test": "^1.21.1",
|
|
20
20
|
"type-fest": "^2.12.2"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@graphcommerce/framer-scroller": "2.1.
|
|
24
|
-
"@graphcommerce/graphql": "3.
|
|
23
|
+
"@graphcommerce/framer-scroller": "2.1.22",
|
|
24
|
+
"@graphcommerce/graphql": "3.4.0",
|
|
25
25
|
"@graphcommerce/image": "3.1.7",
|
|
26
|
-
"@graphcommerce/magento-cart": "4.
|
|
27
|
-
"@graphcommerce/magento-store": "4.2.
|
|
28
|
-
"@graphcommerce/next-ui": "4.
|
|
29
|
-
"@graphcommerce/react-hook-form": "3.
|
|
26
|
+
"@graphcommerce/magento-cart": "4.5.1",
|
|
27
|
+
"@graphcommerce/magento-store": "4.2.16",
|
|
28
|
+
"@graphcommerce/next-ui": "4.13.0",
|
|
29
|
+
"@graphcommerce/react-hook-form": "3.3.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@lingui/react": "^3.13.2",
|