@medusajs/draft-order 2.11.3-preview-20251101120144 → 2.11.3-preview-20251101180137
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/.medusa/server/src/admin/index.js +202 -202
- package/.medusa/server/src/admin/index.mjs +202 -202
- package/package.json +16 -16
|
@@ -9593,196 +9593,6 @@ const CustomItemsForm = () => {
|
|
|
9593
9593
|
const schema$5 = objectType({
|
|
9594
9594
|
email: stringType().email()
|
|
9595
9595
|
});
|
|
9596
|
-
const BillingAddress = () => {
|
|
9597
|
-
const { id } = reactRouterDom.useParams();
|
|
9598
|
-
const { order, isPending, isError, error } = useOrder(id, {
|
|
9599
|
-
fields: "+billing_address"
|
|
9600
|
-
});
|
|
9601
|
-
if (isError) {
|
|
9602
|
-
throw error;
|
|
9603
|
-
}
|
|
9604
|
-
const isReady = !isPending && !!order;
|
|
9605
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
9606
|
-
/* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer.Header, { children: [
|
|
9607
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Billing Address" }) }),
|
|
9608
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Edit the billing address for the draft order" }) })
|
|
9609
|
-
] }),
|
|
9610
|
-
isReady && /* @__PURE__ */ jsxRuntime.jsx(BillingAddressForm, { order })
|
|
9611
|
-
] });
|
|
9612
|
-
};
|
|
9613
|
-
const BillingAddressForm = ({ order }) => {
|
|
9614
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
9615
|
-
const form = reactHookForm.useForm({
|
|
9616
|
-
defaultValues: {
|
|
9617
|
-
first_name: ((_a = order.billing_address) == null ? void 0 : _a.first_name) ?? "",
|
|
9618
|
-
last_name: ((_b = order.billing_address) == null ? void 0 : _b.last_name) ?? "",
|
|
9619
|
-
company: ((_c = order.billing_address) == null ? void 0 : _c.company) ?? "",
|
|
9620
|
-
address_1: ((_d = order.billing_address) == null ? void 0 : _d.address_1) ?? "",
|
|
9621
|
-
address_2: ((_e = order.billing_address) == null ? void 0 : _e.address_2) ?? "",
|
|
9622
|
-
city: ((_f = order.billing_address) == null ? void 0 : _f.city) ?? "",
|
|
9623
|
-
province: ((_g = order.billing_address) == null ? void 0 : _g.province) ?? "",
|
|
9624
|
-
country_code: ((_h = order.billing_address) == null ? void 0 : _h.country_code) ?? "",
|
|
9625
|
-
postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
|
|
9626
|
-
phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
|
|
9627
|
-
},
|
|
9628
|
-
resolver: zod.zodResolver(schema$4)
|
|
9629
|
-
});
|
|
9630
|
-
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9631
|
-
const { handleSuccess } = useRouteModal();
|
|
9632
|
-
const onSubmit = form.handleSubmit(async (data) => {
|
|
9633
|
-
await mutateAsync(
|
|
9634
|
-
{ billing_address: data },
|
|
9635
|
-
{
|
|
9636
|
-
onSuccess: () => {
|
|
9637
|
-
handleSuccess();
|
|
9638
|
-
},
|
|
9639
|
-
onError: (error) => {
|
|
9640
|
-
ui.toast.error(error.message);
|
|
9641
|
-
}
|
|
9642
|
-
}
|
|
9643
|
-
);
|
|
9644
|
-
});
|
|
9645
|
-
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9646
|
-
KeyboundForm,
|
|
9647
|
-
{
|
|
9648
|
-
className: "flex flex-1 flex-col overflow-hidden",
|
|
9649
|
-
onSubmit,
|
|
9650
|
-
children: [
|
|
9651
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, { className: "flex flex-col gap-y-6 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-y-4", children: [
|
|
9652
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9653
|
-
Form$2.Field,
|
|
9654
|
-
{
|
|
9655
|
-
control: form.control,
|
|
9656
|
-
name: "country_code",
|
|
9657
|
-
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
9658
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Country" }),
|
|
9659
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(CountrySelect, { ...field }) }),
|
|
9660
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
9661
|
-
] })
|
|
9662
|
-
}
|
|
9663
|
-
),
|
|
9664
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
9665
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9666
|
-
Form$2.Field,
|
|
9667
|
-
{
|
|
9668
|
-
control: form.control,
|
|
9669
|
-
name: "first_name",
|
|
9670
|
-
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
9671
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "First name" }),
|
|
9672
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
9673
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
9674
|
-
] })
|
|
9675
|
-
}
|
|
9676
|
-
),
|
|
9677
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9678
|
-
Form$2.Field,
|
|
9679
|
-
{
|
|
9680
|
-
control: form.control,
|
|
9681
|
-
name: "last_name",
|
|
9682
|
-
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
9683
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Last name" }),
|
|
9684
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
9685
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
9686
|
-
] })
|
|
9687
|
-
}
|
|
9688
|
-
)
|
|
9689
|
-
] }),
|
|
9690
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9691
|
-
Form$2.Field,
|
|
9692
|
-
{
|
|
9693
|
-
control: form.control,
|
|
9694
|
-
name: "company",
|
|
9695
|
-
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
9696
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Company" }),
|
|
9697
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
9698
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
9699
|
-
] })
|
|
9700
|
-
}
|
|
9701
|
-
),
|
|
9702
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9703
|
-
Form$2.Field,
|
|
9704
|
-
{
|
|
9705
|
-
control: form.control,
|
|
9706
|
-
name: "address_1",
|
|
9707
|
-
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
9708
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Address" }),
|
|
9709
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
9710
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
9711
|
-
] })
|
|
9712
|
-
}
|
|
9713
|
-
),
|
|
9714
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9715
|
-
Form$2.Field,
|
|
9716
|
-
{
|
|
9717
|
-
control: form.control,
|
|
9718
|
-
name: "address_2",
|
|
9719
|
-
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
9720
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Apartment, suite, etc." }),
|
|
9721
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
9722
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
9723
|
-
] })
|
|
9724
|
-
}
|
|
9725
|
-
),
|
|
9726
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
9727
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9728
|
-
Form$2.Field,
|
|
9729
|
-
{
|
|
9730
|
-
control: form.control,
|
|
9731
|
-
name: "postal_code",
|
|
9732
|
-
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
9733
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Postal code" }),
|
|
9734
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
9735
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
9736
|
-
] })
|
|
9737
|
-
}
|
|
9738
|
-
),
|
|
9739
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9740
|
-
Form$2.Field,
|
|
9741
|
-
{
|
|
9742
|
-
control: form.control,
|
|
9743
|
-
name: "city",
|
|
9744
|
-
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
9745
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "City" }),
|
|
9746
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
9747
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
9748
|
-
] })
|
|
9749
|
-
}
|
|
9750
|
-
)
|
|
9751
|
-
] }),
|
|
9752
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9753
|
-
Form$2.Field,
|
|
9754
|
-
{
|
|
9755
|
-
control: form.control,
|
|
9756
|
-
name: "province",
|
|
9757
|
-
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
9758
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Province / State" }),
|
|
9759
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
9760
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
9761
|
-
] })
|
|
9762
|
-
}
|
|
9763
|
-
),
|
|
9764
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9765
|
-
Form$2.Field,
|
|
9766
|
-
{
|
|
9767
|
-
control: form.control,
|
|
9768
|
-
name: "phone",
|
|
9769
|
-
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
9770
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Phone" }),
|
|
9771
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
9772
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
9773
|
-
] })
|
|
9774
|
-
}
|
|
9775
|
-
)
|
|
9776
|
-
] }) }),
|
|
9777
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9778
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9779
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
|
|
9780
|
-
] }) })
|
|
9781
|
-
]
|
|
9782
|
-
}
|
|
9783
|
-
) });
|
|
9784
|
-
};
|
|
9785
|
-
const schema$4 = addressSchema;
|
|
9786
9596
|
const Email = () => {
|
|
9787
9597
|
const { id } = reactRouterDom.useParams();
|
|
9788
9598
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9805,7 +9615,7 @@ const EmailForm = ({ order }) => {
|
|
|
9805
9615
|
defaultValues: {
|
|
9806
9616
|
email: order.email ?? ""
|
|
9807
9617
|
},
|
|
9808
|
-
resolver: zod.zodResolver(schema$
|
|
9618
|
+
resolver: zod.zodResolver(schema$4)
|
|
9809
9619
|
});
|
|
9810
9620
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9811
9621
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9848,7 +9658,7 @@ const EmailForm = ({ order }) => {
|
|
|
9848
9658
|
}
|
|
9849
9659
|
) });
|
|
9850
9660
|
};
|
|
9851
|
-
const schema$
|
|
9661
|
+
const schema$4 = objectType({
|
|
9852
9662
|
email: stringType().email()
|
|
9853
9663
|
});
|
|
9854
9664
|
const NumberInput = React.forwardRef(
|
|
@@ -11480,7 +11290,7 @@ const SalesChannelForm = ({ order }) => {
|
|
|
11480
11290
|
defaultValues: {
|
|
11481
11291
|
sales_channel_id: order.sales_channel_id || ""
|
|
11482
11292
|
},
|
|
11483
|
-
resolver: zod.zodResolver(schema$
|
|
11293
|
+
resolver: zod.zodResolver(schema$3)
|
|
11484
11294
|
});
|
|
11485
11295
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
11486
11296
|
const { handleSuccess } = useRouteModal();
|
|
@@ -11555,7 +11365,7 @@ const SalesChannelField = ({ control, order }) => {
|
|
|
11555
11365
|
}
|
|
11556
11366
|
);
|
|
11557
11367
|
};
|
|
11558
|
-
const schema$
|
|
11368
|
+
const schema$3 = objectType({
|
|
11559
11369
|
sales_channel_id: stringType().min(1)
|
|
11560
11370
|
});
|
|
11561
11371
|
const STACKED_FOCUS_MODAL_ID = "shipping-form";
|
|
@@ -12397,7 +12207,7 @@ const ShippingAddressForm = ({ order }) => {
|
|
|
12397
12207
|
postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
|
|
12398
12208
|
phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
|
|
12399
12209
|
},
|
|
12400
|
-
resolver: zod.zodResolver(schema$
|
|
12210
|
+
resolver: zod.zodResolver(schema$2)
|
|
12401
12211
|
});
|
|
12402
12212
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
12403
12213
|
const { handleSuccess } = useRouteModal();
|
|
@@ -12567,7 +12377,7 @@ const ShippingAddressForm = ({ order }) => {
|
|
|
12567
12377
|
}
|
|
12568
12378
|
) });
|
|
12569
12379
|
};
|
|
12570
|
-
const schema$
|
|
12380
|
+
const schema$2 = addressSchema;
|
|
12571
12381
|
const TransferOwnership = () => {
|
|
12572
12382
|
const { id } = reactRouterDom.useParams();
|
|
12573
12383
|
const { draft_order, isPending, isError, error } = useDraftOrder(id, {
|
|
@@ -12591,7 +12401,7 @@ const TransferOwnershipForm = ({ order }) => {
|
|
|
12591
12401
|
defaultValues: {
|
|
12592
12402
|
customer_id: order.customer_id || ""
|
|
12593
12403
|
},
|
|
12594
|
-
resolver: zod.zodResolver(schema)
|
|
12404
|
+
resolver: zod.zodResolver(schema$1)
|
|
12595
12405
|
});
|
|
12596
12406
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
12597
12407
|
const { handleSuccess } = useRouteModal();
|
|
@@ -13041,9 +12851,199 @@ const Illustration = () => {
|
|
|
13041
12851
|
}
|
|
13042
12852
|
);
|
|
13043
12853
|
};
|
|
13044
|
-
const schema = objectType({
|
|
12854
|
+
const schema$1 = objectType({
|
|
13045
12855
|
customer_id: stringType().min(1)
|
|
13046
12856
|
});
|
|
12857
|
+
const BillingAddress = () => {
|
|
12858
|
+
const { id } = reactRouterDom.useParams();
|
|
12859
|
+
const { order, isPending, isError, error } = useOrder(id, {
|
|
12860
|
+
fields: "+billing_address"
|
|
12861
|
+
});
|
|
12862
|
+
if (isError) {
|
|
12863
|
+
throw error;
|
|
12864
|
+
}
|
|
12865
|
+
const isReady = !isPending && !!order;
|
|
12866
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
12867
|
+
/* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer.Header, { children: [
|
|
12868
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Billing Address" }) }),
|
|
12869
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Edit the billing address for the draft order" }) })
|
|
12870
|
+
] }),
|
|
12871
|
+
isReady && /* @__PURE__ */ jsxRuntime.jsx(BillingAddressForm, { order })
|
|
12872
|
+
] });
|
|
12873
|
+
};
|
|
12874
|
+
const BillingAddressForm = ({ order }) => {
|
|
12875
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
12876
|
+
const form = reactHookForm.useForm({
|
|
12877
|
+
defaultValues: {
|
|
12878
|
+
first_name: ((_a = order.billing_address) == null ? void 0 : _a.first_name) ?? "",
|
|
12879
|
+
last_name: ((_b = order.billing_address) == null ? void 0 : _b.last_name) ?? "",
|
|
12880
|
+
company: ((_c = order.billing_address) == null ? void 0 : _c.company) ?? "",
|
|
12881
|
+
address_1: ((_d = order.billing_address) == null ? void 0 : _d.address_1) ?? "",
|
|
12882
|
+
address_2: ((_e = order.billing_address) == null ? void 0 : _e.address_2) ?? "",
|
|
12883
|
+
city: ((_f = order.billing_address) == null ? void 0 : _f.city) ?? "",
|
|
12884
|
+
province: ((_g = order.billing_address) == null ? void 0 : _g.province) ?? "",
|
|
12885
|
+
country_code: ((_h = order.billing_address) == null ? void 0 : _h.country_code) ?? "",
|
|
12886
|
+
postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
|
|
12887
|
+
phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
|
|
12888
|
+
},
|
|
12889
|
+
resolver: zod.zodResolver(schema)
|
|
12890
|
+
});
|
|
12891
|
+
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
12892
|
+
const { handleSuccess } = useRouteModal();
|
|
12893
|
+
const onSubmit = form.handleSubmit(async (data) => {
|
|
12894
|
+
await mutateAsync(
|
|
12895
|
+
{ billing_address: data },
|
|
12896
|
+
{
|
|
12897
|
+
onSuccess: () => {
|
|
12898
|
+
handleSuccess();
|
|
12899
|
+
},
|
|
12900
|
+
onError: (error) => {
|
|
12901
|
+
ui.toast.error(error.message);
|
|
12902
|
+
}
|
|
12903
|
+
}
|
|
12904
|
+
);
|
|
12905
|
+
});
|
|
12906
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12907
|
+
KeyboundForm,
|
|
12908
|
+
{
|
|
12909
|
+
className: "flex flex-1 flex-col overflow-hidden",
|
|
12910
|
+
onSubmit,
|
|
12911
|
+
children: [
|
|
12912
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, { className: "flex flex-col gap-y-6 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-y-4", children: [
|
|
12913
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12914
|
+
Form$2.Field,
|
|
12915
|
+
{
|
|
12916
|
+
control: form.control,
|
|
12917
|
+
name: "country_code",
|
|
12918
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
12919
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Country" }),
|
|
12920
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(CountrySelect, { ...field }) }),
|
|
12921
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
12922
|
+
] })
|
|
12923
|
+
}
|
|
12924
|
+
),
|
|
12925
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
12926
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12927
|
+
Form$2.Field,
|
|
12928
|
+
{
|
|
12929
|
+
control: form.control,
|
|
12930
|
+
name: "first_name",
|
|
12931
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
12932
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "First name" }),
|
|
12933
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
12934
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
12935
|
+
] })
|
|
12936
|
+
}
|
|
12937
|
+
),
|
|
12938
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12939
|
+
Form$2.Field,
|
|
12940
|
+
{
|
|
12941
|
+
control: form.control,
|
|
12942
|
+
name: "last_name",
|
|
12943
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
12944
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Last name" }),
|
|
12945
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
12946
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
12947
|
+
] })
|
|
12948
|
+
}
|
|
12949
|
+
)
|
|
12950
|
+
] }),
|
|
12951
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12952
|
+
Form$2.Field,
|
|
12953
|
+
{
|
|
12954
|
+
control: form.control,
|
|
12955
|
+
name: "company",
|
|
12956
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
12957
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Company" }),
|
|
12958
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
12959
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
12960
|
+
] })
|
|
12961
|
+
}
|
|
12962
|
+
),
|
|
12963
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12964
|
+
Form$2.Field,
|
|
12965
|
+
{
|
|
12966
|
+
control: form.control,
|
|
12967
|
+
name: "address_1",
|
|
12968
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
12969
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Address" }),
|
|
12970
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
12971
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
12972
|
+
] })
|
|
12973
|
+
}
|
|
12974
|
+
),
|
|
12975
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12976
|
+
Form$2.Field,
|
|
12977
|
+
{
|
|
12978
|
+
control: form.control,
|
|
12979
|
+
name: "address_2",
|
|
12980
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
12981
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Apartment, suite, etc." }),
|
|
12982
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
12983
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
12984
|
+
] })
|
|
12985
|
+
}
|
|
12986
|
+
),
|
|
12987
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
12988
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12989
|
+
Form$2.Field,
|
|
12990
|
+
{
|
|
12991
|
+
control: form.control,
|
|
12992
|
+
name: "postal_code",
|
|
12993
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
12994
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Postal code" }),
|
|
12995
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
12996
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
12997
|
+
] })
|
|
12998
|
+
}
|
|
12999
|
+
),
|
|
13000
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13001
|
+
Form$2.Field,
|
|
13002
|
+
{
|
|
13003
|
+
control: form.control,
|
|
13004
|
+
name: "city",
|
|
13005
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
13006
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "City" }),
|
|
13007
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
13008
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
13009
|
+
] })
|
|
13010
|
+
}
|
|
13011
|
+
)
|
|
13012
|
+
] }),
|
|
13013
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13014
|
+
Form$2.Field,
|
|
13015
|
+
{
|
|
13016
|
+
control: form.control,
|
|
13017
|
+
name: "province",
|
|
13018
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
13019
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Province / State" }),
|
|
13020
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
13021
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
13022
|
+
] })
|
|
13023
|
+
}
|
|
13024
|
+
),
|
|
13025
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13026
|
+
Form$2.Field,
|
|
13027
|
+
{
|
|
13028
|
+
control: form.control,
|
|
13029
|
+
name: "phone",
|
|
13030
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
13031
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Phone" }),
|
|
13032
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
13033
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
13034
|
+
] })
|
|
13035
|
+
}
|
|
13036
|
+
)
|
|
13037
|
+
] }) }),
|
|
13038
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
13039
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
13040
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
|
|
13041
|
+
] }) })
|
|
13042
|
+
]
|
|
13043
|
+
}
|
|
13044
|
+
) });
|
|
13045
|
+
};
|
|
13046
|
+
const schema = addressSchema;
|
|
13047
13047
|
const widgetModule = { widgets: [] };
|
|
13048
13048
|
const routeModule = {
|
|
13049
13049
|
routes: [
|
|
@@ -13068,10 +13068,6 @@ const routeModule = {
|
|
|
13068
13068
|
Component: CustomItems,
|
|
13069
13069
|
path: "/draft-orders/:id/custom-items"
|
|
13070
13070
|
},
|
|
13071
|
-
{
|
|
13072
|
-
Component: BillingAddress,
|
|
13073
|
-
path: "/draft-orders/:id/billing-address"
|
|
13074
|
-
},
|
|
13075
13071
|
{
|
|
13076
13072
|
Component: Email,
|
|
13077
13073
|
path: "/draft-orders/:id/email"
|
|
@@ -13103,6 +13099,10 @@ const routeModule = {
|
|
|
13103
13099
|
{
|
|
13104
13100
|
Component: TransferOwnership,
|
|
13105
13101
|
path: "/draft-orders/:id/transfer-ownership"
|
|
13102
|
+
},
|
|
13103
|
+
{
|
|
13104
|
+
Component: BillingAddress,
|
|
13105
|
+
path: "/draft-orders/:id/billing-address"
|
|
13106
13106
|
}
|
|
13107
13107
|
]
|
|
13108
13108
|
}
|
|
@@ -9586,196 +9586,6 @@ const CustomItemsForm = () => {
|
|
|
9586
9586
|
const schema$5 = objectType({
|
|
9587
9587
|
email: stringType().email()
|
|
9588
9588
|
});
|
|
9589
|
-
const BillingAddress = () => {
|
|
9590
|
-
const { id } = useParams();
|
|
9591
|
-
const { order, isPending, isError, error } = useOrder(id, {
|
|
9592
|
-
fields: "+billing_address"
|
|
9593
|
-
});
|
|
9594
|
-
if (isError) {
|
|
9595
|
-
throw error;
|
|
9596
|
-
}
|
|
9597
|
-
const isReady = !isPending && !!order;
|
|
9598
|
-
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
9599
|
-
/* @__PURE__ */ jsxs(RouteDrawer.Header, { children: [
|
|
9600
|
-
/* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Billing Address" }) }),
|
|
9601
|
-
/* @__PURE__ */ jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Edit the billing address for the draft order" }) })
|
|
9602
|
-
] }),
|
|
9603
|
-
isReady && /* @__PURE__ */ jsx(BillingAddressForm, { order })
|
|
9604
|
-
] });
|
|
9605
|
-
};
|
|
9606
|
-
const BillingAddressForm = ({ order }) => {
|
|
9607
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
9608
|
-
const form = useForm({
|
|
9609
|
-
defaultValues: {
|
|
9610
|
-
first_name: ((_a = order.billing_address) == null ? void 0 : _a.first_name) ?? "",
|
|
9611
|
-
last_name: ((_b = order.billing_address) == null ? void 0 : _b.last_name) ?? "",
|
|
9612
|
-
company: ((_c = order.billing_address) == null ? void 0 : _c.company) ?? "",
|
|
9613
|
-
address_1: ((_d = order.billing_address) == null ? void 0 : _d.address_1) ?? "",
|
|
9614
|
-
address_2: ((_e = order.billing_address) == null ? void 0 : _e.address_2) ?? "",
|
|
9615
|
-
city: ((_f = order.billing_address) == null ? void 0 : _f.city) ?? "",
|
|
9616
|
-
province: ((_g = order.billing_address) == null ? void 0 : _g.province) ?? "",
|
|
9617
|
-
country_code: ((_h = order.billing_address) == null ? void 0 : _h.country_code) ?? "",
|
|
9618
|
-
postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
|
|
9619
|
-
phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
|
|
9620
|
-
},
|
|
9621
|
-
resolver: zodResolver(schema$4)
|
|
9622
|
-
});
|
|
9623
|
-
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9624
|
-
const { handleSuccess } = useRouteModal();
|
|
9625
|
-
const onSubmit = form.handleSubmit(async (data) => {
|
|
9626
|
-
await mutateAsync(
|
|
9627
|
-
{ billing_address: data },
|
|
9628
|
-
{
|
|
9629
|
-
onSuccess: () => {
|
|
9630
|
-
handleSuccess();
|
|
9631
|
-
},
|
|
9632
|
-
onError: (error) => {
|
|
9633
|
-
toast.error(error.message);
|
|
9634
|
-
}
|
|
9635
|
-
}
|
|
9636
|
-
);
|
|
9637
|
-
});
|
|
9638
|
-
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(
|
|
9639
|
-
KeyboundForm,
|
|
9640
|
-
{
|
|
9641
|
-
className: "flex flex-1 flex-col overflow-hidden",
|
|
9642
|
-
onSubmit,
|
|
9643
|
-
children: [
|
|
9644
|
-
/* @__PURE__ */ jsx(RouteDrawer.Body, { className: "flex flex-col gap-y-6 overflow-y-auto", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-y-4", children: [
|
|
9645
|
-
/* @__PURE__ */ jsx(
|
|
9646
|
-
Form$2.Field,
|
|
9647
|
-
{
|
|
9648
|
-
control: form.control,
|
|
9649
|
-
name: "country_code",
|
|
9650
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
9651
|
-
/* @__PURE__ */ jsx(Form$2.Label, { children: "Country" }),
|
|
9652
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(CountrySelect, { ...field }) }),
|
|
9653
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
9654
|
-
] })
|
|
9655
|
-
}
|
|
9656
|
-
),
|
|
9657
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
9658
|
-
/* @__PURE__ */ jsx(
|
|
9659
|
-
Form$2.Field,
|
|
9660
|
-
{
|
|
9661
|
-
control: form.control,
|
|
9662
|
-
name: "first_name",
|
|
9663
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
9664
|
-
/* @__PURE__ */ jsx(Form$2.Label, { children: "First name" }),
|
|
9665
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
9666
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
9667
|
-
] })
|
|
9668
|
-
}
|
|
9669
|
-
),
|
|
9670
|
-
/* @__PURE__ */ jsx(
|
|
9671
|
-
Form$2.Field,
|
|
9672
|
-
{
|
|
9673
|
-
control: form.control,
|
|
9674
|
-
name: "last_name",
|
|
9675
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
9676
|
-
/* @__PURE__ */ jsx(Form$2.Label, { children: "Last name" }),
|
|
9677
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
9678
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
9679
|
-
] })
|
|
9680
|
-
}
|
|
9681
|
-
)
|
|
9682
|
-
] }),
|
|
9683
|
-
/* @__PURE__ */ jsx(
|
|
9684
|
-
Form$2.Field,
|
|
9685
|
-
{
|
|
9686
|
-
control: form.control,
|
|
9687
|
-
name: "company",
|
|
9688
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
9689
|
-
/* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Company" }),
|
|
9690
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
9691
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
9692
|
-
] })
|
|
9693
|
-
}
|
|
9694
|
-
),
|
|
9695
|
-
/* @__PURE__ */ jsx(
|
|
9696
|
-
Form$2.Field,
|
|
9697
|
-
{
|
|
9698
|
-
control: form.control,
|
|
9699
|
-
name: "address_1",
|
|
9700
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
9701
|
-
/* @__PURE__ */ jsx(Form$2.Label, { children: "Address" }),
|
|
9702
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
9703
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
9704
|
-
] })
|
|
9705
|
-
}
|
|
9706
|
-
),
|
|
9707
|
-
/* @__PURE__ */ jsx(
|
|
9708
|
-
Form$2.Field,
|
|
9709
|
-
{
|
|
9710
|
-
control: form.control,
|
|
9711
|
-
name: "address_2",
|
|
9712
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
9713
|
-
/* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Apartment, suite, etc." }),
|
|
9714
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
9715
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
9716
|
-
] })
|
|
9717
|
-
}
|
|
9718
|
-
),
|
|
9719
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
9720
|
-
/* @__PURE__ */ jsx(
|
|
9721
|
-
Form$2.Field,
|
|
9722
|
-
{
|
|
9723
|
-
control: form.control,
|
|
9724
|
-
name: "postal_code",
|
|
9725
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
9726
|
-
/* @__PURE__ */ jsx(Form$2.Label, { children: "Postal code" }),
|
|
9727
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
9728
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
9729
|
-
] })
|
|
9730
|
-
}
|
|
9731
|
-
),
|
|
9732
|
-
/* @__PURE__ */ jsx(
|
|
9733
|
-
Form$2.Field,
|
|
9734
|
-
{
|
|
9735
|
-
control: form.control,
|
|
9736
|
-
name: "city",
|
|
9737
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
9738
|
-
/* @__PURE__ */ jsx(Form$2.Label, { children: "City" }),
|
|
9739
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
9740
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
9741
|
-
] })
|
|
9742
|
-
}
|
|
9743
|
-
)
|
|
9744
|
-
] }),
|
|
9745
|
-
/* @__PURE__ */ jsx(
|
|
9746
|
-
Form$2.Field,
|
|
9747
|
-
{
|
|
9748
|
-
control: form.control,
|
|
9749
|
-
name: "province",
|
|
9750
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
9751
|
-
/* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Province / State" }),
|
|
9752
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
9753
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
9754
|
-
] })
|
|
9755
|
-
}
|
|
9756
|
-
),
|
|
9757
|
-
/* @__PURE__ */ jsx(
|
|
9758
|
-
Form$2.Field,
|
|
9759
|
-
{
|
|
9760
|
-
control: form.control,
|
|
9761
|
-
name: "phone",
|
|
9762
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
9763
|
-
/* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Phone" }),
|
|
9764
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
9765
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
9766
|
-
] })
|
|
9767
|
-
}
|
|
9768
|
-
)
|
|
9769
|
-
] }) }),
|
|
9770
|
-
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9771
|
-
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9772
|
-
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
|
|
9773
|
-
] }) })
|
|
9774
|
-
]
|
|
9775
|
-
}
|
|
9776
|
-
) });
|
|
9777
|
-
};
|
|
9778
|
-
const schema$4 = addressSchema;
|
|
9779
9589
|
const Email = () => {
|
|
9780
9590
|
const { id } = useParams();
|
|
9781
9591
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9798,7 +9608,7 @@ const EmailForm = ({ order }) => {
|
|
|
9798
9608
|
defaultValues: {
|
|
9799
9609
|
email: order.email ?? ""
|
|
9800
9610
|
},
|
|
9801
|
-
resolver: zodResolver(schema$
|
|
9611
|
+
resolver: zodResolver(schema$4)
|
|
9802
9612
|
});
|
|
9803
9613
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9804
9614
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9841,7 +9651,7 @@ const EmailForm = ({ order }) => {
|
|
|
9841
9651
|
}
|
|
9842
9652
|
) });
|
|
9843
9653
|
};
|
|
9844
|
-
const schema$
|
|
9654
|
+
const schema$4 = objectType({
|
|
9845
9655
|
email: stringType().email()
|
|
9846
9656
|
});
|
|
9847
9657
|
const NumberInput = forwardRef(
|
|
@@ -11473,7 +11283,7 @@ const SalesChannelForm = ({ order }) => {
|
|
|
11473
11283
|
defaultValues: {
|
|
11474
11284
|
sales_channel_id: order.sales_channel_id || ""
|
|
11475
11285
|
},
|
|
11476
|
-
resolver: zodResolver(schema$
|
|
11286
|
+
resolver: zodResolver(schema$3)
|
|
11477
11287
|
});
|
|
11478
11288
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
11479
11289
|
const { handleSuccess } = useRouteModal();
|
|
@@ -11548,7 +11358,7 @@ const SalesChannelField = ({ control, order }) => {
|
|
|
11548
11358
|
}
|
|
11549
11359
|
);
|
|
11550
11360
|
};
|
|
11551
|
-
const schema$
|
|
11361
|
+
const schema$3 = objectType({
|
|
11552
11362
|
sales_channel_id: stringType().min(1)
|
|
11553
11363
|
});
|
|
11554
11364
|
const STACKED_FOCUS_MODAL_ID = "shipping-form";
|
|
@@ -12390,7 +12200,7 @@ const ShippingAddressForm = ({ order }) => {
|
|
|
12390
12200
|
postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
|
|
12391
12201
|
phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
|
|
12392
12202
|
},
|
|
12393
|
-
resolver: zodResolver(schema$
|
|
12203
|
+
resolver: zodResolver(schema$2)
|
|
12394
12204
|
});
|
|
12395
12205
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
12396
12206
|
const { handleSuccess } = useRouteModal();
|
|
@@ -12560,7 +12370,7 @@ const ShippingAddressForm = ({ order }) => {
|
|
|
12560
12370
|
}
|
|
12561
12371
|
) });
|
|
12562
12372
|
};
|
|
12563
|
-
const schema$
|
|
12373
|
+
const schema$2 = addressSchema;
|
|
12564
12374
|
const TransferOwnership = () => {
|
|
12565
12375
|
const { id } = useParams();
|
|
12566
12376
|
const { draft_order, isPending, isError, error } = useDraftOrder(id, {
|
|
@@ -12584,7 +12394,7 @@ const TransferOwnershipForm = ({ order }) => {
|
|
|
12584
12394
|
defaultValues: {
|
|
12585
12395
|
customer_id: order.customer_id || ""
|
|
12586
12396
|
},
|
|
12587
|
-
resolver: zodResolver(schema)
|
|
12397
|
+
resolver: zodResolver(schema$1)
|
|
12588
12398
|
});
|
|
12589
12399
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
12590
12400
|
const { handleSuccess } = useRouteModal();
|
|
@@ -13034,9 +12844,199 @@ const Illustration = () => {
|
|
|
13034
12844
|
}
|
|
13035
12845
|
);
|
|
13036
12846
|
};
|
|
13037
|
-
const schema = objectType({
|
|
12847
|
+
const schema$1 = objectType({
|
|
13038
12848
|
customer_id: stringType().min(1)
|
|
13039
12849
|
});
|
|
12850
|
+
const BillingAddress = () => {
|
|
12851
|
+
const { id } = useParams();
|
|
12852
|
+
const { order, isPending, isError, error } = useOrder(id, {
|
|
12853
|
+
fields: "+billing_address"
|
|
12854
|
+
});
|
|
12855
|
+
if (isError) {
|
|
12856
|
+
throw error;
|
|
12857
|
+
}
|
|
12858
|
+
const isReady = !isPending && !!order;
|
|
12859
|
+
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
12860
|
+
/* @__PURE__ */ jsxs(RouteDrawer.Header, { children: [
|
|
12861
|
+
/* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Billing Address" }) }),
|
|
12862
|
+
/* @__PURE__ */ jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Edit the billing address for the draft order" }) })
|
|
12863
|
+
] }),
|
|
12864
|
+
isReady && /* @__PURE__ */ jsx(BillingAddressForm, { order })
|
|
12865
|
+
] });
|
|
12866
|
+
};
|
|
12867
|
+
const BillingAddressForm = ({ order }) => {
|
|
12868
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
12869
|
+
const form = useForm({
|
|
12870
|
+
defaultValues: {
|
|
12871
|
+
first_name: ((_a = order.billing_address) == null ? void 0 : _a.first_name) ?? "",
|
|
12872
|
+
last_name: ((_b = order.billing_address) == null ? void 0 : _b.last_name) ?? "",
|
|
12873
|
+
company: ((_c = order.billing_address) == null ? void 0 : _c.company) ?? "",
|
|
12874
|
+
address_1: ((_d = order.billing_address) == null ? void 0 : _d.address_1) ?? "",
|
|
12875
|
+
address_2: ((_e = order.billing_address) == null ? void 0 : _e.address_2) ?? "",
|
|
12876
|
+
city: ((_f = order.billing_address) == null ? void 0 : _f.city) ?? "",
|
|
12877
|
+
province: ((_g = order.billing_address) == null ? void 0 : _g.province) ?? "",
|
|
12878
|
+
country_code: ((_h = order.billing_address) == null ? void 0 : _h.country_code) ?? "",
|
|
12879
|
+
postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
|
|
12880
|
+
phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
|
|
12881
|
+
},
|
|
12882
|
+
resolver: zodResolver(schema)
|
|
12883
|
+
});
|
|
12884
|
+
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
12885
|
+
const { handleSuccess } = useRouteModal();
|
|
12886
|
+
const onSubmit = form.handleSubmit(async (data) => {
|
|
12887
|
+
await mutateAsync(
|
|
12888
|
+
{ billing_address: data },
|
|
12889
|
+
{
|
|
12890
|
+
onSuccess: () => {
|
|
12891
|
+
handleSuccess();
|
|
12892
|
+
},
|
|
12893
|
+
onError: (error) => {
|
|
12894
|
+
toast.error(error.message);
|
|
12895
|
+
}
|
|
12896
|
+
}
|
|
12897
|
+
);
|
|
12898
|
+
});
|
|
12899
|
+
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(
|
|
12900
|
+
KeyboundForm,
|
|
12901
|
+
{
|
|
12902
|
+
className: "flex flex-1 flex-col overflow-hidden",
|
|
12903
|
+
onSubmit,
|
|
12904
|
+
children: [
|
|
12905
|
+
/* @__PURE__ */ jsx(RouteDrawer.Body, { className: "flex flex-col gap-y-6 overflow-y-auto", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-y-4", children: [
|
|
12906
|
+
/* @__PURE__ */ jsx(
|
|
12907
|
+
Form$2.Field,
|
|
12908
|
+
{
|
|
12909
|
+
control: form.control,
|
|
12910
|
+
name: "country_code",
|
|
12911
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
12912
|
+
/* @__PURE__ */ jsx(Form$2.Label, { children: "Country" }),
|
|
12913
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(CountrySelect, { ...field }) }),
|
|
12914
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
12915
|
+
] })
|
|
12916
|
+
}
|
|
12917
|
+
),
|
|
12918
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
12919
|
+
/* @__PURE__ */ jsx(
|
|
12920
|
+
Form$2.Field,
|
|
12921
|
+
{
|
|
12922
|
+
control: form.control,
|
|
12923
|
+
name: "first_name",
|
|
12924
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
12925
|
+
/* @__PURE__ */ jsx(Form$2.Label, { children: "First name" }),
|
|
12926
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
12927
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
12928
|
+
] })
|
|
12929
|
+
}
|
|
12930
|
+
),
|
|
12931
|
+
/* @__PURE__ */ jsx(
|
|
12932
|
+
Form$2.Field,
|
|
12933
|
+
{
|
|
12934
|
+
control: form.control,
|
|
12935
|
+
name: "last_name",
|
|
12936
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
12937
|
+
/* @__PURE__ */ jsx(Form$2.Label, { children: "Last name" }),
|
|
12938
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
12939
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
12940
|
+
] })
|
|
12941
|
+
}
|
|
12942
|
+
)
|
|
12943
|
+
] }),
|
|
12944
|
+
/* @__PURE__ */ jsx(
|
|
12945
|
+
Form$2.Field,
|
|
12946
|
+
{
|
|
12947
|
+
control: form.control,
|
|
12948
|
+
name: "company",
|
|
12949
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
12950
|
+
/* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Company" }),
|
|
12951
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
12952
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
12953
|
+
] })
|
|
12954
|
+
}
|
|
12955
|
+
),
|
|
12956
|
+
/* @__PURE__ */ jsx(
|
|
12957
|
+
Form$2.Field,
|
|
12958
|
+
{
|
|
12959
|
+
control: form.control,
|
|
12960
|
+
name: "address_1",
|
|
12961
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
12962
|
+
/* @__PURE__ */ jsx(Form$2.Label, { children: "Address" }),
|
|
12963
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
12964
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
12965
|
+
] })
|
|
12966
|
+
}
|
|
12967
|
+
),
|
|
12968
|
+
/* @__PURE__ */ jsx(
|
|
12969
|
+
Form$2.Field,
|
|
12970
|
+
{
|
|
12971
|
+
control: form.control,
|
|
12972
|
+
name: "address_2",
|
|
12973
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
12974
|
+
/* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Apartment, suite, etc." }),
|
|
12975
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
12976
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
12977
|
+
] })
|
|
12978
|
+
}
|
|
12979
|
+
),
|
|
12980
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
12981
|
+
/* @__PURE__ */ jsx(
|
|
12982
|
+
Form$2.Field,
|
|
12983
|
+
{
|
|
12984
|
+
control: form.control,
|
|
12985
|
+
name: "postal_code",
|
|
12986
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
12987
|
+
/* @__PURE__ */ jsx(Form$2.Label, { children: "Postal code" }),
|
|
12988
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
12989
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
12990
|
+
] })
|
|
12991
|
+
}
|
|
12992
|
+
),
|
|
12993
|
+
/* @__PURE__ */ jsx(
|
|
12994
|
+
Form$2.Field,
|
|
12995
|
+
{
|
|
12996
|
+
control: form.control,
|
|
12997
|
+
name: "city",
|
|
12998
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
12999
|
+
/* @__PURE__ */ jsx(Form$2.Label, { children: "City" }),
|
|
13000
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
13001
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
13002
|
+
] })
|
|
13003
|
+
}
|
|
13004
|
+
)
|
|
13005
|
+
] }),
|
|
13006
|
+
/* @__PURE__ */ jsx(
|
|
13007
|
+
Form$2.Field,
|
|
13008
|
+
{
|
|
13009
|
+
control: form.control,
|
|
13010
|
+
name: "province",
|
|
13011
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
13012
|
+
/* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Province / State" }),
|
|
13013
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
13014
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
13015
|
+
] })
|
|
13016
|
+
}
|
|
13017
|
+
),
|
|
13018
|
+
/* @__PURE__ */ jsx(
|
|
13019
|
+
Form$2.Field,
|
|
13020
|
+
{
|
|
13021
|
+
control: form.control,
|
|
13022
|
+
name: "phone",
|
|
13023
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
13024
|
+
/* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Phone" }),
|
|
13025
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
13026
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
13027
|
+
] })
|
|
13028
|
+
}
|
|
13029
|
+
)
|
|
13030
|
+
] }) }),
|
|
13031
|
+
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
13032
|
+
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
13033
|
+
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
|
|
13034
|
+
] }) })
|
|
13035
|
+
]
|
|
13036
|
+
}
|
|
13037
|
+
) });
|
|
13038
|
+
};
|
|
13039
|
+
const schema = addressSchema;
|
|
13040
13040
|
const widgetModule = { widgets: [] };
|
|
13041
13041
|
const routeModule = {
|
|
13042
13042
|
routes: [
|
|
@@ -13061,10 +13061,6 @@ const routeModule = {
|
|
|
13061
13061
|
Component: CustomItems,
|
|
13062
13062
|
path: "/draft-orders/:id/custom-items"
|
|
13063
13063
|
},
|
|
13064
|
-
{
|
|
13065
|
-
Component: BillingAddress,
|
|
13066
|
-
path: "/draft-orders/:id/billing-address"
|
|
13067
|
-
},
|
|
13068
13064
|
{
|
|
13069
13065
|
Component: Email,
|
|
13070
13066
|
path: "/draft-orders/:id/email"
|
|
@@ -13096,6 +13092,10 @@ const routeModule = {
|
|
|
13096
13092
|
{
|
|
13097
13093
|
Component: TransferOwnership,
|
|
13098
13094
|
path: "/draft-orders/:id/transfer-ownership"
|
|
13095
|
+
},
|
|
13096
|
+
{
|
|
13097
|
+
Component: BillingAddress,
|
|
13098
|
+
path: "/draft-orders/:id/billing-address"
|
|
13099
13099
|
}
|
|
13100
13100
|
]
|
|
13101
13101
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/draft-order",
|
|
3
|
-
"version": "2.11.3-preview-
|
|
3
|
+
"version": "2.11.3-preview-20251101180137",
|
|
4
4
|
"description": "A starter for Medusa plugins.",
|
|
5
5
|
"author": "Medusa (https://medusajs.com)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@ariakit/react": "^0.4.15",
|
|
38
38
|
"@babel/runtime": "^7.26.10",
|
|
39
39
|
"@hookform/resolvers": "3.4.2",
|
|
40
|
-
"@medusajs/js-sdk": "2.11.3-preview-
|
|
40
|
+
"@medusajs/js-sdk": "2.11.3-preview-20251101180137",
|
|
41
41
|
"@tanstack/react-query": "5.64.2",
|
|
42
42
|
"@uiw/react-json-view": "^2.0.0-alpha.17",
|
|
43
43
|
"date-fns": "^3.6.0",
|
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
"react-hook-form": "7.49.1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@medusajs/admin-sdk": "2.11.3-preview-
|
|
52
|
-
"@medusajs/cli": "2.11.3-preview-
|
|
53
|
-
"@medusajs/framework": "2.11.3-preview-
|
|
54
|
-
"@medusajs/icons": "2.11.3-preview-
|
|
55
|
-
"@medusajs/test-utils": "2.11.3-preview-
|
|
56
|
-
"@medusajs/types": "2.11.3-preview-
|
|
57
|
-
"@medusajs/ui": "4.0.27-preview-
|
|
58
|
-
"@medusajs/ui-preset": "2.11.3-preview-
|
|
51
|
+
"@medusajs/admin-sdk": "2.11.3-preview-20251101180137",
|
|
52
|
+
"@medusajs/cli": "2.11.3-preview-20251101180137",
|
|
53
|
+
"@medusajs/framework": "2.11.3-preview-20251101180137",
|
|
54
|
+
"@medusajs/icons": "2.11.3-preview-20251101180137",
|
|
55
|
+
"@medusajs/test-utils": "2.11.3-preview-20251101180137",
|
|
56
|
+
"@medusajs/types": "2.11.3-preview-20251101180137",
|
|
57
|
+
"@medusajs/ui": "4.0.27-preview-20251101180137",
|
|
58
|
+
"@medusajs/ui-preset": "2.11.3-preview-20251101180137",
|
|
59
59
|
"@swc/core": "^1.7.28",
|
|
60
60
|
"@types/lodash": "^4.17.15",
|
|
61
61
|
"@types/lodash.debounce": "^4.0.9",
|
|
@@ -73,12 +73,12 @@
|
|
|
73
73
|
"yalc": "^1.0.0-pre.53"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"@medusajs/admin-sdk": "2.11.3-preview-
|
|
77
|
-
"@medusajs/cli": "2.11.3-preview-
|
|
78
|
-
"@medusajs/framework": "2.11.3-preview-
|
|
79
|
-
"@medusajs/icons": "2.11.3-preview-
|
|
80
|
-
"@medusajs/test-utils": "2.11.3-preview-
|
|
81
|
-
"@medusajs/ui": "4.0.27-preview-
|
|
76
|
+
"@medusajs/admin-sdk": "2.11.3-preview-20251101180137",
|
|
77
|
+
"@medusajs/cli": "2.11.3-preview-20251101180137",
|
|
78
|
+
"@medusajs/framework": "2.11.3-preview-20251101180137",
|
|
79
|
+
"@medusajs/icons": "2.11.3-preview-20251101180137",
|
|
80
|
+
"@medusajs/test-utils": "2.11.3-preview-20251101180137",
|
|
81
|
+
"@medusajs/ui": "4.0.27-preview-20251101180137",
|
|
82
82
|
"react": "^18.3.1",
|
|
83
83
|
"react-dom": "^18.3.1",
|
|
84
84
|
"react-router-dom": "6.20.1"
|