@afosto/checkout-ui 0.0.10 → 0.0.12
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/CheckoutForm/CheckoutForm.d.ts.map +1 -1
- package/dist/CheckoutForm/CheckoutForm.js +146 -132
- package/dist/CheckoutInformationStep/CheckoutInformationStep.d.ts +2 -0
- package/dist/CheckoutInformationStep/CheckoutInformationStep.d.ts.map +1 -1
- package/dist/CheckoutInformationStep/CheckoutInformationStep.js +37 -30
- package/dist/CheckoutProvider/CheckoutProvider.d.ts.map +1 -1
- package/dist/CheckoutProvider/CheckoutProvider.js +22 -20
- package/dist/CheckoutSalutationSection/CheckoutSalutationSection.d.ts +13 -0
- package/dist/CheckoutSalutationSection/CheckoutSalutationSection.d.ts.map +1 -0
- package/dist/CheckoutSalutationSection/CheckoutSalutationSection.js +26 -0
- package/dist/CheckoutSalutationSection/index.d.ts +3 -0
- package/dist/CheckoutSalutationSection/index.d.ts.map +1 -0
- package/dist/CheckoutSalutationSection/index.js +4 -0
- package/dist/constants/analyticsEvents.d.ts +7 -0
- package/dist/constants/analyticsEvents.d.ts.map +1 -1
- package/dist/index.d.ts +8 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +422 -420
- package/dist/steps/informationStep.d.ts +1 -0
- package/dist/steps/informationStep.d.ts.map +1 -1
- package/dist/steps/informationStep.js +238 -234
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckoutForm.d.ts","sourceRoot":"","sources":["../../src/CheckoutForm/CheckoutForm.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,OAAO,EACZ,KAAK,KAAK,EACX,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,aAAa,EACb,WAAW,EA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C,KAAK,CAAC,CAAC;IACpB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,OAAO,EAAE,eAAe,KAAK,MAAM,CAAC,CAAC;IAC9D,YAAY,CAAC,EAAE,WAAW,CAAC,OAAO,mBAAmB,CAAC,CAAC;IACvD,gBAAgB,CAAC,EAAE,YAAY,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC;CACrD;AAED,eAAO,MAAM,YAAY,GAAI,OAAO,iBAAiB,qDAyTpD,CAAC"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Box as
|
|
3
|
-
import { useCheckout as
|
|
4
|
-
import { useEffect as
|
|
5
|
-
import { createPortal as
|
|
6
|
-
import { isDefined as
|
|
7
|
-
import { CheckoutFormSkeleton as
|
|
8
|
-
import { CheckoutSubmitButton as
|
|
9
|
-
import { CheckoutTermsAndPrivacyMessage as
|
|
10
|
-
import { getErrorMessage as
|
|
11
|
-
import { getValidationErrorMessage as
|
|
12
|
-
import { validationTranslations as
|
|
13
|
-
import { CheckoutErrorMessageAlert as
|
|
14
|
-
import { useGetLatest as
|
|
15
|
-
const
|
|
1
|
+
import { jsxs as p, jsx as u, Fragment as B } from "react/jsx-runtime";
|
|
2
|
+
import { Box as fe, MultiStepForm as he } from "@afosto/components";
|
|
3
|
+
import { useCheckout as ke } from "../CheckoutStateProvider/CheckoutStateProvider.js";
|
|
4
|
+
import { useEffect as ve } from "react";
|
|
5
|
+
import { createPortal as Le } from "react-dom";
|
|
6
|
+
import { isDefined as ge, camelize as xe, wait as ye } from "@afosto/utils";
|
|
7
|
+
import { CheckoutFormSkeleton as Pe } from "../CheckoutFormSkeleton/CheckoutFormSkeleton.js";
|
|
8
|
+
import { CheckoutSubmitButton as Ce } from "../CheckoutSubmitButton/CheckoutSubmitButton.js";
|
|
9
|
+
import { CheckoutTermsAndPrivacyMessage as E } from "../CheckoutTermsAndPrivacyMessage/CheckoutTermsAndPrivacyMessage.js";
|
|
10
|
+
import { getErrorMessage as we } from "../utils/getErrorMessage.js";
|
|
11
|
+
import { getValidationErrorMessage as Fe } from "../utils/getValidationErrorMessage.js";
|
|
12
|
+
import { validationTranslations as Me } from "../constants/validationTranslations.js";
|
|
13
|
+
import { CheckoutErrorMessageAlert as Te } from "../CheckoutErrorMessageAlert/CheckoutErrorMessageAlert.js";
|
|
14
|
+
import { useGetLatest as Be } from "@afosto/hooks";
|
|
15
|
+
const v = {
|
|
16
16
|
cancelLabel: "Back to webshop",
|
|
17
17
|
downPaymentSubmitLabel: "Pay deposit & order",
|
|
18
18
|
nextStepLabel: "To {stepLabel}",
|
|
@@ -24,74 +24,74 @@ const h = {
|
|
|
24
24
|
checkoutFailedTitle: "Could not proceed to payment",
|
|
25
25
|
checkoutFailedDescription: "Something went wrong while proceeding to the payment. Please try again."
|
|
26
26
|
},
|
|
27
|
-
validation:
|
|
28
|
-
},
|
|
27
|
+
validation: Me
|
|
28
|
+
}, Qe = (I) => {
|
|
29
29
|
const {
|
|
30
|
-
activeStep:
|
|
31
|
-
autoComplete:
|
|
32
|
-
defaultValues:
|
|
33
|
-
errorMessage:
|
|
34
|
-
formRef:
|
|
35
|
-
hideErrorMessage:
|
|
36
|
-
hideForm:
|
|
37
|
-
isLoading:
|
|
38
|
-
onNextStep:
|
|
39
|
-
onPreviousStep:
|
|
40
|
-
onCancel:
|
|
41
|
-
onSubmit:
|
|
42
|
-
steps:
|
|
43
|
-
submitLabel:
|
|
44
|
-
validationSchema:
|
|
45
|
-
translations:
|
|
46
|
-
sx:
|
|
47
|
-
...
|
|
48
|
-
} =
|
|
49
|
-
activeStep:
|
|
50
|
-
defaultValues:
|
|
51
|
-
checkout:
|
|
52
|
-
errorMessage:
|
|
53
|
-
formRef:
|
|
54
|
-
getNextStepLabel:
|
|
55
|
-
getPreviousStepLabel:
|
|
56
|
-
isLoading:
|
|
57
|
-
isProcessing:
|
|
58
|
-
nextStep:
|
|
59
|
-
previousStep:
|
|
60
|
-
setErrorMessage:
|
|
61
|
-
settings:
|
|
62
|
-
steps:
|
|
63
|
-
subStep:
|
|
64
|
-
submitButtonDisabled:
|
|
65
|
-
submitButtonPortalRef:
|
|
66
|
-
summary:
|
|
67
|
-
validationSchema:
|
|
30
|
+
activeStep: N,
|
|
31
|
+
autoComplete: A = "on",
|
|
32
|
+
defaultValues: R,
|
|
33
|
+
errorMessage: D,
|
|
34
|
+
formRef: L,
|
|
35
|
+
hideErrorMessage: V = !1,
|
|
36
|
+
hideForm: g = !1,
|
|
37
|
+
isLoading: O,
|
|
38
|
+
onNextStep: j,
|
|
39
|
+
onPreviousStep: z,
|
|
40
|
+
onCancel: m,
|
|
41
|
+
onSubmit: d,
|
|
42
|
+
steps: G,
|
|
43
|
+
submitLabel: b,
|
|
44
|
+
validationSchema: q,
|
|
45
|
+
translations: S = {},
|
|
46
|
+
sx: H = {},
|
|
47
|
+
...J
|
|
48
|
+
} = I, s = ke(), {
|
|
49
|
+
activeStep: K = 0,
|
|
50
|
+
defaultValues: Q = [],
|
|
51
|
+
checkout: U,
|
|
52
|
+
errorMessage: W,
|
|
53
|
+
formRef: X,
|
|
54
|
+
getNextStepLabel: Y,
|
|
55
|
+
getPreviousStepLabel: Z,
|
|
56
|
+
isLoading: _,
|
|
57
|
+
isProcessing: x,
|
|
58
|
+
nextStep: $,
|
|
59
|
+
previousStep: ee,
|
|
60
|
+
setErrorMessage: y,
|
|
61
|
+
settings: te,
|
|
62
|
+
steps: oe = [],
|
|
63
|
+
subStep: ne,
|
|
64
|
+
submitButtonDisabled: ae,
|
|
65
|
+
submitButtonPortalRef: P,
|
|
66
|
+
summary: re,
|
|
67
|
+
validationSchema: se,
|
|
68
68
|
translations: f = {},
|
|
69
|
-
track:
|
|
70
|
-
} =
|
|
71
|
-
...
|
|
69
|
+
track: h
|
|
70
|
+
} = s, { vendor: C } = te?.links ?? {}, t = {
|
|
71
|
+
...v,
|
|
72
72
|
...f?.checkoutForm || {},
|
|
73
|
-
...
|
|
73
|
+
...S || {},
|
|
74
74
|
feedback: {
|
|
75
|
-
...
|
|
75
|
+
...v.feedback,
|
|
76
76
|
...f?.checkoutForm?.feedback || {},
|
|
77
|
-
...
|
|
77
|
+
...S?.feedback || {}
|
|
78
78
|
},
|
|
79
79
|
validation: {
|
|
80
|
-
...
|
|
80
|
+
...v.validation,
|
|
81
81
|
...f?.validation || {},
|
|
82
|
-
...
|
|
82
|
+
...S?.validation || {}
|
|
83
83
|
}
|
|
84
|
-
},
|
|
85
|
-
let o = typeof e.nextLabel == "function" ? e.nextLabel({ ...
|
|
84
|
+
}, i = O ?? _, r = N ?? K, ie = R ?? Q, w = D ?? W, ce = j ?? $, ue = z ?? ee, le = q ?? se, c = (G ?? oe ?? []).map((e) => {
|
|
85
|
+
let o = typeof e.nextLabel == "function" ? e.nextLabel({ ...s, translations: t }) : e.nextLabel, a = typeof e.previousLabel == "function" ? e.previousLabel({ ...s, translations: t }) : e.previousLabel;
|
|
86
86
|
if (!o) {
|
|
87
|
-
const n =
|
|
87
|
+
const n = Y();
|
|
88
88
|
n && (o = t.nextStepLabel.replace(
|
|
89
89
|
"{stepLabel}",
|
|
90
90
|
n
|
|
91
91
|
));
|
|
92
92
|
}
|
|
93
93
|
if (!a) {
|
|
94
|
-
const n =
|
|
94
|
+
const n = Z();
|
|
95
95
|
n && (a = t.previousStepLabel.replace(
|
|
96
96
|
"{stepLabel}",
|
|
97
97
|
n
|
|
@@ -102,57 +102,71 @@ const h = {
|
|
|
102
102
|
nextLabel: o,
|
|
103
103
|
previousLabel: a
|
|
104
104
|
};
|
|
105
|
-
}),
|
|
106
|
-
summary:
|
|
107
|
-
steps:
|
|
108
|
-
track:
|
|
105
|
+
}), F = r === c.length - 1, M = c[r]?.component, T = Be({
|
|
106
|
+
summary: re,
|
|
107
|
+
steps: c,
|
|
108
|
+
track: h
|
|
109
109
|
});
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
ve(() => {
|
|
111
|
+
i || (() => {
|
|
112
112
|
const {
|
|
113
113
|
steps: o,
|
|
114
114
|
summary: a,
|
|
115
115
|
track: n
|
|
116
|
-
} =
|
|
116
|
+
} = T();
|
|
117
117
|
!n && typeof n != "function" || n("checkoutStep", {
|
|
118
|
-
step: o[
|
|
119
|
-
stepIndex:
|
|
118
|
+
step: o[r],
|
|
119
|
+
stepIndex: r + 1,
|
|
120
120
|
summary: a
|
|
121
121
|
});
|
|
122
122
|
})();
|
|
123
|
-
}, [
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
123
|
+
}, [r, i, T]);
|
|
124
|
+
const pe = async (e, o) => {
|
|
125
|
+
const a = c[r], n = r + 1, l = await ce(e, o, {
|
|
126
|
+
...s,
|
|
127
|
+
translations: t
|
|
128
|
+
});
|
|
129
|
+
return h("stepSubmitted", {
|
|
130
|
+
step: a,
|
|
131
|
+
stepIndex: n,
|
|
132
|
+
stepValues: e,
|
|
133
|
+
formData: o
|
|
134
|
+
}), l;
|
|
135
|
+
}, me = async (e) => ue(e, { ...s, translations: t }), de = () => {
|
|
131
136
|
if (m && typeof m == "function")
|
|
132
|
-
return m(
|
|
133
|
-
|
|
137
|
+
return m();
|
|
138
|
+
}, be = async (e, o) => {
|
|
139
|
+
const a = c[r], n = r + 1;
|
|
140
|
+
if (h("stepSubmitted", {
|
|
141
|
+
step: a,
|
|
142
|
+
stepIndex: n,
|
|
143
|
+
stepValues: e,
|
|
144
|
+
formData: o
|
|
145
|
+
}), d && typeof d == "function")
|
|
146
|
+
return d(e, o, {
|
|
147
|
+
...s,
|
|
134
148
|
translations: t
|
|
135
149
|
});
|
|
136
150
|
try {
|
|
137
|
-
await
|
|
138
|
-
} catch (
|
|
139
|
-
const
|
|
140
|
-
return
|
|
151
|
+
await U(), y(null), await ye(5e3);
|
|
152
|
+
} catch (l) {
|
|
153
|
+
const Se = we(l);
|
|
154
|
+
return y({
|
|
141
155
|
title: t.feedback?.checkoutFailedTitle,
|
|
142
|
-
description:
|
|
143
|
-
}), Promise.reject(
|
|
156
|
+
description: Se || t.feedback?.checkoutFailedDescription
|
|
157
|
+
}), Promise.reject(l);
|
|
144
158
|
}
|
|
145
|
-
},
|
|
146
|
-
const { summary: e } =
|
|
159
|
+
}, k = typeof b == "function" ? b({ ...s, translations: t }) : b ?? (() => {
|
|
160
|
+
const { summary: e } = s, { agreementTemplate: o } = e || {}, a = xe(
|
|
147
161
|
o?.type?.toLowerCase() || ""
|
|
148
162
|
);
|
|
149
163
|
return a === "downPayment" ? t.downPaymentSubmitLabel : ["cod", "postPaid"].includes(a) ? t.postPaidSubmitLabel : t.submitLabel;
|
|
150
164
|
})();
|
|
151
|
-
return /* @__PURE__ */
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
-
|
|
165
|
+
return /* @__PURE__ */ p(fe, { sx: g ? { display: "none" } : H, children: [
|
|
166
|
+
/* @__PURE__ */ p(
|
|
167
|
+
he,
|
|
154
168
|
{
|
|
155
|
-
...
|
|
169
|
+
...J,
|
|
156
170
|
actionsAlignment: "space-between",
|
|
157
171
|
actionsContainerProps: {
|
|
158
172
|
sx: {
|
|
@@ -161,71 +175,71 @@ const h = {
|
|
|
161
175
|
mt: 1
|
|
162
176
|
}
|
|
163
177
|
},
|
|
164
|
-
activeStep:
|
|
165
|
-
autoComplete:
|
|
178
|
+
activeStep: r,
|
|
179
|
+
autoComplete: A,
|
|
166
180
|
cancelLabel: t.cancelLabel,
|
|
167
181
|
defaultValues: ie,
|
|
168
182
|
formRef: [
|
|
169
|
-
|
|
170
|
-
...
|
|
183
|
+
X,
|
|
184
|
+
...L ? [L] : []
|
|
171
185
|
],
|
|
172
|
-
getErrorMessage:
|
|
173
|
-
hideActions:
|
|
174
|
-
onNextStep:
|
|
175
|
-
onPreviousStep:
|
|
176
|
-
onCancel:
|
|
177
|
-
onSubmit:
|
|
178
|
-
subStep:
|
|
179
|
-
steps:
|
|
186
|
+
getErrorMessage: Fe(t.validation),
|
|
187
|
+
hideActions: i,
|
|
188
|
+
onNextStep: pe,
|
|
189
|
+
onPreviousStep: me,
|
|
190
|
+
onCancel: de,
|
|
191
|
+
onSubmit: be,
|
|
192
|
+
subStep: ne,
|
|
193
|
+
steps: c,
|
|
180
194
|
cancelButtonProps: {
|
|
181
|
-
...
|
|
182
|
-
disabled:
|
|
195
|
+
...r === 0 && ge(C) ? { href: C } : {},
|
|
196
|
+
disabled: x,
|
|
183
197
|
size: "large"
|
|
184
198
|
},
|
|
185
199
|
submitButtonProps: {
|
|
186
|
-
disabled:
|
|
187
|
-
loading:
|
|
200
|
+
disabled: ae,
|
|
201
|
+
loading: x,
|
|
188
202
|
size: "large"
|
|
189
203
|
},
|
|
190
|
-
submitLabel:
|
|
204
|
+
submitLabel: k,
|
|
191
205
|
validationSchema: le,
|
|
192
206
|
children: [
|
|
193
|
-
!
|
|
194
|
-
|
|
207
|
+
!i && w && !V && /* @__PURE__ */ u(
|
|
208
|
+
Te,
|
|
195
209
|
{
|
|
196
|
-
errorMessage:
|
|
210
|
+
errorMessage: w,
|
|
197
211
|
sx: { mt: 1.5, mb: 3 }
|
|
198
212
|
}
|
|
199
213
|
),
|
|
200
|
-
!
|
|
201
|
-
/* @__PURE__ */
|
|
202
|
-
!
|
|
203
|
-
/* @__PURE__ */
|
|
204
|
-
/* @__PURE__ */
|
|
205
|
-
|
|
206
|
-
|
|
214
|
+
!i && M && /* @__PURE__ */ p(B, { children: [
|
|
215
|
+
/* @__PURE__ */ u(M, {}),
|
|
216
|
+
!g && P.current && Le(
|
|
217
|
+
/* @__PURE__ */ p(B, { children: [
|
|
218
|
+
/* @__PURE__ */ u(Ce, { sx: { mt: 0.5 } }),
|
|
219
|
+
F && /* @__PURE__ */ u(
|
|
220
|
+
E,
|
|
207
221
|
{
|
|
208
|
-
submitLabel:
|
|
222
|
+
submitLabel: k,
|
|
209
223
|
sx: { mt: 3 }
|
|
210
224
|
}
|
|
211
225
|
)
|
|
212
226
|
] }),
|
|
213
|
-
|
|
227
|
+
P.current
|
|
214
228
|
)
|
|
215
229
|
] }),
|
|
216
|
-
|
|
230
|
+
i && /* @__PURE__ */ u(Pe, {})
|
|
217
231
|
]
|
|
218
232
|
}
|
|
219
233
|
),
|
|
220
|
-
|
|
221
|
-
|
|
234
|
+
F && /* @__PURE__ */ u(
|
|
235
|
+
E,
|
|
222
236
|
{
|
|
223
|
-
submitLabel:
|
|
237
|
+
submitLabel: k,
|
|
224
238
|
sx: { display: { md: "none" }, mt: 3, textAlign: "center" }
|
|
225
239
|
}
|
|
226
240
|
)
|
|
227
241
|
] });
|
|
228
242
|
};
|
|
229
243
|
export {
|
|
230
|
-
|
|
244
|
+
Qe as CheckoutForm
|
|
231
245
|
};
|
|
@@ -4,12 +4,14 @@ import { CheckoutBusinessInformationSectionProps } from '../CheckoutBusinessInfo
|
|
|
4
4
|
import { CheckoutShippingAddressSectionProps } from '../CheckoutShippingAddressSection/CheckoutShippingAddressSection';
|
|
5
5
|
import { CheckoutBillingAddressSectionProps } from '../CheckoutBillingAddressSection/CheckoutBillingAddressSection';
|
|
6
6
|
import { CheckoutExpressCheckoutSectionProps } from '../CheckoutExpressCheckoutSection/CheckoutExpressCheckoutSection';
|
|
7
|
+
import { CheckoutSalutationSectionProps } from '../CheckoutSalutationSection/CheckoutSalutationSection';
|
|
7
8
|
export interface CheckoutInformationStepProps {
|
|
8
9
|
translations?: {
|
|
9
10
|
billingAddressSection?: CheckoutBillingAddressSectionProps['translations'];
|
|
10
11
|
businessInformationSection?: CheckoutBusinessInformationSectionProps['translations'];
|
|
11
12
|
contactInformationSection?: CheckoutContactInformationSectionProps['translations'];
|
|
12
13
|
expressCheckoutSection?: CheckoutExpressCheckoutSectionProps['translations'];
|
|
14
|
+
salutationSection?: CheckoutSalutationSectionProps['translations'];
|
|
13
15
|
shippingAddressSection?: CheckoutShippingAddressSectionProps['translations'];
|
|
14
16
|
typeSection?: CheckoutTypeSectionProps['translations'];
|
|
15
17
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckoutInformationStep.d.ts","sourceRoot":"","sources":["../../src/CheckoutInformationStep/CheckoutInformationStep.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,sCAAsC,EAC5C,MAAM,wEAAwE,CAAC;AAChF,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAEL,KAAK,uCAAuC,EAC7C,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAEL,KAAK,mCAAmC,EACzC,MAAM,kEAAkE,CAAC;AAC1E,OAAO,EAEL,KAAK,kCAAkC,EACxC,MAAM,gEAAgE,CAAC;AACxE,OAAO,EAEL,KAAK,mCAAmC,EACzC,MAAM,kEAAkE,CAAC;
|
|
1
|
+
{"version":3,"file":"CheckoutInformationStep.d.ts","sourceRoot":"","sources":["../../src/CheckoutInformationStep/CheckoutInformationStep.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,sCAAsC,EAC5C,MAAM,wEAAwE,CAAC;AAChF,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAEL,KAAK,uCAAuC,EAC7C,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAEL,KAAK,mCAAmC,EACzC,MAAM,kEAAkE,CAAC;AAC1E,OAAO,EAEL,KAAK,kCAAkC,EACxC,MAAM,gEAAgE,CAAC;AACxE,OAAO,EAEL,KAAK,mCAAmC,EACzC,MAAM,kEAAkE,CAAC;AAC1E,OAAO,EAEL,KAAK,8BAA8B,EACpC,MAAM,wDAAwD,CAAC;AAEhE,MAAM,WAAW,4BAA4B;IAC3C,YAAY,CAAC,EAAE;QACb,qBAAqB,CAAC,EAAE,kCAAkC,CAAC,cAAc,CAAC,CAAC;QAC3E,0BAA0B,CAAC,EAAE,uCAAuC,CAAC,cAAc,CAAC,CAAC;QACrF,yBAAyB,CAAC,EAAE,sCAAsC,CAAC,cAAc,CAAC,CAAC;QACnF,sBAAsB,CAAC,EAAE,mCAAmC,CAAC,cAAc,CAAC,CAAC;QAC7E,iBAAiB,CAAC,EAAE,8BAA8B,CAAC,cAAc,CAAC,CAAC;QACnE,sBAAsB,CAAC,EAAE,mCAAmC,CAAC,cAAc,CAAC,CAAC;QAC7E,WAAW,CAAC,EAAE,wBAAwB,CAAC,cAAc,CAAC,CAAC;KACxD,CAAC;CACH;AAED,eAAO,MAAM,uBAAuB,GAClC,OAAO,4BAA4B,qDAyDpC,CAAC"}
|
|
@@ -1,56 +1,63 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useFormContext as
|
|
3
|
-
import { CheckoutContactInformationSection as
|
|
4
|
-
import { CheckoutTypeSection as
|
|
5
|
-
import { useCheckout as
|
|
6
|
-
import { CheckoutBusinessInformationSection as
|
|
7
|
-
import { CheckoutShippingAddressSection as
|
|
8
|
-
import { CheckoutBillingAddressSection as
|
|
9
|
-
import { CheckoutExpressCheckoutSection as
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { jsxs as C, Fragment as k, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useFormContext as x, Collapse as i } from "@afosto/components";
|
|
3
|
+
import { CheckoutContactInformationSection as A } from "../CheckoutContactInformationSection/CheckoutContactInformationSection.js";
|
|
4
|
+
import { CheckoutTypeSection as y } from "../CheckoutTypeSection/CheckoutTypeSection.js";
|
|
5
|
+
import { useCheckout as B } from "../CheckoutStateProvider/CheckoutStateProvider.js";
|
|
6
|
+
import { CheckoutBusinessInformationSection as I } from "../CheckoutBusinessInformationSection/CheckoutBusinessInformationSection.js";
|
|
7
|
+
import { CheckoutShippingAddressSection as b } from "../CheckoutShippingAddressSection/CheckoutShippingAddressSection.js";
|
|
8
|
+
import { CheckoutBillingAddressSection as w } from "../CheckoutBillingAddressSection/CheckoutBillingAddressSection.js";
|
|
9
|
+
import { CheckoutExpressCheckoutSection as E } from "../CheckoutExpressCheckoutSection/CheckoutExpressCheckoutSection.js";
|
|
10
|
+
import { CheckoutSalutationSection as F } from "../CheckoutSalutationSection/CheckoutSalutationSection.js";
|
|
11
|
+
const G = (e) => {
|
|
12
|
+
const { translations: o = {} } = e || {}, { expressPaymentMethods: r, isSignedIn: a, settings: c } = B(), { isB2bExcluded: m, isB2cExcluded: p, salutation: l } = c || {}, { watch: d } = x(), [h, u, n] = d([
|
|
12
13
|
"organisation",
|
|
13
14
|
"type",
|
|
14
15
|
"sameBillingAsShippingAddress"
|
|
15
|
-
]), s =
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
!a && r.length > 0 && /* @__PURE__ */
|
|
18
|
-
|
|
16
|
+
]), s = u === "business", S = h?.type?.toLowerCase() === "shared", g = !!l, f = !S && !m && !p;
|
|
17
|
+
return /* @__PURE__ */ C(k, { children: [
|
|
18
|
+
!a && r.length > 0 && /* @__PURE__ */ t(
|
|
19
|
+
E,
|
|
19
20
|
{
|
|
20
|
-
translations:
|
|
21
|
+
translations: o.expressCheckoutSection,
|
|
21
22
|
sx: {
|
|
22
23
|
mb: 3
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
26
|
),
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
|
|
27
|
+
/* @__PURE__ */ t(
|
|
28
|
+
A,
|
|
28
29
|
{
|
|
29
|
-
translations:
|
|
30
|
+
translations: o.contactInformationSection
|
|
30
31
|
}
|
|
31
32
|
),
|
|
32
|
-
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
|
|
33
|
+
f && /* @__PURE__ */ t(y, { translations: o.typeSection }),
|
|
34
|
+
/* @__PURE__ */ t(i, { in: s, children: /* @__PURE__ */ t(
|
|
35
|
+
I,
|
|
35
36
|
{
|
|
36
|
-
translations:
|
|
37
|
+
translations: o.businessInformationSection
|
|
37
38
|
}
|
|
38
39
|
) }),
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
|
|
40
|
+
g && /* @__PURE__ */ t(
|
|
41
|
+
F,
|
|
42
|
+
{
|
|
43
|
+
translations: o.salutationSection
|
|
44
|
+
}
|
|
45
|
+
),
|
|
46
|
+
/* @__PURE__ */ t(
|
|
47
|
+
b,
|
|
41
48
|
{
|
|
42
49
|
showOrganisationField: !n && s,
|
|
43
|
-
translations:
|
|
50
|
+
translations: o.shippingAddressSection
|
|
44
51
|
}
|
|
45
52
|
),
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
|
|
53
|
+
/* @__PURE__ */ t(i, { in: !n, children: /* @__PURE__ */ t(
|
|
54
|
+
w,
|
|
48
55
|
{
|
|
49
|
-
translations:
|
|
56
|
+
translations: o.billingAddressSection
|
|
50
57
|
}
|
|
51
58
|
) })
|
|
52
59
|
] });
|
|
53
60
|
};
|
|
54
61
|
export {
|
|
55
|
-
|
|
62
|
+
G as CheckoutInformationStep
|
|
56
63
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckoutProvider.d.ts","sourceRoot":"","sources":["../../src/CheckoutProvider/CheckoutProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIpE,OAAO,EAAE,sBAAsB,EAAgB,MAAM,oBAAoB,CAAC;AAC1E,OAAO,KAAK,EACV,gBAAgB,EAChB,6CAA6C,EAC7C,aAAa,EACb,oBAAoB,EAEpB,WAAW,EACX,4BAA4B,EAC5B,4BAA4B,EAC5B,uBAAuB,EACxB,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAG7E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAOzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;A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,CAAC;IACpD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,yBAAyB;IACxC,SAAS,CAAC,EACN,WAAW,CAAC,iBAAiB,CAAC,GAC9B,CAAC,WAAW,CAAC,iBAAiB,CAAC,GAC7B,MAAM,CAAC,MAAM,EAAE,4BAA4B,CAAC,CAAC,CAAC;IACpD,aAAa,CAAC,EAAE,uBAAuB,CAAC;IACxC,qCAAqC,CAAC,EAAE,6CAA6C,CAAC;IACtF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,QAAQ,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;IAClD,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,UAAU,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;IACtD,KAAK,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACvB,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACrC;AAED,MAAM,MAAM,qBAAqB,GAC7B,CAAC,6BAA6B,GAC5B,yBAAyB,GAAG;IAC1B,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC,GACJ,CAAC,8BAA8B,GAC7B,yBAAyB,GAAG;IAC1B,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC,CAAC;AAET,eAAO,MAAM,gBAAgB,GAAI,OAAO,qBAAqB,qDAkL5D,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { CheckoutOrderProvider as O } from "../CheckoutOrderProvider/CheckoutOrd
|
|
|
4
4
|
import { CheckoutCartProvider as A } from "../CheckoutCartProvider/CheckoutCartProvider.js";
|
|
5
5
|
import { useGetLatest as V } from "@afosto/hooks";
|
|
6
6
|
import "@afosto/storefront";
|
|
7
|
-
import { camelize as j, isDefined as
|
|
7
|
+
import { camelize as j, isDefined as t } from "@afosto/utils";
|
|
8
8
|
import { CheckoutPayPalExpressButton as z } from "../CheckoutPayPalExpressButton/CheckoutPayPalExpressButton.js";
|
|
9
9
|
import { CheckoutExpressButton as D } from "../CheckoutExpressButton/CheckoutExpressButton.js";
|
|
10
10
|
import { deepMerge as F } from "../utils/deepMerge.js";
|
|
@@ -14,8 +14,8 @@ import { shippingStep as _ } from "../steps/shippingStep.js";
|
|
|
14
14
|
import { paymentStep as $ } from "../steps/paymentStep.js";
|
|
15
15
|
import { reviewStep as H } from "../steps/reviewStep.js";
|
|
16
16
|
import { createSummary as J } from "../utils/createSummary.js";
|
|
17
|
-
const de = (
|
|
18
|
-
if ("cartId" in
|
|
17
|
+
const de = (o) => {
|
|
18
|
+
if ("cartId" in o && "orderId" in o)
|
|
19
19
|
throw new Error("Cannot provide both cartId and orderId");
|
|
20
20
|
const {
|
|
21
21
|
createSummary: h = J,
|
|
@@ -25,12 +25,12 @@ const de = (t) => {
|
|
|
25
25
|
operations: b,
|
|
26
26
|
queryClient: C,
|
|
27
27
|
settings: e,
|
|
28
|
-
steps:
|
|
29
|
-
storefront:
|
|
28
|
+
steps: u,
|
|
29
|
+
storefront: c,
|
|
30
30
|
theme: g,
|
|
31
31
|
translations: y = {},
|
|
32
32
|
...R
|
|
33
|
-
} =
|
|
33
|
+
} = o, S = L(!1), [r, l] = v(null), [q, E] = v(!0), x = V(c), N = k || r?.locale?.replace("_", "-") || "en", P = {
|
|
34
34
|
...M || {},
|
|
35
35
|
default: D,
|
|
36
36
|
paypalExpress: z
|
|
@@ -45,27 +45,29 @@ const de = (t) => {
|
|
|
45
45
|
),
|
|
46
46
|
channelLinks: m,
|
|
47
47
|
currency: e?.currency || r?.pricing?.currency,
|
|
48
|
-
disableCouponModifications:
|
|
48
|
+
disableCouponModifications: t(
|
|
49
49
|
e?.disableCouponModifications
|
|
50
50
|
) ? e?.disableCouponModifications : !1,
|
|
51
|
-
isAccountEnabled:
|
|
52
|
-
isB2bExcluded:
|
|
53
|
-
isB2cExcluded:
|
|
54
|
-
isPhoneNumberRequired:
|
|
55
|
-
isCocNumberRequired:
|
|
56
|
-
|
|
51
|
+
isAccountEnabled: t(e?.isAccountEnabled) ? e?.isAccountEnabled : t(m?.myAccount),
|
|
52
|
+
isB2bExcluded: t(e?.isB2bExcluded) ? e?.isB2bExcluded : r?.options?.isB2bExcluded ?? !1,
|
|
53
|
+
isB2cExcluded: t(e?.isB2cExcluded) ? e?.isB2cExcluded : r?.options?.isB2cExcluded ?? !1,
|
|
54
|
+
isPhoneNumberRequired: t(e?.isPhoneNumberRequired) ? e?.isPhoneNumberRequired : r?.options?.isPhoneNumberRequired ?? !1,
|
|
55
|
+
isCocNumberRequired: t(e?.isCocNumberRequired) ? e?.isCocNumberRequired : r?.options?.isCocNumberRequired ?? !1,
|
|
56
|
+
isSalutationRequired: t(e?.isSalutationRequired) ? e?.isSalutationRequired : !1,
|
|
57
|
+
isSharedOrganisationRequired: t(
|
|
57
58
|
e?.isSharedOrganisationRequired
|
|
58
59
|
) ? e?.isSharedOrganisationRequired : r?.options?.isSharedOrganisationRequired ?? !1,
|
|
59
|
-
isVatNumberRequired:
|
|
60
|
+
isVatNumberRequired: t(e?.isVatNumberRequired) ? e?.isVatNumberRequired : r?.options?.isVatNumberRequired ?? !1,
|
|
60
61
|
links: {
|
|
61
62
|
...m,
|
|
62
63
|
...e?.links || {}
|
|
63
64
|
},
|
|
64
65
|
logo: e?.logo || r?.logo,
|
|
66
|
+
salutation: t(e?.salutation) ? e?.salutation : !1,
|
|
65
67
|
storeName: e?.storeName || r?.name
|
|
66
68
|
};
|
|
67
69
|
let p = [G, _, $, H];
|
|
68
|
-
if (
|
|
70
|
+
if (u && u.length > 0 && (p = u), w(() => {
|
|
69
71
|
const n = async () => {
|
|
70
72
|
try {
|
|
71
73
|
const i = x();
|
|
@@ -82,8 +84,8 @@ const de = (t) => {
|
|
|
82
84
|
}
|
|
83
85
|
};
|
|
84
86
|
!s && !S.current && (S.current = !0, n());
|
|
85
|
-
}, [x, s]), "orderId" in
|
|
86
|
-
const { orderId: n = "" } =
|
|
87
|
+
}, [x, s]), "orderId" in o) {
|
|
88
|
+
const { orderId: n = "" } = o;
|
|
87
89
|
return /* @__PURE__ */ d(
|
|
88
90
|
B,
|
|
89
91
|
{
|
|
@@ -103,7 +105,7 @@ const de = (t) => {
|
|
|
103
105
|
operations: b,
|
|
104
106
|
settings: a,
|
|
105
107
|
steps: p,
|
|
106
|
-
storefront:
|
|
108
|
+
storefront: c,
|
|
107
109
|
translations: y,
|
|
108
110
|
...R
|
|
109
111
|
}
|
|
@@ -111,7 +113,7 @@ const de = (t) => {
|
|
|
111
113
|
}
|
|
112
114
|
);
|
|
113
115
|
}
|
|
114
|
-
const { cartId: I } =
|
|
116
|
+
const { cartId: I } = o;
|
|
115
117
|
return /* @__PURE__ */ d(
|
|
116
118
|
B,
|
|
117
119
|
{
|
|
@@ -131,7 +133,7 @@ const de = (t) => {
|
|
|
131
133
|
operations: b,
|
|
132
134
|
settings: a,
|
|
133
135
|
steps: p,
|
|
134
|
-
storefront:
|
|
136
|
+
storefront: c,
|
|
135
137
|
translations: y,
|
|
136
138
|
...R
|
|
137
139
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CheckoutSectionProps } from '../CheckoutSection/CheckoutSection';
|
|
2
|
+
import { DeepPartial } from '../types';
|
|
3
|
+
declare const defaultTranslations: {
|
|
4
|
+
title: string;
|
|
5
|
+
mr: string;
|
|
6
|
+
mrs: string;
|
|
7
|
+
};
|
|
8
|
+
export interface CheckoutSalutationSectionProps extends Omit<CheckoutSectionProps, 'children'> {
|
|
9
|
+
translations?: DeepPartial<typeof defaultTranslations>;
|
|
10
|
+
}
|
|
11
|
+
export declare const CheckoutSalutationSection: (props: CheckoutSalutationSectionProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=CheckoutSalutationSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckoutSalutationSection.d.ts","sourceRoot":"","sources":["../../src/CheckoutSalutationSection/CheckoutSalutationSection.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,oCAAoC,CAAC;AAG5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,QAAA,MAAM,mBAAmB;;;;CAIxB,CAAC;AAEF,MAAM,WAAW,8BACf,SAAQ,IAAI,CAAC,oBAAoB,EAAE,UAAU,CAAC;IAC9C,YAAY,CAAC,EAAE,WAAW,CAAC,OAAO,mBAAmB,CAAC,CAAC;CACxD;AAED,eAAO,MAAM,yBAAyB,GACpC,OAAO,8BAA8B,qDAsBtC,CAAC"}
|