@afosto/checkout-ui 0.0.8 → 0.0.10

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.
Files changed (65) hide show
  1. package/dist/CheckoutProvider/CheckoutProvider.d.ts.map +1 -1
  2. package/dist/CheckoutProvider/CheckoutProvider.js +53 -50
  3. package/dist/CheckoutSummary/CheckoutSummary.d.ts +5 -1
  4. package/dist/CheckoutSummary/CheckoutSummary.d.ts.map +1 -1
  5. package/dist/CheckoutSummary/CheckoutSummary.js +90 -68
  6. package/dist/CheckoutSummary/components/CheckoutSummaryCouponField/CheckoutSummaryCouponField.d.ts +11 -0
  7. package/dist/CheckoutSummary/components/CheckoutSummaryCouponField/CheckoutSummaryCouponField.d.ts.map +1 -0
  8. package/dist/CheckoutSummary/components/CheckoutSummaryCouponField/CheckoutSummaryCouponField.js +71 -0
  9. package/dist/CheckoutSummary/components/CheckoutSummaryCouponField/index.d.ts +3 -0
  10. package/dist/CheckoutSummary/components/CheckoutSummaryCouponField/index.d.ts.map +1 -0
  11. package/dist/CheckoutSummary/components/CheckoutSummaryCouponField/index.js +4 -0
  12. package/dist/CheckoutSummary/components/CheckoutSummaryCoupons/CheckoutSummaryCoupons.d.ts +1 -0
  13. package/dist/CheckoutSummary/components/CheckoutSummaryCoupons/CheckoutSummaryCoupons.d.ts.map +1 -1
  14. package/dist/CheckoutSummary/components/CheckoutSummaryCoupons/CheckoutSummaryCoupons.js +33 -7
  15. package/dist/CheckoutSummary/index.d.ts +2 -0
  16. package/dist/CheckoutSummary/index.d.ts.map +1 -1
  17. package/dist/CheckoutSummary/index.js +26 -24
  18. package/dist/constants/paymentMethodIconMapping.d.ts +1 -0
  19. package/dist/constants/paymentMethodIconMapping.d.ts.map +1 -1
  20. package/dist/constants/paymentMethodIconMapping.js +54 -52
  21. package/dist/hooks/useCheckoutCart.d.ts +48 -10
  22. package/dist/hooks/useCheckoutCart.d.ts.map +1 -1
  23. package/dist/hooks/useCheckoutCart.js +117 -63
  24. package/dist/hooks/useCheckoutOrder.d.ts +48 -10
  25. package/dist/hooks/useCheckoutOrder.d.ts.map +1 -1
  26. package/dist/hooks/useCheckoutOrder.js +208 -154
  27. package/dist/icons/AngleRightSolid.d.ts +3 -0
  28. package/dist/icons/AngleRightSolid.d.ts.map +1 -0
  29. package/dist/icons/AngleRightSolid.js +6 -0
  30. package/dist/icons/index.d.ts +1 -0
  31. package/dist/icons/index.d.ts.map +1 -1
  32. package/dist/icons/index.js +130 -126
  33. package/dist/icons/paymentMethods/Giftcard.d.ts +3 -0
  34. package/dist/icons/paymentMethods/Giftcard.d.ts.map +1 -0
  35. package/dist/icons/paymentMethods/Giftcard.js +54 -0
  36. package/dist/icons/paymentMethods/Ideal.d.ts.map +1 -1
  37. package/dist/icons/paymentMethods/Ideal.js +104 -23
  38. package/dist/icons/paymentMethods/index.d.ts +1 -0
  39. package/dist/icons/paymentMethods/index.d.ts.map +1 -1
  40. package/dist/icons/paymentMethods/index.js +80 -78
  41. package/dist/index.js +301 -289
  42. package/dist/mutations/addCouponToCart.d.ts +12 -0
  43. package/dist/mutations/addCouponToCart.d.ts.map +1 -0
  44. package/dist/mutations/addCouponToCart.js +15 -0
  45. package/dist/mutations/addCouponToOrder.d.ts +12 -0
  46. package/dist/mutations/addCouponToOrder.d.ts.map +1 -0
  47. package/dist/mutations/addCouponToOrder.js +15 -0
  48. package/dist/mutations/index.d.ts +26 -18
  49. package/dist/mutations/index.d.ts.map +1 -1
  50. package/dist/mutations/index.js +44 -36
  51. package/dist/mutations/removeCouponFromCart.d.ts +12 -0
  52. package/dist/mutations/removeCouponFromCart.d.ts.map +1 -0
  53. package/dist/mutations/removeCouponFromCart.js +15 -0
  54. package/dist/mutations/removeCouponFromOrder.d.ts +12 -0
  55. package/dist/mutations/removeCouponFromOrder.d.ts.map +1 -0
  56. package/dist/mutations/removeCouponFromOrder.js +15 -0
  57. package/dist/operations/cartOperations.d.ts +10 -0
  58. package/dist/operations/cartOperations.d.ts.map +1 -1
  59. package/dist/operations/cartOperations.js +218 -168
  60. package/dist/operations/orderOperations.d.ts +10 -0
  61. package/dist/operations/orderOperations.d.ts.map +1 -1
  62. package/dist/operations/orderOperations.js +245 -195
  63. package/dist/types.d.ts +1 -0
  64. package/dist/types.d.ts.map +1 -1
  65. package/package.json +1 -1
