@afosto/checkout-ui 0.0.13 → 0.0.15
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/dist/CheckoutAddressFields/CheckoutAddressFields.d.ts.map +1 -1
- package/dist/CheckoutAddressFields/CheckoutAddressFields.js +59 -57
- package/dist/CheckoutAgreementOptionCondition/CheckoutAgreementOptionCondition.d.ts +1 -1
- package/dist/CheckoutAgreementOptionCondition/CheckoutAgreementOptionCondition.d.ts.map +1 -1
- package/dist/CheckoutAgreementOptionCondition/CheckoutAgreementOptionCondition.js +32 -29
- package/dist/CheckoutAgreementsTimeline/CheckoutAgreementsTimeline.d.ts.map +1 -1
- package/dist/CheckoutAgreementsTimeline/CheckoutAgreementsTimeline.js +24 -24
- package/dist/CheckoutDownPaymentAgreementsSummary/CheckoutDownPaymentAgreementsSummary.d.ts.map +1 -1
- package/dist/CheckoutDownPaymentAgreementsSummary/CheckoutDownPaymentAgreementsSummary.js +38 -35
- package/dist/CheckoutPaymentStep/CheckoutPaymentStep.d.ts.map +1 -1
- package/dist/CheckoutPaymentStep/CheckoutPaymentStep.js +15 -15
- package/dist/CheckoutReviewPaymentSection/CheckoutReviewPaymentSection.d.ts.map +1 -1
- package/dist/CheckoutReviewPaymentSection/CheckoutReviewPaymentSection.js +19 -19
- package/dist/CheckoutShippingMethodSection/CheckoutShippingMethodSection.d.ts +1 -1
- package/dist/CheckoutShippingMethodSection/CheckoutShippingMethodSection.d.ts.map +1 -1
- package/dist/CheckoutShippingMethodsField/CheckoutShippingMethodsField.d.ts +1 -1
- package/dist/CheckoutShippingMethodsField/CheckoutShippingMethodsField.d.ts.map +1 -1
- package/dist/CheckoutShippingMethodsField/CheckoutShippingMethodsField.js +78 -77
- package/dist/CheckoutSummary/CheckoutSummary.d.ts.map +1 -1
- package/dist/CheckoutSummary/CheckoutSummary.js +23 -23
- package/dist/CheckoutSummary/components/CheckoutSummaryAgreements/CheckoutSummaryAgreements.d.ts.map +1 -1
- package/dist/CheckoutSummary/components/CheckoutSummaryAgreements/CheckoutSummaryAgreements.js +35 -28
- package/dist/constants/paymentMethodIconMapping.d.ts +9 -0
- package/dist/constants/paymentMethodIconMapping.d.ts.map +1 -1
- package/dist/constants/paymentMethodIconMapping.js +76 -58
- package/dist/fragments/CoreCartProjectionFields.d.ts +8 -1
- package/dist/fragments/CoreCartProjectionFields.d.ts.map +1 -1
- package/dist/fragments/CoreCartProjectionFields.js +8 -1
- package/dist/fragments/CoreOrderProjectionFields.d.ts +8 -1
- package/dist/fragments/CoreOrderProjectionFields.d.ts.map +1 -1
- package/dist/fragments/CoreOrderProjectionFields.js +8 -1
- package/dist/hooks/useCheckoutShippingMethods.d.ts +2 -1
- package/dist/hooks/useCheckoutShippingMethods.d.ts.map +1 -1
- package/dist/hooks/useCheckoutShippingMethods.js +110 -67
- package/dist/icons/index.js +178 -160
- package/dist/icons/paymentMethods/Alma.d.ts +3 -0
- package/dist/icons/paymentMethods/Alma.d.ts.map +1 -0
- package/dist/icons/paymentMethods/Alma.js +15 -0
- package/dist/icons/paymentMethods/Bancomat.d.ts +3 -0
- package/dist/icons/paymentMethods/Bancomat.d.ts.map +1 -0
- package/dist/icons/paymentMethods/Bancomat.js +15 -0
- package/dist/icons/paymentMethods/Bizum.d.ts +3 -0
- package/dist/icons/paymentMethods/Bizum.d.ts.map +1 -0
- package/dist/icons/paymentMethods/Bizum.js +28 -0
- package/dist/icons/paymentMethods/Blik.d.ts +3 -0
- package/dist/icons/paymentMethods/Blik.d.ts.map +1 -0
- package/dist/icons/paymentMethods/Blik.js +59 -0
- package/dist/icons/paymentMethods/ClickToPay.d.ts +3 -0
- package/dist/icons/paymentMethods/ClickToPay.d.ts.map +1 -0
- package/dist/icons/paymentMethods/ClickToPay.js +35 -0
- package/dist/icons/paymentMethods/MBWay.d.ts +3 -0
- package/dist/icons/paymentMethods/MBWay.d.ts.map +1 -0
- package/dist/icons/paymentMethods/MBWay.js +65 -0
- package/dist/icons/paymentMethods/MobilePay.d.ts +3 -0
- package/dist/icons/paymentMethods/MobilePay.d.ts.map +1 -0
- package/dist/icons/paymentMethods/MobilePay.js +103 -0
- package/dist/icons/paymentMethods/Satispay.d.ts +3 -0
- package/dist/icons/paymentMethods/Satispay.d.ts.map +1 -0
- package/dist/icons/paymentMethods/Satispay.js +15 -0
- package/dist/icons/paymentMethods/Vipps.d.ts +3 -0
- package/dist/icons/paymentMethods/Vipps.d.ts.map +1 -0
- package/dist/icons/paymentMethods/Vipps.js +15 -0
- package/dist/icons/paymentMethods/index.d.ts +9 -0
- package/dist/icons/paymentMethods/index.d.ts.map +1 -1
- package/dist/icons/paymentMethods/index.js +124 -106
- package/dist/index.js +356 -338
- package/dist/operations/cartOperations.d.ts.map +1 -1
- package/dist/operations/cartOperations.js +4 -6
- package/dist/operations/orderOperations.d.ts.map +1 -1
- package/dist/operations/orderOperations.js +4 -6
- package/dist/queries/getCartInitialPaymentStepQuery.d.ts +4 -0
- package/dist/queries/getCartInitialPaymentStepQuery.d.ts.map +1 -1
- package/dist/queries/getCartInitialPaymentStepQuery.js +10 -2
- package/dist/queries/getCartShippingMethodsQuery.d.ts +0 -1
- package/dist/queries/getCartShippingMethodsQuery.d.ts.map +1 -1
- package/dist/queries/getCartShippingMethodsQuery.js +6 -29
- package/dist/queries/getOrderInitialPaymentStepQuery.d.ts +4 -0
- package/dist/queries/getOrderInitialPaymentStepQuery.d.ts.map +1 -1
- package/dist/queries/getOrderInitialPaymentStepQuery.js +11 -3
- package/dist/queries/getOrderShippingMethodsQuery.d.ts +0 -1
- package/dist/queries/getOrderShippingMethodsQuery.d.ts.map +1 -1
- package/dist/queries/getOrderShippingMethodsQuery.js +4 -27
- package/dist/types.d.ts +13 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/formatCurrency.d.ts +2 -0
- package/dist/utils/formatCurrency.d.ts.map +1 -0
- package/dist/utils/formatCurrency.js +14 -0
- package/package.json +2 -2
package/dist/CheckoutSummary/components/CheckoutSummaryAgreements/CheckoutSummaryAgreements.js
CHANGED
|
@@ -1,38 +1,45 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { CheckoutSummaryGroup as
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { CheckoutSummaryGroup as C } from "../CheckoutSummaryGroup/CheckoutSummaryGroup.js";
|
|
3
3
|
import { CheckoutSummaryRow as T } from "../CheckoutSummaryRow/CheckoutSummaryRow.js";
|
|
4
|
-
import { useCheckout as
|
|
5
|
-
|
|
4
|
+
import { useCheckout as v } from "../../../CheckoutStateProvider/CheckoutStateProvider.js";
|
|
5
|
+
import { formatCurrency as A } from "../../../utils/formatCurrency.js";
|
|
6
|
+
const P = {
|
|
6
7
|
payImmediately: "Pay immediately"
|
|
7
|
-
},
|
|
8
|
+
}, b = (m) => {
|
|
8
9
|
const {
|
|
9
|
-
agreementTemplate:
|
|
10
|
-
agreements:
|
|
11
|
-
currency:
|
|
12
|
-
disablePadding:
|
|
13
|
-
divider:
|
|
14
|
-
hideDefaultAgreementOption:
|
|
15
|
-
locale:
|
|
16
|
-
translations:
|
|
10
|
+
agreementTemplate: n,
|
|
11
|
+
agreements: s,
|
|
12
|
+
currency: t,
|
|
13
|
+
disablePadding: u = !0,
|
|
14
|
+
divider: c = !1,
|
|
15
|
+
hideDefaultAgreementOption: i = !0,
|
|
16
|
+
locale: r,
|
|
17
|
+
translations: l = {},
|
|
17
18
|
...p
|
|
18
|
-
} =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
} = m, {
|
|
20
|
+
settings: d,
|
|
21
|
+
summary: o,
|
|
22
|
+
translations: y
|
|
23
|
+
} = v(), { currency: f } = d || {}, h = {
|
|
24
|
+
...P,
|
|
25
|
+
...y?.summary || {},
|
|
26
|
+
...l || {}
|
|
27
|
+
}, g = n ?? o?.agreementTemplate, k = s || o?.agreements || [];
|
|
28
|
+
return i && g?.type?.toLowerCase() === "default" ? null : /* @__PURE__ */ a(
|
|
29
|
+
C,
|
|
25
30
|
{
|
|
26
31
|
...p,
|
|
27
|
-
disablePadding:
|
|
28
|
-
divider:
|
|
29
|
-
children:
|
|
32
|
+
disablePadding: u,
|
|
33
|
+
divider: c,
|
|
34
|
+
children: k.map((e) => /* @__PURE__ */ a(
|
|
30
35
|
T,
|
|
31
36
|
{
|
|
32
|
-
currency:
|
|
33
|
-
locale:
|
|
34
|
-
description: `${
|
|
35
|
-
|
|
37
|
+
currency: t,
|
|
38
|
+
locale: r,
|
|
39
|
+
description: `${h.payImmediately} (${e.isPercentage ? `${e.amount}%` : A(e.amount / 100, r, {
|
|
40
|
+
currency: t || f
|
|
41
|
+
})})`,
|
|
42
|
+
value: e.outcome?.amount || 0
|
|
36
43
|
},
|
|
37
44
|
e.type
|
|
38
45
|
))
|
|
@@ -40,5 +47,5 @@ const v = {
|
|
|
40
47
|
);
|
|
41
48
|
};
|
|
42
49
|
export {
|
|
43
|
-
|
|
50
|
+
b as CheckoutSummaryAgreements
|
|
44
51
|
};
|
|
@@ -47,5 +47,14 @@ export declare const CHECKOUT_PAYMENT_METHOD_ICON_MAPPING: {
|
|
|
47
47
|
twint: (props: import('@afosto/components').SvgIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
48
48
|
walley: (props: import('@afosto/components').SvgIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
49
49
|
zip: (props: import('@afosto/components').SvgIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
50
|
+
alma: (props: import('@afosto/components').SvgIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
51
|
+
bancomatPay: (props: import('@afosto/components').SvgIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
52
|
+
bizum: (props: import('@afosto/components').SvgIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
53
|
+
blik: (props: import('@afosto/components').SvgIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
54
|
+
clickToPay: (props: import('@afosto/components').SvgIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
55
|
+
mbWay: (props: import('@afosto/components').SvgIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
56
|
+
mobilepay: (props: import('@afosto/components').SvgIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
57
|
+
satispay: (props: import('@afosto/components').SvgIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
58
|
+
vipps: (props: import('@afosto/components').SvgIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
50
59
|
};
|
|
51
60
|
//# sourceMappingURL=paymentMethodIconMapping.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paymentMethodIconMapping.d.ts","sourceRoot":"","sources":["../../src/constants/paymentMethodIconMapping.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"paymentMethodIconMapping.d.ts","sourceRoot":"","sources":["../../src/constants/paymentMethodIconMapping.ts"],"names":[],"mappings":"AAsDA,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DhD,CAAC"}
|
|
@@ -7,91 +7,109 @@ import { CashOnDelivery as f } from "../icons/paymentMethods/CashOnDelivery.js";
|
|
|
7
7
|
import { Spraypay as e } from "../icons/paymentMethods/Spraypay.js";
|
|
8
8
|
import { Klarna as r } from "../icons/paymentMethods/Klarna.js";
|
|
9
9
|
import { PayPal as o } from "../icons/paymentMethods/PayPal.js";
|
|
10
|
-
import { Bancontact as
|
|
11
|
-
import { Paysafe as
|
|
12
|
-
import { Giropay as
|
|
13
|
-
import { Postepay as
|
|
10
|
+
import { Bancontact as l } from "../icons/paymentMethods/Bancontact.js";
|
|
11
|
+
import { Paysafe as n } from "../icons/paymentMethods/Paysafe.js";
|
|
12
|
+
import { Giropay as y } from "../icons/paymentMethods/Giropay.js";
|
|
13
|
+
import { Postepay as c } from "../icons/paymentMethods/Postepay.js";
|
|
14
14
|
import { CarteBleue as s } from "../icons/paymentMethods/CarteBleue.js";
|
|
15
15
|
import { Afterpay as u } from "../icons/paymentMethods/Afterpay.js";
|
|
16
16
|
import { WebshopGiftcard as d } from "../icons/paymentMethods/WebshopGiftcard.js";
|
|
17
|
-
import { Fashioncheque as
|
|
18
|
-
import { PodiumCadeaukaart as
|
|
19
|
-
import { YourGift as
|
|
20
|
-
import { Giftcard as
|
|
21
|
-
import { GivaCard as
|
|
22
|
-
import { VVVCadeaukaart as
|
|
17
|
+
import { Fashioncheque as P } from "../icons/paymentMethods/Fashioncheque.js";
|
|
18
|
+
import { PodiumCadeaukaart as b } from "../icons/paymentMethods/PodiumCadeaukaart.js";
|
|
19
|
+
import { YourGift as C } from "../icons/paymentMethods/YourGift.js";
|
|
20
|
+
import { Giftcard as k } from "../icons/paymentMethods/Giftcard.js";
|
|
21
|
+
import { GivaCard as B } from "../icons/paymentMethods/GivaCard.js";
|
|
22
|
+
import { VVVCadeaukaart as h } from "../icons/paymentMethods/VVVCadeaukaart.js";
|
|
23
23
|
import { WeChat as g } from "../icons/paymentMethods/WeChat.js";
|
|
24
|
-
import { Alipay as
|
|
25
|
-
import { Payconiq as
|
|
24
|
+
import { Alipay as v } from "../icons/paymentMethods/Alipay.js";
|
|
25
|
+
import { Payconiq as w } from "../icons/paymentMethods/Payconiq.js";
|
|
26
26
|
import { Multibanco as G } from "../icons/paymentMethods/Multibanco.js";
|
|
27
|
-
import { EPSUberweisung as
|
|
28
|
-
import { Przelewy24 as
|
|
27
|
+
import { EPSUberweisung as T } from "../icons/paymentMethods/EPSUberweisung.js";
|
|
28
|
+
import { Przelewy24 as A } from "../icons/paymentMethods/Przelewy24.js";
|
|
29
29
|
import { Billink as M } from "../icons/paymentMethods/Billink.js";
|
|
30
30
|
import { In3 as O } from "../icons/paymentMethods/In3.js";
|
|
31
|
-
import { Interac as
|
|
32
|
-
import { Cash as
|
|
33
|
-
import { ManualGiftCard as
|
|
34
|
-
import { ManualCard as
|
|
35
|
-
import { Pin as
|
|
36
|
-
import { ApplePay as
|
|
37
|
-
import { GooglePay as
|
|
38
|
-
import { Bank as
|
|
39
|
-
import { Riverty as
|
|
40
|
-
import { Twint as
|
|
41
|
-
import { Walley as
|
|
42
|
-
import { Zip as
|
|
43
|
-
import { Belfius as
|
|
44
|
-
import { Kbc as
|
|
45
|
-
|
|
31
|
+
import { Interac as W } from "../icons/paymentMethods/Interac.js";
|
|
32
|
+
import { Cash as z } from "../icons/paymentMethods/Cash.js";
|
|
33
|
+
import { ManualGiftCard as E } from "../icons/paymentMethods/ManualGiftCard.js";
|
|
34
|
+
import { ManualCard as I } from "../icons/paymentMethods/ManualCard.js";
|
|
35
|
+
import { Pin as q } from "../icons/paymentMethods/Pin.js";
|
|
36
|
+
import { ApplePay as D } from "../icons/paymentMethods/ApplePay.js";
|
|
37
|
+
import { GooglePay as N } from "../icons/paymentMethods/GooglePay.js";
|
|
38
|
+
import { Bank as V } from "../icons/paymentMethods/Bank.js";
|
|
39
|
+
import { Riverty as _ } from "../icons/paymentMethods/Riverty.js";
|
|
40
|
+
import { Twint as K } from "../icons/paymentMethods/Twint.js";
|
|
41
|
+
import { Walley as S } from "../icons/paymentMethods/Walley.js";
|
|
42
|
+
import { Zip as U } from "../icons/paymentMethods/Zip.js";
|
|
43
|
+
import { Belfius as x } from "../icons/paymentMethods/Belfius.js";
|
|
44
|
+
import { Kbc as H } from "../icons/paymentMethods/Kbc.js";
|
|
45
|
+
import { Alma as Y } from "../icons/paymentMethods/Alma.js";
|
|
46
|
+
import { Bancomat as F } from "../icons/paymentMethods/Bancomat.js";
|
|
47
|
+
import { Bizum as R } from "../icons/paymentMethods/Bizum.js";
|
|
48
|
+
import { Blik as Z } from "../icons/paymentMethods/Blik.js";
|
|
49
|
+
import { ClickToPay as j } from "../icons/paymentMethods/ClickToPay.js";
|
|
50
|
+
import { MBWay as J } from "../icons/paymentMethods/MBWay.js";
|
|
51
|
+
import { MobilePay as L } from "../icons/paymentMethods/MobilePay.js";
|
|
52
|
+
import { Satispay as Q } from "../icons/paymentMethods/Satispay.js";
|
|
53
|
+
import { Vipps as X } from "../icons/paymentMethods/Vipps.js";
|
|
54
|
+
const Xr = {
|
|
46
55
|
ideal: m,
|
|
47
56
|
card: i,
|
|
48
57
|
bacsDirectDebit: a,
|
|
49
58
|
bankTransfer: t,
|
|
50
|
-
belfius:
|
|
51
|
-
kbc:
|
|
59
|
+
belfius: x,
|
|
60
|
+
kbc: H,
|
|
52
61
|
onAccount: p,
|
|
53
62
|
cod: f,
|
|
54
63
|
spraypay: e,
|
|
55
64
|
sofort: r,
|
|
56
65
|
paypalExpress: o,
|
|
57
66
|
paypal: o,
|
|
58
|
-
mistercashBancontact:
|
|
59
|
-
paysafecard:
|
|
60
|
-
giftCard:
|
|
61
|
-
giropay:
|
|
62
|
-
postepay:
|
|
67
|
+
mistercashBancontact: l,
|
|
68
|
+
paysafecard: n,
|
|
69
|
+
giftCard: k,
|
|
70
|
+
giropay: y,
|
|
71
|
+
postepay: c,
|
|
63
72
|
carteBleue: s,
|
|
64
73
|
afterpay: u,
|
|
65
74
|
webshopgiftcard: d,
|
|
66
|
-
fashioncheque:
|
|
67
|
-
podiumcadeaukaart:
|
|
68
|
-
yourgift:
|
|
69
|
-
givacard:
|
|
70
|
-
vvvCadeaukaart:
|
|
75
|
+
fashioncheque: P,
|
|
76
|
+
podiumcadeaukaart: b,
|
|
77
|
+
yourgift: C,
|
|
78
|
+
givacard: B,
|
|
79
|
+
vvvCadeaukaart: h,
|
|
71
80
|
wechatPay: g,
|
|
72
|
-
alipay:
|
|
73
|
-
payconiq:
|
|
81
|
+
alipay: v,
|
|
82
|
+
payconiq: w,
|
|
74
83
|
multibanco: G,
|
|
75
|
-
epsUberweisung:
|
|
76
|
-
przelewy24:
|
|
84
|
+
epsUberweisung: T,
|
|
85
|
+
przelewy24: A,
|
|
77
86
|
billink: M,
|
|
78
87
|
klarna: r,
|
|
79
88
|
klarnaNow: r,
|
|
80
89
|
klarnaOverTime: r,
|
|
81
90
|
in3: O,
|
|
82
|
-
interac:
|
|
83
|
-
cash:
|
|
84
|
-
manualGiftCard:
|
|
85
|
-
manualCard:
|
|
86
|
-
pin:
|
|
87
|
-
applePay:
|
|
88
|
-
googleWallet:
|
|
89
|
-
payByBank:
|
|
90
|
-
riverty:
|
|
91
|
-
twint:
|
|
92
|
-
walley:
|
|
93
|
-
zip:
|
|
91
|
+
interac: W,
|
|
92
|
+
cash: z,
|
|
93
|
+
manualGiftCard: E,
|
|
94
|
+
manualCard: I,
|
|
95
|
+
pin: q,
|
|
96
|
+
applePay: D,
|
|
97
|
+
googleWallet: N,
|
|
98
|
+
payByBank: V,
|
|
99
|
+
riverty: _,
|
|
100
|
+
twint: K,
|
|
101
|
+
walley: S,
|
|
102
|
+
zip: U,
|
|
103
|
+
alma: Y,
|
|
104
|
+
bancomatPay: F,
|
|
105
|
+
bizum: R,
|
|
106
|
+
blik: Z,
|
|
107
|
+
clickToPay: j,
|
|
108
|
+
mbWay: J,
|
|
109
|
+
mobilepay: L,
|
|
110
|
+
satispay: Q,
|
|
111
|
+
vipps: X
|
|
94
112
|
};
|
|
95
113
|
export {
|
|
96
|
-
|
|
114
|
+
Xr as CHECKOUT_PAYMENT_METHOD_ICON_MAPPING
|
|
97
115
|
};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { CheckoutAgreementType } from '../types';
|
|
2
2
|
export interface CoreCartProjectionAgreement {
|
|
3
3
|
type: CheckoutAgreementType;
|
|
4
|
-
|
|
4
|
+
isPercentage: boolean;
|
|
5
5
|
amount: number;
|
|
6
6
|
dueAt: number;
|
|
7
7
|
dueAfter: number;
|
|
8
|
+
outcome: {
|
|
9
|
+
amount: number;
|
|
10
|
+
};
|
|
8
11
|
}
|
|
9
12
|
export interface CoreCartProjectionAdjustment {
|
|
10
13
|
id: string;
|
|
@@ -22,8 +25,12 @@ export interface CoreCartProjectionVat {
|
|
|
22
25
|
}
|
|
23
26
|
export interface CoreCartProjectionCheckoutAgreementCondition {
|
|
24
27
|
type: CheckoutAgreementType;
|
|
28
|
+
isPercentage: boolean;
|
|
25
29
|
amount: number;
|
|
26
30
|
pastDueAfter: number;
|
|
31
|
+
outcome: {
|
|
32
|
+
amount: number;
|
|
33
|
+
};
|
|
27
34
|
}
|
|
28
35
|
export interface CoreCartProjectionCheckoutAgreement {
|
|
29
36
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoreCartProjectionFields.d.ts","sourceRoot":"","sources":["../../src/fragments/CoreCartProjectionFields.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,qBAAqB,CAAC;IAC5B,
|
|
1
|
+
{"version":3,"file":"CoreCartProjectionFields.d.ts","sourceRoot":"","sources":["../../src/fragments/CoreCartProjectionFields.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,qBAAqB,CAAC;IAC5B,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED,MAAM,WAAW,4BAA4B;IAC3C,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,M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
|
+
amount
|
|
14
|
+
}
|
|
12
15
|
}
|
|
13
16
|
}
|
|
14
17
|
adjustments {
|
|
@@ -31,7 +34,11 @@ const a = t`
|
|
|
31
34
|
conditions {
|
|
32
35
|
type
|
|
33
36
|
amount
|
|
37
|
+
is_percentage
|
|
34
38
|
past_due_after
|
|
39
|
+
outcome {
|
|
40
|
+
amount
|
|
41
|
+
}
|
|
35
42
|
}
|
|
36
43
|
}
|
|
37
44
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { CheckoutAgreementType } from '../types';
|
|
2
2
|
export interface CoreOrderProjectionAgreement {
|
|
3
3
|
type: CheckoutAgreementType;
|
|
4
|
-
|
|
4
|
+
isPercentage: boolean;
|
|
5
5
|
amount: number;
|
|
6
6
|
dueAt: number;
|
|
7
7
|
dueAfter: number;
|
|
8
|
+
outcome: {
|
|
9
|
+
amount: number;
|
|
10
|
+
};
|
|
8
11
|
}
|
|
9
12
|
export interface CoreOrderProjectionAdjustment {
|
|
10
13
|
id: string;
|
|
@@ -23,7 +26,11 @@ export interface CoreOrderProjectionVat {
|
|
|
23
26
|
export interface CoreOrderProjectionCheckoutAgreementCondition {
|
|
24
27
|
type: CheckoutAgreementType;
|
|
25
28
|
amount: number;
|
|
29
|
+
isPercentage: boolean;
|
|
26
30
|
pastDueAfter: number;
|
|
31
|
+
outcome: {
|
|
32
|
+
amount: number;
|
|
33
|
+
};
|
|
27
34
|
}
|
|
28
35
|
export interface CoreOrderProjectionCheckoutAgreement {
|
|
29
36
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoreOrderProjectionFields.d.ts","sourceRoot":"","sources":["../../src/fragments/CoreOrderProjectionFields.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,qBAAqB,CAAC;IAC5B,
|
|
1
|
+
{"version":3,"file":"CoreOrderPro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C5C,CAAC;IACF,WAAW,EAAE,6BAA6B,EAAE,CAAC;IAC7C,QAAQ,EAAE,2BAA2B,CAAC;IACtC,OAAO,EAAE,yBAAyB,EAAE,CAAC;IACrC,KAAK,EAAE,uBAAuB,EAAE,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,OAAO,CAAC;IACxB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,MAAM,CAAC;IAC1B,IAAI,EAAE,uBAAuB,CAAC;IAC9B,GAAG,EAAE,sBAAsB,EAAE,CAAC;CAC/B;AAED,eAAO,MAAM,yBAAyB,QAmHrC,CAAC"}
|
|
@@ -6,10 +6,13 @@ const a = t`
|
|
|
6
6
|
amount_covered
|
|
7
7
|
agreements {
|
|
8
8
|
type
|
|
9
|
-
|
|
9
|
+
is_percentage
|
|
10
10
|
amount
|
|
11
11
|
due_at
|
|
12
12
|
due_after
|
|
13
|
+
outcome {
|
|
14
|
+
amount
|
|
15
|
+
}
|
|
13
16
|
}
|
|
14
17
|
}
|
|
15
18
|
adjustments {
|
|
@@ -32,7 +35,11 @@ const a = t`
|
|
|
32
35
|
conditions {
|
|
33
36
|
type
|
|
34
37
|
amount
|
|
38
|
+
is_percentage
|
|
35
39
|
past_due_after
|
|
40
|
+
outcome {
|
|
41
|
+
amount
|
|
42
|
+
}
|
|
36
43
|
}
|
|
37
44
|
}
|
|
38
45
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { CheckoutShippingMethodOptionType, CheckoutShippingMethodPickupPoint } from '../types';
|
|
2
2
|
export declare const useCheckoutShippingMethods: ({ countryCode, postalCode }: {
|
|
3
3
|
countryCode: string;
|
|
4
|
-
postalCode
|
|
4
|
+
postalCode?: string;
|
|
5
5
|
}) => {
|
|
6
6
|
hasSearchPickupPointsError: boolean;
|
|
7
7
|
isInitializingShippingMethods: boolean;
|
|
8
8
|
isSearchingPickupPoints: boolean;
|
|
9
|
+
loadPickupPointsForShippingMethod: (shippingMethod?: CheckoutShippingMethodOptionType) => void;
|
|
9
10
|
pickupPoints: CheckoutShippingMethodPickupPoint[];
|
|
10
11
|
searchPickupPoints: (...args: unknown[]) => Promise<void>;
|
|
11
12
|
setPickupPoints: import('react').Dispatch<import('react').SetStateAction<CheckoutShippingMethodPickupPoint[]>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCheckoutShippingMethods.d.ts","sourceRoot":"","sources":["../../src/hooks/useCheckoutShippingMethods.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useCheckoutShippingMethods.d.ts","sourceRoot":"","sources":["../../src/hooks/useCheckoutShippingMethods.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,gCAAgC,EAChC,iCAAiC,EAClC,MAAM,UAAU,CAAC;AAGlB,eAAO,MAAM,0BAA0B,GAAI,6BAGxC;IACD,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;;;;yDA0FqB,gCAAgC;;;;;CAkIrD,CAAC"}
|
|
@@ -1,95 +1,138 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
import { useCheckout as
|
|
3
|
-
import { useGetLatest as
|
|
4
|
-
import { isDefined as
|
|
5
|
-
import { useFormContext as
|
|
6
|
-
const
|
|
7
|
-
countryCode:
|
|
8
|
-
postalCode:
|
|
1
|
+
import { useState as p, useRef as O, useCallback as z, useEffect as Q } from "react";
|
|
2
|
+
import { useCheckout as T } from "../CheckoutStateProvider/CheckoutStateProvider.js";
|
|
3
|
+
import { useGetLatest as B, useAsyncDebounce as W } from "@afosto/hooks";
|
|
4
|
+
import { isDefined as x } from "@afosto/utils";
|
|
5
|
+
import { useFormContext as X } from "@afosto/components";
|
|
6
|
+
const et = ({
|
|
7
|
+
countryCode: o,
|
|
8
|
+
postalCode: u
|
|
9
9
|
}) => {
|
|
10
|
-
const [
|
|
10
|
+
const [C, f] = p(!1), [L, k] = p(!0), [R, a] = p(!1), [V, n] = p([]), [q, D] = p([]), S = O(0), {
|
|
11
11
|
activeStep: y,
|
|
12
12
|
addShippingMethod: A,
|
|
13
|
-
getPickupPoints:
|
|
14
|
-
getShippingMethods:
|
|
15
|
-
setSubmitButtonDisabled:
|
|
16
|
-
} =
|
|
13
|
+
getPickupPoints: E,
|
|
14
|
+
getShippingMethods: G,
|
|
15
|
+
setSubmitButtonDisabled: F
|
|
16
|
+
} = T(), h = B({
|
|
17
17
|
activeStep: y,
|
|
18
18
|
addShippingMethod: A,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
getPickupPoints: E,
|
|
20
|
+
getShippingMethods: G,
|
|
21
|
+
setSubmitButtonDisabled: F
|
|
22
|
+
}), H = X(), r = B(H), M = z(
|
|
23
|
+
async ({
|
|
24
|
+
searchValue: e,
|
|
25
|
+
clearUnavailablePickupPoint: i = !1
|
|
26
|
+
} = {}) => {
|
|
27
|
+
const b = ++S.current, d = () => b === S.current;
|
|
28
|
+
try {
|
|
29
|
+
f(!1), a(!0);
|
|
30
|
+
const { getPickupPoints: P } = h(), g = await P({
|
|
31
|
+
countryCode: o,
|
|
32
|
+
postalCode: x(e) ? e : u ?? ""
|
|
33
|
+
}), { pickupPoints: l } = g || {};
|
|
34
|
+
if (!d())
|
|
35
|
+
return;
|
|
36
|
+
if (i) {
|
|
37
|
+
const { getValues: s, setValue: c } = r() || {}, { pickupPointId: t } = s() || {};
|
|
38
|
+
x(t) && !(l ?? []).some(
|
|
39
|
+
(I) => I.id === t
|
|
40
|
+
) && c("pickupPointId", "");
|
|
41
|
+
}
|
|
42
|
+
n(l ?? []), a(!1);
|
|
43
|
+
} catch {
|
|
44
|
+
if (!d())
|
|
45
|
+
return;
|
|
46
|
+
f(!0), n([]), a(!1);
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
[o, h, r, u]
|
|
50
|
+
), m = z(
|
|
51
|
+
(e) => {
|
|
52
|
+
if (n([]), e?.isPickupPoint) {
|
|
53
|
+
M();
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
S.current++, f(!1), a(!1);
|
|
57
|
+
},
|
|
58
|
+
[M]
|
|
59
|
+
);
|
|
60
|
+
Q(() => {
|
|
61
|
+
o && (async () => {
|
|
24
62
|
const {
|
|
25
|
-
activeStep:
|
|
26
|
-
addShippingMethod:
|
|
27
|
-
getShippingMethods:
|
|
28
|
-
setSubmitButtonDisabled:
|
|
29
|
-
} =
|
|
63
|
+
activeStep: i,
|
|
64
|
+
addShippingMethod: b,
|
|
65
|
+
getShippingMethods: d,
|
|
66
|
+
setSubmitButtonDisabled: P
|
|
67
|
+
} = h();
|
|
30
68
|
try {
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
69
|
+
const g = await d({
|
|
70
|
+
countryCode: o,
|
|
71
|
+
postalCode: u ?? ""
|
|
72
|
+
}), {
|
|
73
|
+
currentShippingMethod: l,
|
|
74
|
+
shippingMethods: s
|
|
75
|
+
} = g || {};
|
|
76
|
+
if (D(s), !s.length) {
|
|
77
|
+
P(!0), k(!1);
|
|
37
78
|
return;
|
|
38
79
|
}
|
|
39
|
-
let
|
|
40
|
-
(
|
|
80
|
+
let c = s.find(
|
|
81
|
+
(t) => t.id === l?.id
|
|
41
82
|
);
|
|
42
|
-
if (!
|
|
43
|
-
const [
|
|
83
|
+
if (!x(c)) {
|
|
84
|
+
const [t] = s;
|
|
44
85
|
try {
|
|
45
|
-
const
|
|
46
|
-
await
|
|
47
|
-
const
|
|
48
|
-
methodId:
|
|
49
|
-
isPickupPoint:
|
|
86
|
+
const I = r(), { formProps: j, getValues: J, reset: K } = I || {}, { setData: N } = j || {};
|
|
87
|
+
await b({ methodId: t.id }), c = t;
|
|
88
|
+
const w = {
|
|
89
|
+
methodId: t.id,
|
|
90
|
+
isPickupPoint: t.isPickupPoint,
|
|
50
91
|
pickupPointId: ""
|
|
51
92
|
};
|
|
52
|
-
|
|
53
|
-
...
|
|
54
|
-
...
|
|
55
|
-
}),
|
|
56
|
-
...
|
|
57
|
-
...
|
|
58
|
-
}),
|
|
93
|
+
K({
|
|
94
|
+
...J(),
|
|
95
|
+
...w
|
|
96
|
+
}), N((v) => (v.splice(i, 1, {
|
|
97
|
+
...v[i],
|
|
98
|
+
...w
|
|
99
|
+
}), v));
|
|
59
100
|
} catch {
|
|
60
101
|
}
|
|
61
102
|
}
|
|
62
|
-
|
|
103
|
+
m(c), k(!1);
|
|
63
104
|
} catch {
|
|
64
|
-
|
|
105
|
+
P(!0), n([]), D([]), k(!1);
|
|
65
106
|
}
|
|
66
107
|
})();
|
|
67
|
-
}, [
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
108
|
+
}, [
|
|
109
|
+
o,
|
|
110
|
+
h,
|
|
111
|
+
r,
|
|
112
|
+
m,
|
|
113
|
+
u
|
|
114
|
+
]);
|
|
115
|
+
const U = W(
|
|
116
|
+
async (e) => {
|
|
117
|
+
const { value: i } = e?.target || {};
|
|
118
|
+
await M({
|
|
119
|
+
searchValue: i,
|
|
120
|
+
clearUnavailablePickupPoint: !0
|
|
121
|
+
});
|
|
80
122
|
},
|
|
81
123
|
250
|
|
82
124
|
);
|
|
83
125
|
return {
|
|
84
|
-
hasSearchPickupPointsError:
|
|
85
|
-
isInitializingShippingMethods:
|
|
86
|
-
isSearchingPickupPoints:
|
|
126
|
+
hasSearchPickupPointsError: C,
|
|
127
|
+
isInitializingShippingMethods: L,
|
|
128
|
+
isSearchingPickupPoints: R,
|
|
129
|
+
loadPickupPointsForShippingMethod: m,
|
|
87
130
|
pickupPoints: V,
|
|
88
|
-
searchPickupPoints:
|
|
89
|
-
setPickupPoints:
|
|
90
|
-
shippingMethods:
|
|
131
|
+
searchPickupPoints: U,
|
|
132
|
+
setPickupPoints: n,
|
|
133
|
+
shippingMethods: q
|
|
91
134
|
};
|
|
92
135
|
};
|
|
93
136
|
export {
|
|
94
|
-
|
|
137
|
+
et as useCheckoutShippingMethods
|
|
95
138
|
};
|