@magento/venia-sample-payments-checkmo 0.0.2 → 0.0.4-alpha.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/package.json +7 -7
- package/src/components/__tests__/__snapshots__/summary.spec.js.snap +10 -1
- package/src/components/checkmo.js +1 -1
- package/src/components/{checkmo.css → checkmo.module.css} +0 -0
- package/src/components/edit.js +3 -3
- package/src/components/{edit.css → edit.module.css} +0 -0
- package/src/components/summary.js +3 -3
- package/src/components/{summary.css → summary.module.css} +0 -0
- package/src/talons/checkmo.gql.js +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magento/venia-sample-payments-checkmo",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4-alpha.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -12,16 +12,16 @@
|
|
|
12
12
|
"repository": "github:magento/pwa-studio",
|
|
13
13
|
"license": "(OSL-3.0 OR AFL-3.0)",
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@magento/peregrine": "
|
|
16
|
-
"@magento/pwa-buildpack": "
|
|
17
|
-
"@magento/venia-ui": "
|
|
15
|
+
"@magento/peregrine": "12.2.0-alpha.1",
|
|
16
|
+
"@magento/pwa-buildpack": "11.1.0-alpha.1",
|
|
17
|
+
"@magento/venia-ui": "9.2.0-alpha.1",
|
|
18
18
|
"react": "~17.0.1",
|
|
19
|
-
"react-intl": "~5.
|
|
20
|
-
"react-router-dom": "~5.
|
|
19
|
+
"react-intl": "~5.20.0",
|
|
20
|
+
"react-router-dom": "~5.2.0"
|
|
21
21
|
},
|
|
22
22
|
"pwa-studio": {
|
|
23
23
|
"targets": {
|
|
24
|
-
"intercept": "./intercept
|
|
24
|
+
"intercept": "./intercept"
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -28,7 +28,16 @@ exports[`renders correctly 1`] = `
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
size={16}
|
|
31
|
-
src={
|
|
31
|
+
src={
|
|
32
|
+
Object {
|
|
33
|
+
"$$typeof": Symbol(react.forward_ref),
|
|
34
|
+
"propTypes": Object {
|
|
35
|
+
"color": [Function],
|
|
36
|
+
"size": [Function],
|
|
37
|
+
},
|
|
38
|
+
"render": [Function],
|
|
39
|
+
}
|
|
40
|
+
}
|
|
32
41
|
/>
|
|
33
42
|
<span
|
|
34
43
|
className="edit_text"
|
|
@@ -4,7 +4,7 @@ import { shape, string, bool, func } from 'prop-types';
|
|
|
4
4
|
import BillingAddress from '@magento/venia-ui/lib/components/CheckoutPage/BillingAddress';
|
|
5
5
|
|
|
6
6
|
import { useCheckmo } from '../talons/useCheckmo';
|
|
7
|
-
import defaultClasses from './checkmo.css';
|
|
7
|
+
import defaultClasses from './checkmo.module.css';
|
|
8
8
|
import { FormattedMessage } from 'react-intl';
|
|
9
9
|
|
|
10
10
|
/**
|
|
File without changes
|
package/src/components/edit.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { shape, string, bool, func } from 'prop-types';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
5
5
|
|
|
6
6
|
import CheckMo from './checkmo';
|
|
7
|
-
import defaultClasses from './edit.css';
|
|
7
|
+
import defaultClasses from './edit.module.css';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* The edit view for the Checkmo payment method.
|
|
@@ -18,7 +18,7 @@ const EditCheckMo = props => {
|
|
|
18
18
|
shouldSubmit
|
|
19
19
|
} = props;
|
|
20
20
|
|
|
21
|
-
const classes =
|
|
21
|
+
const classes = useStyle(defaultClasses, props.classes);
|
|
22
22
|
|
|
23
23
|
return (
|
|
24
24
|
<div className={classes.root}>
|
|
File without changes
|
|
@@ -3,11 +3,11 @@ import { func, shape, string } from 'prop-types';
|
|
|
3
3
|
import { FormattedMessage } from 'react-intl';
|
|
4
4
|
import { Edit2 as EditIcon } from 'react-feather';
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
7
7
|
import Icon from '@magento/venia-ui/lib/components/Icon';
|
|
8
8
|
import LinkButton from '@magento/venia-ui/lib/components/LinkButton';
|
|
9
9
|
|
|
10
|
-
import defaultClasses from './summary.css';
|
|
10
|
+
import defaultClasses from './summary.module.css';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* The Summary component of the Check / Money Order payment method extension.
|
|
@@ -15,7 +15,7 @@ import defaultClasses from './summary.css';
|
|
|
15
15
|
const Summary = props => {
|
|
16
16
|
const { onEdit } = props;
|
|
17
17
|
|
|
18
|
-
const classes =
|
|
18
|
+
const classes = useStyle(defaultClasses, props.classes);
|
|
19
19
|
|
|
20
20
|
return (
|
|
21
21
|
<div className={classes.root}>
|
|
File without changes
|
|
@@ -2,8 +2,9 @@ import { gql } from '@apollo/client';
|
|
|
2
2
|
|
|
3
3
|
export const GET_CHECKMO_CONFIG_DATA = gql`
|
|
4
4
|
query storeConfigData {
|
|
5
|
+
# eslint-disable-next-line @graphql-eslint/require-id-when-available
|
|
5
6
|
storeConfig {
|
|
6
|
-
|
|
7
|
+
store_code
|
|
7
8
|
payment_checkmo_payable_to @client
|
|
8
9
|
payment_checkmo_mailing_address @client
|
|
9
10
|
}
|
|
@@ -14,7 +15,7 @@ export const SET_PAYMENT_METHOD_ON_CART = gql`
|
|
|
14
15
|
mutation setPaymentMethodOnCart($cartId: String!) {
|
|
15
16
|
setPaymentMethodOnCart(
|
|
16
17
|
input: { cart_id: $cartId, payment_method: { code: "checkmo" } }
|
|
17
|
-
)
|
|
18
|
+
) {
|
|
18
19
|
cart {
|
|
19
20
|
id
|
|
20
21
|
selected_payment_method {
|