@@ -1,251 +1,303 @@
1
- import { useCheckoutForm as Y } from "./useCheckoutForm.js";
2
- import { useCheckoutState as Z } from "./useCheckoutState.js";
3
- import { useCheckoutAuth as tt } from "./useCheckoutAuth.js";
4
- import { useQueryClient as et, useMutation as i } from "@tanstack/react-query";
5
- import { useCheckoutSummary as ot } from "./useCheckoutSummary.js";
6
- import { isDefined as rt } from "@afosto/utils";
7
- import { useCheckoutAnalytics as nt } from "./useCheckoutAnalytics.js";
8
- const lt = (F) => {
1
+ import { useCheckoutForm as ot } from "./useCheckoutForm.js";
2
+ import { useCheckoutState as nt } from "./useCheckoutState.js";
3
+ import { useCheckoutAuth as rt } from "./useCheckoutAuth.js";
4
+ import { useQueryClient as st, useMutation as d } from "@tanstack/react-query";
5
+ import { useCheckoutSummary as at } from "./useCheckoutSummary.js";
6
+ import { isDefined as ct } from "@afosto/utils";
7
+ import { useCheckoutAnalytics as dt } from "./useCheckoutAnalytics.js";
8
+ const kt = (F) => {
9
9
  const {
10
10
  orderId: c,
11
11
  analytics: q,
12
- channel: P,
12
+ channel: w,
13
13
  createSummary: A,
14
14
  defaultOperations: O,
15
15
  isLoading: y = !1,
16
- isLoadingChannel: w,
16
+ isLoadingChannel: C,
17
17
  locale: D,
18
18
  settings: u,
19
- storefront: M,
19
+ storefront: P,
20
20
  operations: e,
21
21
  steps: T
22
- } = F || {}, l = "order", m = et(), h = nt({
22
+ } = F || {}, M = "order", m = st(), h = dt({
23
23
  analytics: q,
24
- flow: l,
24
+ flow: M,
25
25
  settings: u
26
- }), { track: I } = h, f = tt({
26
+ }), { track: v } = h, f = rt({
27
27
  operations: e,
28
28
  settings: u,
29
- storefront: M,
30
- track: I
31
- }), { isInitializingAuth: E } = f, C = ot(), g = Y({
32
- channel: P,
29
+ storefront: P,
30
+ track: v
31
+ }), { isInitializingAuth: E } = f, l = at(), g = ot({
32
+ channel: w,
33
33
  locale: D,
34
34
  settings: u,
35
35
  steps: T
36
- }), { initializeSteps: v } = g, r = {
36
+ }), { initializeSteps: I } = g, n = {
37
37
  ...f,
38
- ...C,
38
+ ...l,
39
39
  ...g,
40
40
  ...h,
41
- channel: P,
41
+ channel: w,
42
42
  createSummary: A,
43
43
  defaultOperations: O,
44
- flow: l,
44
+ flow: M,
45
45
  operations: e,
46
46
  settings: u,
47
- storefront: M
48
- }, k = Z({
49
- enabled: !!c && !E && !w && !y,
47
+ storefront: P
48
+ }, R = nt({
49
+ enabled: !!c && !E && !C && !y,
50
50
  notFound: !y && !c,
51
51
  onError: e.initial.error,
52
52
  onFormat: async (t) => {
53
53
  const o = await e.initial.formatter(
54
54
  t,
55
- r
55
+ n
56
56
  );
57
57
  return o?.order ? o : null;
58
58
  },
59
59
  onSuccess: async (t) => {
60
- await e.initial.success(t, r);
60
+ await e.initial.success(t, n);
61
61
  try {
62
62
  const { skipCheckCompletedSteps: o } = t || {};
63
- v(t.order, t, { skipCheckCompletedSteps: o });
63
+ I(t.order, t, { skipCheckCompletedSteps: o });
64
64
  } catch {
65
65
  }
66
66
  },
67
67
  queryKey: ["initialCheckoutOrderState", c],
68
- queryFn: async () => e.initial.queryFn({ id: c }, r)
69
- }), { isInitializing: L, setIsAddingExpressPaymentMethod: S } = k, N = L || w || y, x = i({
70
- mutationFn: async (t) => e.addCustomer.queryFn(t, r),
68
+ queryFn: async () => e.initial.queryFn({ id: c }, n)
69
+ }), { isInitializing: L, setIsAddingExpressPaymentMethod: S } = R, N = L || C || y, x = d({
70
+ mutationFn: async (t) => e.addCoupon.queryFn(t, n),
71
+ onSuccess: async (t) => {
72
+ const o = await e.addCoupon.formatter(
73
+ t,
74
+ n
75
+ );
76
+ e.addCoupon.success(o, n);
77
+ },
78
+ onError: (t) => {
79
+ e.addCoupon.error(t);
80
+ }
81
+ }), K = d({
82
+ mutationFn: async (t) => e.removeCoupon.queryFn(t, n),
83
+ onSuccess: async (t) => {
84
+ const o = await e.removeCoupon.formatter(
85
+ t,
86
+ n
87
+ );
88
+ e.removeCoupon.success(o, n);
89
+ },
90
+ onError: (t) => {
91
+ e.removeCoupon.error(t);
92
+ }
93
+ }), Q = d({
94
+ mutationFn: async (t) => e.addCustomer.queryFn(t, n),
71
95
  onSuccess: async (t) => {
72
96
  const o = await e.addCustomer.formatter(
73
97
  t,
74
- r
98
+ n
75
99
  );
76
- e.addCustomer.success(o, r);
100
+ e.addCustomer.success(o, n);
77
101
  },
78
102
  onError: (t) => {
79
103
  e.addCustomer.error(t);
80
104
  }
81
- }), K = i({
82
- mutationFn: async (t) => e.addCustomerCountryCode.queryFn(t, r),
105
+ }), j = d({
106
+ mutationFn: async (t) => e.addCustomerCountryCode.queryFn(t, n),
83
107
  onSuccess: async (t) => {
84
108
  const o = await e.addCustomerCountryCode.formatter(
85
109
  t,
86
- r
110
+ n
87
111
  );
88
112
  e.addCustomerCountryCode.success(
89
113
  o,
90
- r
114
+ n
91
115
  );
92
116
  },
93
117
  onError: (t) => {
94
118
  e.addCustomerCountryCode.error(t);
95
119
  }
96
- }), Q = i({
97
- mutationFn: async (t) => e.addInformation.queryFn(t, r),
120
+ }), z = d({
121
+ mutationFn: async (t) => e.addInformation.queryFn(t, n),
98
122
  onSuccess: async (t) => {
99
123
  const o = await e.addInformation.formatter(
100
124
  t,
101
- r
125
+ n
102
126
  );
103
- e.addInformation.success(o, r);
127
+ e.addInformation.success(o, n);
104
128
  },
105
129
  onError: (t) => {
106
130
  e.addInformation.error(t);
107
131
  }
108
- }), j = i({
109
- mutationFn: async (t) => e.addNote.queryFn(t, r),
132
+ }), b = d({
133
+ mutationFn: async (t) => e.addNote.queryFn(t, n),
110
134
  onSuccess: async (t) => {
111
135
  const o = await e.addNote.formatter(
112
136
  t,
113
- r
137
+ n
114
138
  );
115
- e.addNote.success(o, r);
139
+ e.addNote.success(o, n);
116
140
  },
117
141
  onError: (t) => {
118
142
  e.addNote.error(t);
119
143
  }
120
- }), z = i({
121
- mutationFn: async (t) => e.addPaymentMethod.queryFn(t, r),
144
+ }), $ = d({
145
+ mutationFn: async (t) => e.addPaymentMethod.queryFn(t, n),
122
146
  onSuccess: async (t) => {
123
147
  const o = await e.addPaymentMethod.formatter(
124
148
  t,
125
- r
149
+ n
126
150
  );
127
- e.addPaymentMethod.success(o, r);
151
+ e.addPaymentMethod.success(o, n);
128
152
  },
129
153
  onError: (t) => {
130
154
  e.addPaymentMethod.error(t);
131
155
  }
132
- }), b = i({
133
- mutationFn: async (t) => e.addPickupPoint.queryFn(t, r),
156
+ }), U = d({
157
+ mutationFn: async (t) => e.addPickupPoint.queryFn(t, n),
134
158
  onSuccess: async (t) => {
135
159
  const o = await e.addPickupPoint.formatter(
136
160
  t,
137
- r
161
+ n
138
162
  );
139
- e.addPickupPoint.success(o, r);
163
+ e.addPickupPoint.success(o, n);
140
164
  },
141
165
  onError: (t) => {
142
166
  e.addPickupPoint.error(t);
143
167
  }
144
- }), $ = i({
145
- mutationFn: async (t) => e.addShippingMethod.queryFn(t, r),
168
+ }), _ = d({
169
+ mutationFn: async (t) => e.addShippingMethod.queryFn(t, n),
146
170
  onSuccess: async (t) => {
147
171
  const o = await e.addShippingMethod.formatter(
148
172
  t,
149
- r
173
+ n
150
174
  );
151
- e.addShippingMethod.success(o, r);
175
+ e.addShippingMethod.success(o, n);
152
176
  },
153
177
  onError: (t) => {
154
178
  e.addShippingMethod.error(t);
155
179
  }
156
- }), U = i({
157
- mutationFn: async (t) => e.checkout.queryFn(t, r),
180
+ }), B = d({
181
+ mutationFn: async (t) => e.checkout.queryFn(t, n),
158
182
  onSuccess: async (t) => {
159
183
  const o = await e.checkout.formatter(
160
184
  t,
161
- r
185
+ n
162
186
  );
163
- e.checkout.success(o, r);
187
+ e.checkout.success(o, n);
164
188
  },
165
189
  onError: (t) => {
166
190
  e.checkout.error(t);
167
191
  }
168
- }), _ = i({
169
- mutationFn: async (t) => e.setAgreementTemplate.queryFn(t, r),
192
+ }), G = d({
193
+ mutationFn: async (t) => e.setAgreementTemplate.queryFn(t, n),
170
194
  onSuccess: async (t) => {
171
195
  const o = await e.setAgreementTemplate.formatter(
172
196
  t,
173
- r
197
+ n
174
198
  );
175
199
  e.setAgreementTemplate.success(
176
200
  o,
177
- r
201
+ n
178
202
  );
179
203
  },
180
204
  onError: (t) => {
181
205
  e.setAgreementTemplate.error(t);
182
206
  }
183
- }), B = async ({
184
- customer: t
207
+ }), H = async ({
208
+ coupon: t
185
209
  }) => {
186
210
  const o = await x.mutateAsync({
211
+ orderId: c,
212
+ coupon: t
213
+ }), r = await e.addCoupon.formatter(
214
+ o,
215
+ n
216
+ ), { order: s, ...a } = r || {};
217
+ return {
218
+ ...s,
219
+ ...a
220
+ };
221
+ }, J = async ({
222
+ coupon: t
223
+ }) => {
224
+ const o = await K.mutateAsync({
225
+ orderId: c,
226
+ coupon: t
227
+ }), r = await e.removeCoupon.formatter(
228
+ o,
229
+ n
230
+ ), { order: s, ...a } = r || {};
231
+ return {
232
+ ...s,
233
+ ...a
234
+ };
235
+ }, V = async ({
236
+ customer: t
237
+ }) => {
238
+ const o = await Q.mutateAsync({
187
239
  orderId: c,
188
240
  customer: t
189
- }), n = await e.addCustomer.formatter(
241
+ }), r = await e.addCustomer.formatter(
190
242
  o,
191
- r
192
- ), { order: s, ...a } = n || {};
243
+ n
244
+ ), { order: s, ...a } = r || {};
193
245
  return {
194
246
  ...s,
195
247
  ...a
196
248
  };
197
- }, G = async ({
249
+ }, W = async ({
198
250
  countryCode: t
199
251
  }) => {
200
- const o = await K.mutateAsync({
252
+ const o = await j.mutateAsync({
201
253
  orderId: c,
202
254
  countryCode: t
203
- }), n = await e.addCustomerCountryCode.formatter(
255
+ }), r = await e.addCustomerCountryCode.formatter(
204
256
  o,
205
- r
206
- ), { order: s, ...a } = n || {};
257
+ n
258
+ ), { order: s, ...a } = r || {};
207
259
  return {
208
260
  ...s,
209
261
  ...a
210
262
  };
211
- }, H = async ({
263
+ }, X = async ({
212
264
  billingAddress: t,
213
265
  customer: o,
214
- phoneNumber: n,
266
+ phoneNumber: r,
215
267
  shippingAddress: s
216
268
  }) => {
217
- const a = await Q.mutateAsync({
269
+ const a = await z.mutateAsync({
218
270
  orderId: c,
219
271
  billingAddress: t,
220
272
  customer: o,
221
- phoneNumber: n,
273
+ phoneNumber: r,
222
274
  shippingAddress: s
223
- }), d = await e.addInformation.formatter(
275
+ }), i = await e.addInformation.formatter(
224
276
  a,
225
- r
226
- ), { order: p, ...X } = d || {};
277
+ n
278
+ ), { order: p, ...et } = i || {};
227
279
  return {
228
280
  ...p,
229
- ...X
281
+ ...et
230
282
  };
231
- }, J = async ({ note: t }) => {
232
- const o = await j.mutateAsync({
283
+ }, Y = async ({ note: t }) => {
284
+ const o = await b.mutateAsync({
233
285
  orderId: c,
234
286
  note: t
235
- }), n = await e.addNote.formatter(
287
+ }), r = await e.addNote.formatter(
236
288
  o,
237
- r
238
- ), { order: s, ...a } = n || {};
289
+ n
290
+ ), { order: s, ...a } = r || {};
239
291
  return {
240
292
  ...s,
241
293
  ...a
242
294
  };
243
- }, V = async () => {
244
- const t = await U.mutateAsync({
295
+ }, Z = async () => {
296
+ const t = await B.mutateAsync({
245
297
  id: c
246
298
  }), o = await e.checkout.formatter(
247
299
  t,
248
- r
300
+ n
249
301
  );
250
302
  if (!o?.order)
251
303
  return;
@@ -254,80 +306,81 @@ const lt = (F) => {
254
306
  window.location.href = `${p}/payment/execute?order_id=${o?.order?.id}`;
255
307
  return;
256
308
  }
257
- const [s] = o?.order?.options?.proceedingStep?.proceeding?.options || [], { method: a, url: d } = s || {};
258
- a?.toLowerCase() === "follow" && rt(d) && (window.location.href = d);
259
- }, W = async () => {
309
+ const [s] = o?.order?.options?.proceedingStep?.proceeding?.options || [], { method: a, url: i } = s || {};
310
+ a?.toLowerCase() === "follow" && ct(i) && (window.location.href = i);
311
+ }, tt = async () => {
260
312
  try {
261
313
  const t = await m.fetchQuery({
262
314
  queryKey: ["getOrderInitialPaymentStep", c],
263
315
  queryFn: async () => e.initialPaymentStep.queryFn(
264
316
  { id: c },
265
- r
317
+ n
266
318
  )
267
319
  }), o = await e.initialPaymentStep.formatter(
268
320
  t,
269
- r
270
- ), { agreementOptions: n, agreementTemplate: s, paymentMethods: a } = o || {};
321
+ n
322
+ ), { agreementOptions: r, agreementTemplate: s, paymentMethods: a } = o || {};
271
323
  return e.initialPaymentStep.success(
272
324
  o,
273
- r
325
+ n
274
326
  ), {
275
- agreementOptions: n,
327
+ agreementOptions: r,
276
328
  agreementTemplate: s,
277
329
  paymentMethods: a
278
330
  };
279
331
  } catch (t) {
280
332
  return e.initialPaymentStep.error(t), Promise.reject(t);
281
333
  }
282
- }, R = async ({
334
+ }, k = async ({
283
335
  methodId: t,
284
336
  issuerId: o,
285
- terminalId: n
337
+ terminalId: r
286
338
  }) => {
287
- const s = await z.mutateAsync({
339
+ const s = await $.mutateAsync({
288
340
  orderId: c,
289
341
  methodId: t,
290
342
  issuerId: o,
291
- terminalId: n
343
+ terminalId: r
292
344
  }), a = await e.addPaymentMethod.formatter(
293
345
  s,
294
- r
295
- ), { order: d, ...p } = a || {};
346
+ n
347
+ ), { order: i, ...p } = a || {};
296
348
  return {
297
- ...d,
349
+ ...i,
298
350
  ...p
299
351
  };
300
352
  };
301
353
  return {
302
- ...k,
354
+ ...R,
303
355
  ...f,
304
- ...C,
356
+ ...l,
305
357
  ...g,
306
358
  ...h,
307
- addCustomer: B,
308
- addCustomerCountryCode: G,
359
+ addCoupon: H,
360
+ addCustomer: V,
361
+ addCustomerCountryCode: W,
309
362
  addExpressPaymentMethod: async ({
310
363
  methodId: t
311
364
  }) => {
312
365
  try {
313
- return S(!0), R({ methodId: t });
366
+ return S(!0), k({ methodId: t });
314
367
  } catch {
315
368
  S(!1);
316
369
  }
317
370
  },
318
- addInformation: H,
319
- addNote: J,
320
- addPaymentMethod: R,
371
+ addInformation: X,
372
+ addNote: Y,
373
+ addPaymentMethod: k,
321
374
  addPickupPoint: async ({
322
375
  pickupPointId: t
323
376
  }) => {
324
- const o = await b.mutateAsync({
377
+ const o = await U.mutateAsync({
325
378
  orderId: c,
326
379
  pickupPointId: t
327
- }), n = await e.addPickupPoint.formatter(
380
+ }), r = await e.addPickupPoint.formatter(
328
381
  o,
329
- r
330
- ), { order: s, ...a } = n || {};
382
+ n
383
+ ), { order: s, ...a } = r || {};
331
384
  return {
332
385
  ...s,
333
386
  ...a
@@ -336,38 +389,38 @@ const lt = (F) => {
336
389
  addShippingMethod: async ({
337
390
  methodId: t
338
391
  }) => {
339
- const o = await $.mutateAsync({
392
+ const o = await _.mutateAsync({
340
393
  orderId: c,
341
394
  methodId: t
342
- }), n = await e.addShippingMethod.formatter(
395
+ }), r = await e.addShippingMethod.formatter(
343
396
  o,
344
- r
345
- ), { order: s, ...a } = n || {};
397
+ n
398
+ ), { order: s, ...a } = r || {};
346
399
  return {
347
400
  ...s,
348
401
  ...a
349
402
  };
350
403
  },
351
- checkout: V,
352
- getInitialPaymentStep: W,
404
+ checkout: Z,
405
+ getInitialPaymentStep: tt,
353
406
  getPaymentMethods: async () => {
354
407
  try {
355
408
  const t = await m.fetchQuery({
356
409
  queryKey: ["getOrderPaymentMethods", c],
357
410
  queryFn: async () => e.getPaymentMethods.queryFn(
358
411
  { id: c },
359
- r
412
+ n
360
413
  )
361
414
  }), o = await e.getPaymentMethods.formatter(
362
415
  t,
363
- r
416
+ n
364
417
  ), {
365
- currentPaymentMethod: n,
418
+ currentPaymentMethod: r,
366
419
  paymentMethods: s,
367
420
  payments: a = []
368
421
  } = o || {};
369
- return e.getPaymentMethods.success(o, r), {
370
- currentPaymentMethod: n,
422
+ return e.getPaymentMethods.success(o, n), {
423
+ currentPaymentMethod: r,
371
424
  paymentMethods: s,
372
425
  payments: a
373
426
  };
@@ -380,7 +433,7 @@ const lt = (F) => {
380
433
  postalCode: o
381
434
  }) => {
382
435
  try {
383
- const n = await m.fetchQuery({
436
+ const r = await m.fetchQuery({
384
437
  queryKey: ["getOrderPickupPoints", t, o],
385
438
  queryFn: async () => e.getPickupPoints.queryFn(
386
439
  {
@@ -388,17 +441,17 @@ const lt = (F) => {
388
441
  countryCode: t,
389
442
  postalCode: o
390
443
  },
391
- r
444
+ n
392
445
  )
393
446
  }), s = await e.getPickupPoints.formatter(
394
- n,
395
- r
447
+ r,
448
+ n
396
449
  ), { pickupPoints: a } = s || {};
397
- return e.getPickupPoints.success(s, r), {
450
+ return e.getPickupPoints.success(s, n), {
398
451
  pickupPoints: a
399
452
  };
400
- } catch (n) {
401
- return e.getPickupPoints.error(n), Promise.reject(n);
453
+ } catch (r) {
454
+ return e.getPickupPoints.error(r), Promise.reject(r);
402
455
  }
403
456
  },
404
457
  getReviewCheckoutData: async () => {
@@ -407,15 +460,15 @@ const lt = (F) => {
407
460
  queryKey: ["getOrderReviewCheckoutData", c],
408
461
  queryFn: async () => e.getReviewCheckoutData.queryFn(
409
462
  { id: c },
410
- r
463
+ n
411
464
  )
412
465
  }), o = await e.getReviewCheckoutData.formatter(
413
466
  t,
414
- r
415
- ), { order: n, ...s } = o || {};
467
+ n
468
+ ), { order: r, ...s } = o || {};
416
469
  return e.getReviewCheckoutData.success(
417
470
  o,
418
- r
471
+ n
419
472
  ), s;
420
473
  } catch (t) {
421
474
  return e.getReviewCheckoutData.error(t), Promise.reject(t);
@@ -426,7 +479,7 @@ const lt = (F) => {
426
479
  postalCode: o
427
480
  }) => {
428
481
  try {
429
- const n = await m.fetchQuery({
482
+ const r = await m.fetchQuery({
430
483
  queryKey: ["getOrderShippingMethods", t, o],
431
484
  queryFn: async () => e.getShippingMethods.queryFn(
432
485
  {
@@ -434,34 +487,35 @@ const lt = (F) => {
434
487
  countryCode: t,
435
488
  postalCode: o
436
489
  },
437
- r
490
+ n
438
491
  )
439
492
  }), s = await e.getShippingMethods.formatter(
440
- n,
441
- r
442
- ), { currentShippingMethod: a, shippingMethods: d } = s || {};
493
+ r,
494
+ n
495
+ ), { currentShippingMethod: a, shippingMethods: i } = s || {};
443
496
  return e.getShippingMethods.success(
444
497
  s,
445
- r
498
+ n
446
499
  ), {
447
500
  currentShippingMethod: a,
448
- shippingMethods: d
501
+ shippingMethods: i
449
502
  };
450
- } catch (n) {
451
- return e.getShippingMethods.error(n), Promise.reject(n);
503
+ } catch (r) {
504
+ return e.getShippingMethods.error(r), Promise.reject(r);
452
505
  }
453
506
  },
454
507
  isLoading: N,
508
+ removeCoupon: J,
455
509
  setAgreementTemplate: async ({
456
510
  agreementId: t
457
511
  }) => {
458
- const o = await _.mutateAsync({
512
+ const o = await G.mutateAsync({
459
513
  orderId: c,
460
514
  agreementId: t
461
- }), n = await e.setAgreementTemplate.formatter(
515
+ }), r = await e.setAgreementTemplate.formatter(
462
516
  o,
463
- r
464
- ), { order: s, ...a } = n || {};
517
+ n
518
+ ), { order: s, ...a } = r || {};
465
519
  return {
466
520
  ...s,
467
521
  ...a
@@ -470,5 +524,5 @@ const lt = (F) => {
470
524
  };
471
525
  };
472
526
  export {
473
- lt as useCheckoutOrder
527
+ kt as useCheckoutOrder
474
528
  };
@@ -0,0 +1,3 @@
1
+ import { SvgIconProps } from '@afosto/components';
2
+ export declare const AngleRightSolid: (props: SvgIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=AngleRightSolid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AngleRightSolid.d.ts","sourceRoot":"","sources":["../../src/icons/AngleRightSolid.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEhE,eAAO,MAAM,eAAe,GAAI,OAAO,YAAY,qDAIlD,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { SvgIcon as t } from "@afosto/components";
3
+ const c = (r) => /* @__PURE__ */ o(t, { ...r, children: /* @__PURE__ */ o("path", { d: "M16.63 11.12c.5.49.5 1.28 0 1.77l-6.25 6.25a1.25 1.25 0 0 1-1.77-1.77L13.98 12 8.62 6.63a1.25 1.25 0 0 1 1.77-1.77l6.25 6.25Z" }) });
4
+ export {
5
+ c as AngleRightSolid
6
+ };
@@ -3,6 +3,7 @@ export * from './paymentMethods';
3
3
  export { AngleDownRegular } from './AngleDownRegular';
4
4
  export { AngleRightLight } from './AngleRightLight';
5
5
  export { AngleRightRegular } from './AngleRightRegular';
6
+ export { AngleRightSolid } from './AngleRightSolid';
6
7
  export { CheckSolid } from './CheckSolid';
7
8
  export { LongArrowLeftSolid } from './LongArrowLeftSolid';
8
9
  export { MinusSolid } from './MinusSolid';