@magento/peregrine 13.2.1 → 14.2.1-beta.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.
@@ -1,6 +1,5 @@
1
1
  import { createHttpLink } from '@apollo/client';
2
2
 
3
- import createAuthLink from '@magento/peregrine/lib/Apollo/links/authLink';
4
3
  import createErrorLink from '@magento/peregrine/lib/Apollo/links/errorLink';
5
4
  import createGqlCacheLink from '@magento/peregrine/lib/Apollo/links/gqlCacheLink';
6
5
  import createMutationQueueLink from '@magento/peregrine/lib/Apollo/links/mutationQueueLink';
@@ -32,7 +31,6 @@ export const customFetchToShrinkQuery = (uri, options) => {
32
31
  };
33
32
 
34
33
  const getLinks = apiBase => {
35
- const authLink = createAuthLink();
36
34
  const storeLink = createStoreLink();
37
35
  const errorLink = createErrorLink();
38
36
  const retryLink = createRetryLink();
@@ -54,7 +52,6 @@ const getLinks = apiBase => {
54
52
  const links = new Map()
55
53
  .set('MUTATION_QUEUE', mutationQueueLink)
56
54
  .set('RETRY', retryLink)
57
- .set('AUTH', authLink)
58
55
  .set('GQL_CACHE', gqlCacheLink)
59
56
  .set('STORE', storeLink)
60
57
  .set('ERROR', errorLink)
@@ -60,6 +60,7 @@ const CustomerOrdersFragment = gql`
60
60
  }
61
61
  shipping_method
62
62
  status
63
+ state
63
64
  total {
64
65
  discounts {
65
66
  amount {
@@ -68,6 +68,7 @@ export const useSignIn = props => {
68
68
  async ({ email, password }) => {
69
69
  setIsSigningIn(true);
70
70
  handleTriggerClick();
71
+
71
72
  try {
72
73
  // Get source cart id (guest cart id).
73
74
  const sourceCartId = cartId;
@@ -159,13 +160,14 @@ export const useSignIn = props => {
159
160
  showForgotPassword();
160
161
  }, [setDefaultUsername, showForgotPassword]);
161
162
 
162
- const forgotPasswordHandleEnterKeyPress = useCallback(() => {
163
+ const forgotPasswordHandleEnterKeyPress = useCallback(
163
164
  event => {
164
165
  if (event.key === 'Enter') {
165
166
  handleForgotPassword();
166
167
  }
167
- };
168
- }, [handleForgotPassword]);
168
+ },
169
+ [handleForgotPassword]
170
+ );
169
171
 
170
172
  const handleCreateAccount = useCallback(() => {
171
173
  const { current: formApi } = formApiRef;
@@ -177,21 +179,23 @@ export const useSignIn = props => {
177
179
  showCreateAccount();
178
180
  }, [setDefaultUsername, showCreateAccount]);
179
181
 
180
- const handleEnterKeyPress = useCallback(() => {
182
+ const handleEnterKeyPress = useCallback(
181
183
  event => {
182
184
  if (event.key === 'Enter') {
183
185
  handleCreateAccount();
184
186
  }
185
- };
186
- }, [handleCreateAccount]);
187
+ },
188
+ [handleCreateAccount]
189
+ );
187
190
 
188
- const signinHandleEnterKeyPress = useCallback(() => {
191
+ const signinHandleEnterKeyPress = useCallback(
189
192
  event => {
190
193
  if (event.key === 'Enter') {
191
194
  handleSubmit();
192
195
  }
193
- };
194
- }, [handleSubmit]);
196
+ },
197
+ [handleSubmit]
198
+ );
195
199
 
196
200
  const errors = useMemo(
197
201
  () =>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magento/peregrine",
3
- "version": "13.2.1",
3
+ "version": "14.2.1-beta.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },