@graphcommerce/mollie-magento-payment 10.0.0-canary.67 → 10.0.0-canary.72

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,15 @@
1
1
  # Change Log
2
2
 
3
+ ## 10.0.0-canary.72
4
+
5
+ ## 10.0.0-canary.71
6
+
7
+ ## 10.0.0-canary.70
8
+
9
+ ## 10.0.0-canary.69
10
+
11
+ ## 10.0.0-canary.68
12
+
3
13
  ## 10.0.0-canary.67
4
14
 
5
15
  ## 10.0.0-canary.66
@@ -110,18 +110,21 @@ export function MollieField(props: MollieFieldProps) {
110
110
  label={label}
111
111
  error={isSubmitted && (!!state.error || !state.valid)}
112
112
  helperText={isSubmitted && (state.error || (!state.valid && `${label} cannot be empty`))}
113
- InputProps={{
114
- inputComponent: InputComponent,
115
- inputProps: { component: IframeField },
116
- }}
117
- InputLabelProps={{
118
- sx: (theme) => ({
119
- background:
120
- theme.palette.mode === 'light'
121
- ? theme.palette.secondary.light
122
- : theme.palette.background.paper,
123
- }),
124
- shrink: true,
113
+ slotProps={{
114
+ input: {
115
+ inputComponent: InputComponent,
116
+ inputProps: { component: IframeField },
117
+ },
118
+
119
+ inputLabel: {
120
+ sx: (theme) => ({
121
+ background: theme.vars.palette.secondary.light,
122
+ ...theme.applyStyles('dark', {
123
+ background: theme.vars.palette.background.paper,
124
+ }),
125
+ }),
126
+ shrink: true,
127
+ },
125
128
  }}
126
129
  />
127
130
  </mollieFieldContext.Provider>
@@ -52,7 +52,7 @@ export function MolliePaymentHandler({ code }: PaymentHandlerProps) {
52
52
  returnedCartId = res.data?.mollieRestoreCart?.cart.id
53
53
  }
54
54
 
55
- if (result.errors || !paymentStatus) return
55
+ if (result.error || !paymentStatus) return
56
56
 
57
57
  if (successStatusses.includes(paymentStatus)) {
58
58
  // eslint-disable-next-line @typescript-eslint/no-floating-promises
@@ -30,12 +30,12 @@ export function MolliePlaceOrder(props: PaymentPlaceOrderProps) {
30
30
  onComplete: async (result) => {
31
31
  assertMollieOrderPlaced(result)
32
32
 
33
- const { mollie_payment_token, order_number, mollie_redirect_url } =
34
- result.data.placeOrder.order
33
+ const order = result.data?.placeOrder?.order
34
+ const { mollie_payment_token, order_number, mollie_redirect_url } = order
35
35
 
36
36
  // Redirect to the payment gateway
37
- await lock({ mollie_payment_token, method: code, order_number })
38
- await push(mollie_redirect_url)
37
+ await lock({ mollie_payment_token: mollie_payment_token ?? null, method: code, order_number })
38
+ if (mollie_redirect_url) await push(mollie_redirect_url)
39
39
  },
40
40
  })
41
41
 
@@ -1,5 +1,4 @@
1
- import { type FetchResult } from '@graphcommerce/graphql'
2
- import type { AssertedOrderPlaced, PlacedOrder } from '@graphcommerce/magento-cart-payment-method'
1
+ import type { ApolloLink } from '@graphcommerce/graphql'
3
2
  import {
4
3
  assertOrderPlaced,
5
4
  throwGenericPlaceOrderError,
@@ -7,18 +6,20 @@ import {
7
6
  import type { MolliePlaceOrderMutation } from './MolliePlaceOrder.gql'
8
7
 
9
8
  /** Assert that the order was place successfully. */
10
- export function assertMollieOrderPlaced<T extends FetchResult<MolliePlaceOrderMutation>>(
9
+ export function assertMollieOrderPlaced<T extends ApolloLink.Result<MolliePlaceOrderMutation>>(
11
10
  result: T,
12
- ): asserts result is AssertedOrderPlaced<T> & {
13
- data: {
14
- placeOrder: {
15
- order: PlacedOrder<T> & {
16
- mollie_redirect_url: NonNullable<PlacedOrder<T>['mollie_redirect_url']>
17
- mollie_payment_token: NonNullable<PlacedOrder<T>['mollie_payment_token']>
11
+ ): asserts result is T &
12
+ ApolloLink.Result<MolliePlaceOrderMutation> & {
13
+ data: {
14
+ placeOrder: {
15
+ order: {
16
+ order_number: string
17
+ mollie_redirect_url: string
18
+ mollie_payment_token: string
19
+ }
18
20
  }
19
21
  }
20
- }
21
- } {
22
+ } {
22
23
  assertOrderPlaced(result)
23
24
 
24
25
  const { mollie_redirect_url, mollie_payment_token } = result.data.placeOrder.order
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/mollie-magento-payment",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "10.0.0-canary.67",
5
+ "version": "10.0.0-canary.72",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,25 +12,25 @@
12
12
  }
13
13
  },
14
14
  "peerDependencies": {
15
- "@graphcommerce/ecommerce-ui": "^10.0.0-canary.67",
16
- "@graphcommerce/eslint-config-pwa": "^10.0.0-canary.67",
17
- "@graphcommerce/graphql": "^10.0.0-canary.67",
18
- "@graphcommerce/graphql-mesh": "^10.0.0-canary.67",
19
- "@graphcommerce/image": "^10.0.0-canary.67",
20
- "@graphcommerce/magento-cart": "^10.0.0-canary.67",
21
- "@graphcommerce/magento-cart-payment-method": "^10.0.0-canary.67",
22
- "@graphcommerce/magento-cart-shipping-address": "^10.0.0-canary.67",
23
- "@graphcommerce/magento-product": "^10.0.0-canary.67",
24
- "@graphcommerce/magento-product-configurable": "^10.0.0-canary.67",
25
- "@graphcommerce/magento-store": "^10.0.0-canary.67",
26
- "@graphcommerce/next-ui": "^10.0.0-canary.67",
27
- "@graphcommerce/prettier-config-pwa": "^10.0.0-canary.67",
28
- "@graphcommerce/react-hook-form": "^10.0.0-canary.67",
29
- "@graphcommerce/typescript-config-pwa": "^10.0.0-canary.67",
15
+ "@graphcommerce/ecommerce-ui": "^10.0.0-canary.72",
16
+ "@graphcommerce/eslint-config-pwa": "^10.0.0-canary.72",
17
+ "@graphcommerce/graphql": "^10.0.0-canary.72",
18
+ "@graphcommerce/graphql-mesh": "^10.0.0-canary.72",
19
+ "@graphcommerce/image": "^10.0.0-canary.72",
20
+ "@graphcommerce/magento-cart": "^10.0.0-canary.72",
21
+ "@graphcommerce/magento-cart-payment-method": "^10.0.0-canary.72",
22
+ "@graphcommerce/magento-cart-shipping-address": "^10.0.0-canary.72",
23
+ "@graphcommerce/magento-product": "^10.0.0-canary.72",
24
+ "@graphcommerce/magento-product-configurable": "^10.0.0-canary.72",
25
+ "@graphcommerce/magento-store": "^10.0.0-canary.72",
26
+ "@graphcommerce/next-ui": "^10.0.0-canary.72",
27
+ "@graphcommerce/prettier-config-pwa": "^10.0.0-canary.72",
28
+ "@graphcommerce/react-hook-form": "^10.0.0-canary.72",
29
+ "@graphcommerce/typescript-config-pwa": "^10.0.0-canary.72",
30
30
  "@lingui/core": "^5",
31
31
  "@lingui/macro": "^5",
32
32
  "@lingui/react": "^5",
33
- "@mui/material": "^5.10.16",
33
+ "@mui/material": "^7.0.0",
34
34
  "next": "*",
35
35
  "react": "^19.2.0",
36
36
  "react-dom": "^19.2.0"