@loczer/storefront-sdk 0.239.0 → 0.240.0
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/StorefrontContext.d.ts +54 -0
- package/dist/StorefrontContext.d.ts.map +1 -1
- package/dist/StorefrontProvider.d.ts +27 -0
- package/dist/StorefrontProvider.d.ts.map +1 -1
- package/dist/components/ContractSaleDocument/InvoiceDetails.js +1 -1
- package/dist/components/ContractSaleDocument/SignatureModal.d.ts.map +1 -1
- package/dist/components/ContractSaleDocument/SignatureModal.js +79 -54
- package/dist/components/FaqSection/index.d.ts.map +1 -1
- package/dist/components/FaqSection/index.js +44 -26
- package/dist/components/SignatureInput/index.js +2 -1
- package/dist/components/SignatureInput.d.ts.map +1 -1
- package/dist/components/StorefrontInformationDocument/index.d.ts +4 -0
- package/dist/components/StorefrontInformationDocument/index.d.ts.map +1 -1
- package/dist/components/StorefrontInformationDocument/index.js +20 -11
- package/dist/i18n/en.js +1 -1
- package/dist/i18n/fr.js +1 -1
- package/dist/index.d.ts +172 -0
- package/dist/index.js +73 -73
- package/dist/pages/CheckoutPage.d.ts.map +1 -1
- package/dist/pages/CheckoutPage.js +152 -151
- package/dist/pages/InsuranceTermsPage.d.ts.map +1 -1
- package/dist/pages/InsuranceTermsPage.js +18 -16
- package/dist/pages/checkout/components/CheckoutDetailsCard.d.ts +2 -1
- package/dist/pages/checkout/components/CheckoutDetailsCard.d.ts.map +1 -1
- package/dist/pages/checkout/components/CheckoutDetailsCard.js +17 -14
- package/dist/storefront.css +1 -1
- package/dist/storefrontSchemas.d.ts +89 -0
- package/dist/storefrontSchemas.d.ts.map +1 -1
- package/dist/storefrontSchemas.js +19 -15
- package/package.json +1 -1
|
@@ -7,18 +7,18 @@ import { useTranslation as d } from "react-i18next";
|
|
|
7
7
|
import { PhoneNumberInput as f, cn as p } from "@rpcbase/ui";
|
|
8
8
|
//#region src/pages/checkout/components/CheckoutDetailsCard.tsx
|
|
9
9
|
var m = (e) => e.startsWith("fr") ? "FR" : "US";
|
|
10
|
-
function h({ form: h }) {
|
|
11
|
-
let { t:
|
|
10
|
+
function h({ form: h, onSubmit: g }) {
|
|
11
|
+
let { t: _, i18n: v } = d();
|
|
12
12
|
return /* @__PURE__ */ u(c, {
|
|
13
13
|
className: "border-slate-200 bg-white shadow-sm",
|
|
14
14
|
children: [/* @__PURE__ */ u("div", {
|
|
15
15
|
className: "border-b border-slate-200 px-4 py-4",
|
|
16
16
|
children: [/* @__PURE__ */ l("p", {
|
|
17
17
|
className: "text-sm font-semibold text-slate-950",
|
|
18
|
-
children: /* @__PURE__ */ l("span", { children:
|
|
18
|
+
children: /* @__PURE__ */ l("span", { children: _("checkout_form_title") })
|
|
19
19
|
}), /* @__PURE__ */ l("p", {
|
|
20
20
|
className: "mt-1 text-xs text-slate-600",
|
|
21
|
-
children: /* @__PURE__ */ l("span", { children:
|
|
21
|
+
children: /* @__PURE__ */ l("span", { children: _("checkout_form_description") })
|
|
22
22
|
})]
|
|
23
23
|
}), /* @__PURE__ */ l("div", {
|
|
24
24
|
className: "px-4 py-4",
|
|
@@ -26,17 +26,20 @@ function h({ form: h }) {
|
|
|
26
26
|
...h,
|
|
27
27
|
children: /* @__PURE__ */ u("form", {
|
|
28
28
|
onSubmit: (e) => e.preventDefault(),
|
|
29
|
+
onKeyDown: (e) => {
|
|
30
|
+
e.key !== "Enter" || !e.metaKey && !e.ctrlKey || (e.preventDefault(), g());
|
|
31
|
+
},
|
|
29
32
|
className: "grid gap-3",
|
|
30
33
|
children: [
|
|
31
34
|
/* @__PURE__ */ l(r, {
|
|
32
35
|
control: h.control,
|
|
33
36
|
name: "fullName",
|
|
34
37
|
render: ({ field: t }) => /* @__PURE__ */ u(i, { children: [
|
|
35
|
-
/* @__PURE__ */ l(a, { children:
|
|
38
|
+
/* @__PURE__ */ l(a, { children: _("checkout_full_name_label") }),
|
|
36
39
|
/* @__PURE__ */ l(n, { children: /* @__PURE__ */ l(e, {
|
|
37
40
|
...t,
|
|
38
41
|
autoComplete: "name",
|
|
39
|
-
placeholder:
|
|
42
|
+
placeholder: _("checkout_full_name_placeholder")
|
|
40
43
|
}) }),
|
|
41
44
|
/* @__PURE__ */ l(o, {})
|
|
42
45
|
] })
|
|
@@ -45,11 +48,11 @@ function h({ form: h }) {
|
|
|
45
48
|
control: h.control,
|
|
46
49
|
name: "email",
|
|
47
50
|
render: ({ field: t }) => /* @__PURE__ */ u(i, { children: [
|
|
48
|
-
/* @__PURE__ */ l(a, { children:
|
|
51
|
+
/* @__PURE__ */ l(a, { children: _("checkout_email_label") }),
|
|
49
52
|
/* @__PURE__ */ l(n, { children: /* @__PURE__ */ l(e, {
|
|
50
53
|
...t,
|
|
51
54
|
type: "email",
|
|
52
|
-
placeholder:
|
|
55
|
+
placeholder: _("checkout_email_placeholder")
|
|
53
56
|
}) }),
|
|
54
57
|
/* @__PURE__ */ l(o, {})
|
|
55
58
|
] })
|
|
@@ -58,7 +61,7 @@ function h({ form: h }) {
|
|
|
58
61
|
control: h.control,
|
|
59
62
|
name: "phone",
|
|
60
63
|
render: ({ field: e, fieldState: t }) => /* @__PURE__ */ u(i, { children: [
|
|
61
|
-
/* @__PURE__ */ l(a, { children:
|
|
64
|
+
/* @__PURE__ */ l(a, { children: _("checkout_phone_label") }),
|
|
62
65
|
/* @__PURE__ */ l(n, { children: /* @__PURE__ */ l(f, {
|
|
63
66
|
name: e.name,
|
|
64
67
|
value: e.value ?? "",
|
|
@@ -67,9 +70,9 @@ function h({ form: h }) {
|
|
|
67
70
|
let n = t.e164 || t.formattedInternational || t.rawInput || "";
|
|
68
71
|
e.onChange(n);
|
|
69
72
|
},
|
|
70
|
-
defaultCountry: m(
|
|
71
|
-
locale:
|
|
72
|
-
placeholder:
|
|
73
|
+
defaultCountry: m(v.language),
|
|
74
|
+
locale: v.language,
|
|
75
|
+
placeholder: _("checkout_phone_placeholder"),
|
|
73
76
|
className: "relative",
|
|
74
77
|
inputClassName: p(t.error && "border-destructive focus-visible:ring-destructive"),
|
|
75
78
|
renderValidationMessage: ({ message: e }) => t.error?.message ? null : /* @__PURE__ */ l(o, { children: /* @__PURE__ */ l("span", { children: e }) })
|
|
@@ -81,11 +84,11 @@ function h({ form: h }) {
|
|
|
81
84
|
control: h.control,
|
|
82
85
|
name: "notes",
|
|
83
86
|
render: ({ field: e }) => /* @__PURE__ */ u(i, { children: [
|
|
84
|
-
/* @__PURE__ */ l(a, { children:
|
|
87
|
+
/* @__PURE__ */ l(a, { children: _("checkout_notes_label") }),
|
|
85
88
|
/* @__PURE__ */ l(n, { children: /* @__PURE__ */ l(s, {
|
|
86
89
|
...e,
|
|
87
90
|
rows: 4,
|
|
88
|
-
placeholder:
|
|
91
|
+
placeholder: _("checkout_notes_placeholder")
|
|
89
92
|
}) }),
|
|
90
93
|
/* @__PURE__ */ l(o, {})
|
|
91
94
|
] })
|