@medusajs/draft-order 2.11.3-preview-20251101000312 → 2.11.3-preview-20251101060137
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 +302 -302
- package/.medusa/server/src/admin/index.mjs +302 -302
- package/package.json +16 -16
|
@@ -9572,285 +9572,6 @@ const ID = () => {
|
|
|
9572
9572
|
/* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Outlet, {})
|
|
9573
9573
|
] });
|
|
9574
9574
|
};
|
|
9575
|
-
const BillingAddress = () => {
|
|
9576
|
-
const { id } = reactRouterDom.useParams();
|
|
9577
|
-
const { order, isPending, isError, error } = useOrder(id, {
|
|
9578
|
-
fields: "+billing_address"
|
|
9579
|
-
});
|
|
9580
|
-
if (isError) {
|
|
9581
|
-
throw error;
|
|
9582
|
-
}
|
|
9583
|
-
const isReady = !isPending && !!order;
|
|
9584
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
9585
|
-
/* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer.Header, { children: [
|
|
9586
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Billing Address" }) }),
|
|
9587
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Edit the billing address for the draft order" }) })
|
|
9588
|
-
] }),
|
|
9589
|
-
isReady && /* @__PURE__ */ jsxRuntime.jsx(BillingAddressForm, { order })
|
|
9590
|
-
] });
|
|
9591
|
-
};
|
|
9592
|
-
const BillingAddressForm = ({ order }) => {
|
|
9593
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
9594
|
-
const form = reactHookForm.useForm({
|
|
9595
|
-
defaultValues: {
|
|
9596
|
-
first_name: ((_a = order.billing_address) == null ? void 0 : _a.first_name) ?? "",
|
|
9597
|
-
last_name: ((_b = order.billing_address) == null ? void 0 : _b.last_name) ?? "",
|
|
9598
|
-
company: ((_c = order.billing_address) == null ? void 0 : _c.company) ?? "",
|
|
9599
|
-
address_1: ((_d = order.billing_address) == null ? void 0 : _d.address_1) ?? "",
|
|
9600
|
-
address_2: ((_e = order.billing_address) == null ? void 0 : _e.address_2) ?? "",
|
|
9601
|
-
city: ((_f = order.billing_address) == null ? void 0 : _f.city) ?? "",
|
|
9602
|
-
province: ((_g = order.billing_address) == null ? void 0 : _g.province) ?? "",
|
|
9603
|
-
country_code: ((_h = order.billing_address) == null ? void 0 : _h.country_code) ?? "",
|
|
9604
|
-
postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
|
|
9605
|
-
phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
|
|
9606
|
-
},
|
|
9607
|
-
resolver: zod.zodResolver(schema$5)
|
|
9608
|
-
});
|
|
9609
|
-
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9610
|
-
const { handleSuccess } = useRouteModal();
|
|
9611
|
-
const onSubmit = form.handleSubmit(async (data) => {
|
|
9612
|
-
await mutateAsync(
|
|
9613
|
-
{ billing_address: data },
|
|
9614
|
-
{
|
|
9615
|
-
onSuccess: () => {
|
|
9616
|
-
handleSuccess();
|
|
9617
|
-
},
|
|
9618
|
-
onError: (error) => {
|
|
9619
|
-
ui.toast.error(error.message);
|
|
9620
|
-
}
|
|
9621
|
-
}
|
|
9622
|
-
);
|
|
9623
|
-
});
|
|
9624
|
-
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9625
|
-
KeyboundForm,
|
|
9626
|
-
{
|
|
9627
|
-
className: "flex flex-1 flex-col overflow-hidden",
|
|
9628
|
-
onSubmit,
|
|
9629
|
-
children: [
|
|
9630
|
-
/* @__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: [
|
|
9631
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9632
|
-
Form$2.Field,
|
|
9633
|
-
{
|
|
9634
|
-
control: form.control,
|
|
9635
|
-
name: "country_code",
|
|
9636
|
-
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
9637
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Country" }),
|
|
9638
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(CountrySelect, { ...field }) }),
|
|
9639
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
9640
|
-
] })
|
|
9641
|
-
}
|
|
9642
|
-
),
|
|
9643
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
9644
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9645
|
-
Form$2.Field,
|
|
9646
|
-
{
|
|
9647
|
-
control: form.control,
|
|
9648
|
-
name: "first_name",
|
|
9649
|
-
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
9650
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "First name" }),
|
|
9651
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
9652
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
9653
|
-
] })
|
|
9654
|
-
}
|
|
9655
|
-
),
|
|
9656
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9657
|
-
Form$2.Field,
|
|
9658
|
-
{
|
|
9659
|
-
control: form.control,
|
|
9660
|
-
name: "last_name",
|
|
9661
|
-
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
9662
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Last name" }),
|
|
9663
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
9664
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
9665
|
-
] })
|
|
9666
|
-
}
|
|
9667
|
-
)
|
|
9668
|
-
] }),
|
|
9669
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9670
|
-
Form$2.Field,
|
|
9671
|
-
{
|
|
9672
|
-
control: form.control,
|
|
9673
|
-
name: "company",
|
|
9674
|
-
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
9675
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Company" }),
|
|
9676
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
9677
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
9678
|
-
] })
|
|
9679
|
-
}
|
|
9680
|
-
),
|
|
9681
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9682
|
-
Form$2.Field,
|
|
9683
|
-
{
|
|
9684
|
-
control: form.control,
|
|
9685
|
-
name: "address_1",
|
|
9686
|
-
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
9687
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Address" }),
|
|
9688
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
9689
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
9690
|
-
] })
|
|
9691
|
-
}
|
|
9692
|
-
),
|
|
9693
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9694
|
-
Form$2.Field,
|
|
9695
|
-
{
|
|
9696
|
-
control: form.control,
|
|
9697
|
-
name: "address_2",
|
|
9698
|
-
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
9699
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Apartment, suite, etc." }),
|
|
9700
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
9701
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
9702
|
-
] })
|
|
9703
|
-
}
|
|
9704
|
-
),
|
|
9705
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
9706
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9707
|
-
Form$2.Field,
|
|
9708
|
-
{
|
|
9709
|
-
control: form.control,
|
|
9710
|
-
name: "postal_code",
|
|
9711
|
-
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
9712
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Postal code" }),
|
|
9713
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
9714
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
9715
|
-
] })
|
|
9716
|
-
}
|
|
9717
|
-
),
|
|
9718
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9719
|
-
Form$2.Field,
|
|
9720
|
-
{
|
|
9721
|
-
control: form.control,
|
|
9722
|
-
name: "city",
|
|
9723
|
-
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
9724
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "City" }),
|
|
9725
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
9726
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
9727
|
-
] })
|
|
9728
|
-
}
|
|
9729
|
-
)
|
|
9730
|
-
] }),
|
|
9731
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9732
|
-
Form$2.Field,
|
|
9733
|
-
{
|
|
9734
|
-
control: form.control,
|
|
9735
|
-
name: "province",
|
|
9736
|
-
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
9737
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Province / State" }),
|
|
9738
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
9739
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
9740
|
-
] })
|
|
9741
|
-
}
|
|
9742
|
-
),
|
|
9743
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9744
|
-
Form$2.Field,
|
|
9745
|
-
{
|
|
9746
|
-
control: form.control,
|
|
9747
|
-
name: "phone",
|
|
9748
|
-
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
9749
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Phone" }),
|
|
9750
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
9751
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
9752
|
-
] })
|
|
9753
|
-
}
|
|
9754
|
-
)
|
|
9755
|
-
] }) }),
|
|
9756
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9757
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9758
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
|
|
9759
|
-
] }) })
|
|
9760
|
-
]
|
|
9761
|
-
}
|
|
9762
|
-
) });
|
|
9763
|
-
};
|
|
9764
|
-
const schema$5 = addressSchema;
|
|
9765
|
-
const CustomItems = () => {
|
|
9766
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
9767
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
|
|
9768
|
-
/* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
|
|
9769
|
-
] });
|
|
9770
|
-
};
|
|
9771
|
-
const CustomItemsForm = () => {
|
|
9772
|
-
const form = reactHookForm.useForm({
|
|
9773
|
-
resolver: zod.zodResolver(schema$4)
|
|
9774
|
-
});
|
|
9775
|
-
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9776
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
|
|
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", children: "Save" })
|
|
9780
|
-
] }) })
|
|
9781
|
-
] }) });
|
|
9782
|
-
};
|
|
9783
|
-
const schema$4 = objectType({
|
|
9784
|
-
email: stringType().email()
|
|
9785
|
-
});
|
|
9786
|
-
const Email = () => {
|
|
9787
|
-
const { id } = reactRouterDom.useParams();
|
|
9788
|
-
const { order, isPending, isError, error } = useOrder(id, {
|
|
9789
|
-
fields: "+email"
|
|
9790
|
-
});
|
|
9791
|
-
if (isError) {
|
|
9792
|
-
throw error;
|
|
9793
|
-
}
|
|
9794
|
-
const isReady = !isPending && !!order;
|
|
9795
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
9796
|
-
/* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer.Header, { children: [
|
|
9797
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Email" }) }),
|
|
9798
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Edit the email for the draft order" }) })
|
|
9799
|
-
] }),
|
|
9800
|
-
isReady && /* @__PURE__ */ jsxRuntime.jsx(EmailForm, { order })
|
|
9801
|
-
] });
|
|
9802
|
-
};
|
|
9803
|
-
const EmailForm = ({ order }) => {
|
|
9804
|
-
const form = reactHookForm.useForm({
|
|
9805
|
-
defaultValues: {
|
|
9806
|
-
email: order.email ?? ""
|
|
9807
|
-
},
|
|
9808
|
-
resolver: zod.zodResolver(schema$3)
|
|
9809
|
-
});
|
|
9810
|
-
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9811
|
-
const { handleSuccess } = useRouteModal();
|
|
9812
|
-
const onSubmit = form.handleSubmit(async (data) => {
|
|
9813
|
-
await mutateAsync(
|
|
9814
|
-
{ email: data.email },
|
|
9815
|
-
{
|
|
9816
|
-
onSuccess: () => {
|
|
9817
|
-
handleSuccess();
|
|
9818
|
-
},
|
|
9819
|
-
onError: (error) => {
|
|
9820
|
-
ui.toast.error(error.message);
|
|
9821
|
-
}
|
|
9822
|
-
}
|
|
9823
|
-
);
|
|
9824
|
-
});
|
|
9825
|
-
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9826
|
-
KeyboundForm,
|
|
9827
|
-
{
|
|
9828
|
-
className: "flex flex-1 flex-col overflow-hidden",
|
|
9829
|
-
onSubmit,
|
|
9830
|
-
children: [
|
|
9831
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, { className: "flex flex-col gap-y-6 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9832
|
-
Form$2.Field,
|
|
9833
|
-
{
|
|
9834
|
-
control: form.control,
|
|
9835
|
-
name: "email",
|
|
9836
|
-
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
9837
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Email" }),
|
|
9838
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
9839
|
-
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
9840
|
-
] })
|
|
9841
|
-
}
|
|
9842
|
-
) }),
|
|
9843
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9844
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9845
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
|
|
9846
|
-
] }) })
|
|
9847
|
-
]
|
|
9848
|
-
}
|
|
9849
|
-
) });
|
|
9850
|
-
};
|
|
9851
|
-
const schema$3 = objectType({
|
|
9852
|
-
email: stringType().email()
|
|
9853
|
-
});
|
|
9854
9575
|
const NumberInput = React.forwardRef(
|
|
9855
9576
|
({
|
|
9856
9577
|
value,
|
|
@@ -10810,20 +10531,88 @@ const CustomItemForm = ({ orderId, currencyCode }) => {
|
|
|
10810
10531
|
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(NumberInput, { ...field, className: "w-full" }) }) }),
|
|
10811
10532
|
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
10812
10533
|
] })
|
|
10813
|
-
] }) })
|
|
10814
|
-
}
|
|
10815
|
-
)
|
|
10816
|
-
] }) }) }),
|
|
10817
|
-
/* @__PURE__ */ jsxRuntime.jsx(StackedFocusModal.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
|
|
10818
|
-
/* @__PURE__ */ jsxRuntime.jsx(StackedFocusModal.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", type: "button", children: "Cancel" }) }),
|
|
10819
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "button", onClick: onSubmit, children: "Add item" })
|
|
10820
|
-
] }) })
|
|
10821
|
-
] }) }) });
|
|
10534
|
+
] }) })
|
|
10535
|
+
}
|
|
10536
|
+
)
|
|
10537
|
+
] }) }) }),
|
|
10538
|
+
/* @__PURE__ */ jsxRuntime.jsx(StackedFocusModal.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
|
|
10539
|
+
/* @__PURE__ */ jsxRuntime.jsx(StackedFocusModal.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", type: "button", children: "Cancel" }) }),
|
|
10540
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "button", onClick: onSubmit, children: "Add item" })
|
|
10541
|
+
] }) })
|
|
10542
|
+
] }) }) });
|
|
10543
|
+
};
|
|
10544
|
+
const customItemSchema = objectType({
|
|
10545
|
+
title: stringType().min(1),
|
|
10546
|
+
quantity: numberType(),
|
|
10547
|
+
unit_price: unionType([numberType(), stringType()])
|
|
10548
|
+
});
|
|
10549
|
+
const Email = () => {
|
|
10550
|
+
const { id } = reactRouterDom.useParams();
|
|
10551
|
+
const { order, isPending, isError, error } = useOrder(id, {
|
|
10552
|
+
fields: "+email"
|
|
10553
|
+
});
|
|
10554
|
+
if (isError) {
|
|
10555
|
+
throw error;
|
|
10556
|
+
}
|
|
10557
|
+
const isReady = !isPending && !!order;
|
|
10558
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
10559
|
+
/* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer.Header, { children: [
|
|
10560
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Email" }) }),
|
|
10561
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Edit the email for the draft order" }) })
|
|
10562
|
+
] }),
|
|
10563
|
+
isReady && /* @__PURE__ */ jsxRuntime.jsx(EmailForm, { order })
|
|
10564
|
+
] });
|
|
10565
|
+
};
|
|
10566
|
+
const EmailForm = ({ order }) => {
|
|
10567
|
+
const form = reactHookForm.useForm({
|
|
10568
|
+
defaultValues: {
|
|
10569
|
+
email: order.email ?? ""
|
|
10570
|
+
},
|
|
10571
|
+
resolver: zod.zodResolver(schema$5)
|
|
10572
|
+
});
|
|
10573
|
+
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
10574
|
+
const { handleSuccess } = useRouteModal();
|
|
10575
|
+
const onSubmit = form.handleSubmit(async (data) => {
|
|
10576
|
+
await mutateAsync(
|
|
10577
|
+
{ email: data.email },
|
|
10578
|
+
{
|
|
10579
|
+
onSuccess: () => {
|
|
10580
|
+
handleSuccess();
|
|
10581
|
+
},
|
|
10582
|
+
onError: (error) => {
|
|
10583
|
+
ui.toast.error(error.message);
|
|
10584
|
+
}
|
|
10585
|
+
}
|
|
10586
|
+
);
|
|
10587
|
+
});
|
|
10588
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10589
|
+
KeyboundForm,
|
|
10590
|
+
{
|
|
10591
|
+
className: "flex flex-1 flex-col overflow-hidden",
|
|
10592
|
+
onSubmit,
|
|
10593
|
+
children: [
|
|
10594
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, { className: "flex flex-col gap-y-6 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10595
|
+
Form$2.Field,
|
|
10596
|
+
{
|
|
10597
|
+
control: form.control,
|
|
10598
|
+
name: "email",
|
|
10599
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
10600
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Email" }),
|
|
10601
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
10602
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
10603
|
+
] })
|
|
10604
|
+
}
|
|
10605
|
+
) }),
|
|
10606
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
10607
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
10608
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
|
|
10609
|
+
] }) })
|
|
10610
|
+
]
|
|
10611
|
+
}
|
|
10612
|
+
) });
|
|
10822
10613
|
};
|
|
10823
|
-
const
|
|
10824
|
-
|
|
10825
|
-
quantity: numberType(),
|
|
10826
|
-
unit_price: unionType([numberType(), stringType()])
|
|
10614
|
+
const schema$5 = objectType({
|
|
10615
|
+
email: stringType().email()
|
|
10827
10616
|
});
|
|
10828
10617
|
const InlineTip = React.forwardRef(
|
|
10829
10618
|
({ variant = "tip", label, className, children, ...props }, ref) => {
|
|
@@ -11452,6 +11241,217 @@ function getPromotionIds(items, shippingMethods) {
|
|
|
11452
11241
|
}
|
|
11453
11242
|
return Array.from(promotionIds);
|
|
11454
11243
|
}
|
|
11244
|
+
const CustomItems = () => {
|
|
11245
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
11246
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
|
|
11247
|
+
/* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
|
|
11248
|
+
] });
|
|
11249
|
+
};
|
|
11250
|
+
const CustomItemsForm = () => {
|
|
11251
|
+
const form = reactHookForm.useForm({
|
|
11252
|
+
resolver: zod.zodResolver(schema$4)
|
|
11253
|
+
});
|
|
11254
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
11255
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
|
|
11256
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
11257
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
11258
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
|
|
11259
|
+
] }) })
|
|
11260
|
+
] }) });
|
|
11261
|
+
};
|
|
11262
|
+
const schema$4 = objectType({
|
|
11263
|
+
email: stringType().email()
|
|
11264
|
+
});
|
|
11265
|
+
const BillingAddress = () => {
|
|
11266
|
+
const { id } = reactRouterDom.useParams();
|
|
11267
|
+
const { order, isPending, isError, error } = useOrder(id, {
|
|
11268
|
+
fields: "+billing_address"
|
|
11269
|
+
});
|
|
11270
|
+
if (isError) {
|
|
11271
|
+
throw error;
|
|
11272
|
+
}
|
|
11273
|
+
const isReady = !isPending && !!order;
|
|
11274
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
11275
|
+
/* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer.Header, { children: [
|
|
11276
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Billing Address" }) }),
|
|
11277
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Edit the billing address for the draft order" }) })
|
|
11278
|
+
] }),
|
|
11279
|
+
isReady && /* @__PURE__ */ jsxRuntime.jsx(BillingAddressForm, { order })
|
|
11280
|
+
] });
|
|
11281
|
+
};
|
|
11282
|
+
const BillingAddressForm = ({ order }) => {
|
|
11283
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
11284
|
+
const form = reactHookForm.useForm({
|
|
11285
|
+
defaultValues: {
|
|
11286
|
+
first_name: ((_a = order.billing_address) == null ? void 0 : _a.first_name) ?? "",
|
|
11287
|
+
last_name: ((_b = order.billing_address) == null ? void 0 : _b.last_name) ?? "",
|
|
11288
|
+
company: ((_c = order.billing_address) == null ? void 0 : _c.company) ?? "",
|
|
11289
|
+
address_1: ((_d = order.billing_address) == null ? void 0 : _d.address_1) ?? "",
|
|
11290
|
+
address_2: ((_e = order.billing_address) == null ? void 0 : _e.address_2) ?? "",
|
|
11291
|
+
city: ((_f = order.billing_address) == null ? void 0 : _f.city) ?? "",
|
|
11292
|
+
province: ((_g = order.billing_address) == null ? void 0 : _g.province) ?? "",
|
|
11293
|
+
country_code: ((_h = order.billing_address) == null ? void 0 : _h.country_code) ?? "",
|
|
11294
|
+
postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
|
|
11295
|
+
phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
|
|
11296
|
+
},
|
|
11297
|
+
resolver: zod.zodResolver(schema$3)
|
|
11298
|
+
});
|
|
11299
|
+
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
11300
|
+
const { handleSuccess } = useRouteModal();
|
|
11301
|
+
const onSubmit = form.handleSubmit(async (data) => {
|
|
11302
|
+
await mutateAsync(
|
|
11303
|
+
{ billing_address: data },
|
|
11304
|
+
{
|
|
11305
|
+
onSuccess: () => {
|
|
11306
|
+
handleSuccess();
|
|
11307
|
+
},
|
|
11308
|
+
onError: (error) => {
|
|
11309
|
+
ui.toast.error(error.message);
|
|
11310
|
+
}
|
|
11311
|
+
}
|
|
11312
|
+
);
|
|
11313
|
+
});
|
|
11314
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11315
|
+
KeyboundForm,
|
|
11316
|
+
{
|
|
11317
|
+
className: "flex flex-1 flex-col overflow-hidden",
|
|
11318
|
+
onSubmit,
|
|
11319
|
+
children: [
|
|
11320
|
+
/* @__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: [
|
|
11321
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11322
|
+
Form$2.Field,
|
|
11323
|
+
{
|
|
11324
|
+
control: form.control,
|
|
11325
|
+
name: "country_code",
|
|
11326
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
11327
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Country" }),
|
|
11328
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(CountrySelect, { ...field }) }),
|
|
11329
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
11330
|
+
] })
|
|
11331
|
+
}
|
|
11332
|
+
),
|
|
11333
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
11334
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11335
|
+
Form$2.Field,
|
|
11336
|
+
{
|
|
11337
|
+
control: form.control,
|
|
11338
|
+
name: "first_name",
|
|
11339
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
11340
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "First name" }),
|
|
11341
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
11342
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
11343
|
+
] })
|
|
11344
|
+
}
|
|
11345
|
+
),
|
|
11346
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11347
|
+
Form$2.Field,
|
|
11348
|
+
{
|
|
11349
|
+
control: form.control,
|
|
11350
|
+
name: "last_name",
|
|
11351
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
11352
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Last name" }),
|
|
11353
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
11354
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
11355
|
+
] })
|
|
11356
|
+
}
|
|
11357
|
+
)
|
|
11358
|
+
] }),
|
|
11359
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11360
|
+
Form$2.Field,
|
|
11361
|
+
{
|
|
11362
|
+
control: form.control,
|
|
11363
|
+
name: "company",
|
|
11364
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
11365
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Company" }),
|
|
11366
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
11367
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
11368
|
+
] })
|
|
11369
|
+
}
|
|
11370
|
+
),
|
|
11371
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11372
|
+
Form$2.Field,
|
|
11373
|
+
{
|
|
11374
|
+
control: form.control,
|
|
11375
|
+
name: "address_1",
|
|
11376
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
11377
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Address" }),
|
|
11378
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
11379
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
11380
|
+
] })
|
|
11381
|
+
}
|
|
11382
|
+
),
|
|
11383
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11384
|
+
Form$2.Field,
|
|
11385
|
+
{
|
|
11386
|
+
control: form.control,
|
|
11387
|
+
name: "address_2",
|
|
11388
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
11389
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Apartment, suite, etc." }),
|
|
11390
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
11391
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
11392
|
+
] })
|
|
11393
|
+
}
|
|
11394
|
+
),
|
|
11395
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
11396
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11397
|
+
Form$2.Field,
|
|
11398
|
+
{
|
|
11399
|
+
control: form.control,
|
|
11400
|
+
name: "postal_code",
|
|
11401
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
11402
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Postal code" }),
|
|
11403
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
11404
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
11405
|
+
] })
|
|
11406
|
+
}
|
|
11407
|
+
),
|
|
11408
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11409
|
+
Form$2.Field,
|
|
11410
|
+
{
|
|
11411
|
+
control: form.control,
|
|
11412
|
+
name: "city",
|
|
11413
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
11414
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "City" }),
|
|
11415
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
11416
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
11417
|
+
] })
|
|
11418
|
+
}
|
|
11419
|
+
)
|
|
11420
|
+
] }),
|
|
11421
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11422
|
+
Form$2.Field,
|
|
11423
|
+
{
|
|
11424
|
+
control: form.control,
|
|
11425
|
+
name: "province",
|
|
11426
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
11427
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Province / State" }),
|
|
11428
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
11429
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
11430
|
+
] })
|
|
11431
|
+
}
|
|
11432
|
+
),
|
|
11433
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11434
|
+
Form$2.Field,
|
|
11435
|
+
{
|
|
11436
|
+
control: form.control,
|
|
11437
|
+
name: "phone",
|
|
11438
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
|
|
11439
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Phone" }),
|
|
11440
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
|
|
11441
|
+
/* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
|
|
11442
|
+
] })
|
|
11443
|
+
}
|
|
11444
|
+
)
|
|
11445
|
+
] }) }),
|
|
11446
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
11447
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
11448
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
|
|
11449
|
+
] }) })
|
|
11450
|
+
]
|
|
11451
|
+
}
|
|
11452
|
+
) });
|
|
11453
|
+
};
|
|
11454
|
+
const schema$3 = addressSchema;
|
|
11455
11455
|
const SalesChannel = () => {
|
|
11456
11456
|
const { id } = reactRouterDom.useParams();
|
|
11457
11457
|
const { draft_order, isPending, isError, error } = useDraftOrder(
|
|
@@ -13065,21 +13065,13 @@ const routeModule = {
|
|
|
13065
13065
|
loader,
|
|
13066
13066
|
children: [
|
|
13067
13067
|
{
|
|
13068
|
-
Component:
|
|
13069
|
-
path: "/draft-orders/:id/
|
|
13070
|
-
},
|
|
13071
|
-
{
|
|
13072
|
-
Component: CustomItems,
|
|
13073
|
-
path: "/draft-orders/:id/custom-items"
|
|
13068
|
+
Component: Items,
|
|
13069
|
+
path: "/draft-orders/:id/items"
|
|
13074
13070
|
},
|
|
13075
13071
|
{
|
|
13076
13072
|
Component: Email,
|
|
13077
13073
|
path: "/draft-orders/:id/email"
|
|
13078
13074
|
},
|
|
13079
|
-
{
|
|
13080
|
-
Component: Items,
|
|
13081
|
-
path: "/draft-orders/:id/items"
|
|
13082
|
-
},
|
|
13083
13075
|
{
|
|
13084
13076
|
Component: Metadata,
|
|
13085
13077
|
path: "/draft-orders/:id/metadata"
|
|
@@ -13088,6 +13080,14 @@ const routeModule = {
|
|
|
13088
13080
|
Component: Promotions,
|
|
13089
13081
|
path: "/draft-orders/:id/promotions"
|
|
13090
13082
|
},
|
|
13083
|
+
{
|
|
13084
|
+
Component: CustomItems,
|
|
13085
|
+
path: "/draft-orders/:id/custom-items"
|
|
13086
|
+
},
|
|
13087
|
+
{
|
|
13088
|
+
Component: BillingAddress,
|
|
13089
|
+
path: "/draft-orders/:id/billing-address"
|
|
13090
|
+
},
|
|
13091
13091
|
{
|
|
13092
13092
|
Component: SalesChannel,
|
|
13093
13093
|
path: "/draft-orders/:id/sales-channel"
|
|
@@ -9565,285 +9565,6 @@ const ID = () => {
|
|
|
9565
9565
|
/* @__PURE__ */ jsx(Outlet, {})
|
|
9566
9566
|
] });
|
|
9567
9567
|
};
|
|
9568
|
-
const BillingAddress = () => {
|
|
9569
|
-
const { id } = useParams();
|
|
9570
|
-
const { order, isPending, isError, error } = useOrder(id, {
|
|
9571
|
-
fields: "+billing_address"
|
|
9572
|
-
});
|
|
9573
|
-
if (isError) {
|
|
9574
|
-
throw error;
|
|
9575
|
-
}
|
|
9576
|
-
const isReady = !isPending && !!order;
|
|
9577
|
-
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
9578
|
-
/* @__PURE__ */ jsxs(RouteDrawer.Header, { children: [
|
|
9579
|
-
/* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Billing Address" }) }),
|
|
9580
|
-
/* @__PURE__ */ jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Edit the billing address for the draft order" }) })
|
|
9581
|
-
] }),
|
|
9582
|
-
isReady && /* @__PURE__ */ jsx(BillingAddressForm, { order })
|
|
9583
|
-
] });
|
|
9584
|
-
};
|
|
9585
|
-
const BillingAddressForm = ({ order }) => {
|
|
9586
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
9587
|
-
const form = useForm({
|
|
9588
|
-
defaultValues: {
|
|
9589
|
-
first_name: ((_a = order.billing_address) == null ? void 0 : _a.first_name) ?? "",
|
|
9590
|
-
last_name: ((_b = order.billing_address) == null ? void 0 : _b.last_name) ?? "",
|
|
9591
|
-
company: ((_c = order.billing_address) == null ? void 0 : _c.company) ?? "",
|
|
9592
|
-
address_1: ((_d = order.billing_address) == null ? void 0 : _d.address_1) ?? "",
|
|
9593
|
-
address_2: ((_e = order.billing_address) == null ? void 0 : _e.address_2) ?? "",
|
|
9594
|
-
city: ((_f = order.billing_address) == null ? void 0 : _f.city) ?? "",
|
|
9595
|
-
province: ((_g = order.billing_address) == null ? void 0 : _g.province) ?? "",
|
|
9596
|
-
country_code: ((_h = order.billing_address) == null ? void 0 : _h.country_code) ?? "",
|
|
9597
|
-
postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
|
|
9598
|
-
phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
|
|
9599
|
-
},
|
|
9600
|
-
resolver: zodResolver(schema$5)
|
|
9601
|
-
});
|
|
9602
|
-
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9603
|
-
const { handleSuccess } = useRouteModal();
|
|
9604
|
-
const onSubmit = form.handleSubmit(async (data) => {
|
|
9605
|
-
await mutateAsync(
|
|
9606
|
-
{ billing_address: data },
|
|
9607
|
-
{
|
|
9608
|
-
onSuccess: () => {
|
|
9609
|
-
handleSuccess();
|
|
9610
|
-
},
|
|
9611
|
-
onError: (error) => {
|
|
9612
|
-
toast.error(error.message);
|
|
9613
|
-
}
|
|
9614
|
-
}
|
|
9615
|
-
);
|
|
9616
|
-
});
|
|
9617
|
-
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(
|
|
9618
|
-
KeyboundForm,
|
|
9619
|
-
{
|
|
9620
|
-
className: "flex flex-1 flex-col overflow-hidden",
|
|
9621
|
-
onSubmit,
|
|
9622
|
-
children: [
|
|
9623
|
-
/* @__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: [
|
|
9624
|
-
/* @__PURE__ */ jsx(
|
|
9625
|
-
Form$2.Field,
|
|
9626
|
-
{
|
|
9627
|
-
control: form.control,
|
|
9628
|
-
name: "country_code",
|
|
9629
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
9630
|
-
/* @__PURE__ */ jsx(Form$2.Label, { children: "Country" }),
|
|
9631
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(CountrySelect, { ...field }) }),
|
|
9632
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
9633
|
-
] })
|
|
9634
|
-
}
|
|
9635
|
-
),
|
|
9636
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
9637
|
-
/* @__PURE__ */ jsx(
|
|
9638
|
-
Form$2.Field,
|
|
9639
|
-
{
|
|
9640
|
-
control: form.control,
|
|
9641
|
-
name: "first_name",
|
|
9642
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
9643
|
-
/* @__PURE__ */ jsx(Form$2.Label, { children: "First name" }),
|
|
9644
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
9645
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
9646
|
-
] })
|
|
9647
|
-
}
|
|
9648
|
-
),
|
|
9649
|
-
/* @__PURE__ */ jsx(
|
|
9650
|
-
Form$2.Field,
|
|
9651
|
-
{
|
|
9652
|
-
control: form.control,
|
|
9653
|
-
name: "last_name",
|
|
9654
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
9655
|
-
/* @__PURE__ */ jsx(Form$2.Label, { children: "Last name" }),
|
|
9656
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
9657
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
9658
|
-
] })
|
|
9659
|
-
}
|
|
9660
|
-
)
|
|
9661
|
-
] }),
|
|
9662
|
-
/* @__PURE__ */ jsx(
|
|
9663
|
-
Form$2.Field,
|
|
9664
|
-
{
|
|
9665
|
-
control: form.control,
|
|
9666
|
-
name: "company",
|
|
9667
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
9668
|
-
/* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Company" }),
|
|
9669
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
9670
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
9671
|
-
] })
|
|
9672
|
-
}
|
|
9673
|
-
),
|
|
9674
|
-
/* @__PURE__ */ jsx(
|
|
9675
|
-
Form$2.Field,
|
|
9676
|
-
{
|
|
9677
|
-
control: form.control,
|
|
9678
|
-
name: "address_1",
|
|
9679
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
9680
|
-
/* @__PURE__ */ jsx(Form$2.Label, { children: "Address" }),
|
|
9681
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
9682
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
9683
|
-
] })
|
|
9684
|
-
}
|
|
9685
|
-
),
|
|
9686
|
-
/* @__PURE__ */ jsx(
|
|
9687
|
-
Form$2.Field,
|
|
9688
|
-
{
|
|
9689
|
-
control: form.control,
|
|
9690
|
-
name: "address_2",
|
|
9691
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
9692
|
-
/* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Apartment, suite, etc." }),
|
|
9693
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
9694
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
9695
|
-
] })
|
|
9696
|
-
}
|
|
9697
|
-
),
|
|
9698
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
9699
|
-
/* @__PURE__ */ jsx(
|
|
9700
|
-
Form$2.Field,
|
|
9701
|
-
{
|
|
9702
|
-
control: form.control,
|
|
9703
|
-
name: "postal_code",
|
|
9704
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
9705
|
-
/* @__PURE__ */ jsx(Form$2.Label, { children: "Postal code" }),
|
|
9706
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
9707
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
9708
|
-
] })
|
|
9709
|
-
}
|
|
9710
|
-
),
|
|
9711
|
-
/* @__PURE__ */ jsx(
|
|
9712
|
-
Form$2.Field,
|
|
9713
|
-
{
|
|
9714
|
-
control: form.control,
|
|
9715
|
-
name: "city",
|
|
9716
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
9717
|
-
/* @__PURE__ */ jsx(Form$2.Label, { children: "City" }),
|
|
9718
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
9719
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
9720
|
-
] })
|
|
9721
|
-
}
|
|
9722
|
-
)
|
|
9723
|
-
] }),
|
|
9724
|
-
/* @__PURE__ */ jsx(
|
|
9725
|
-
Form$2.Field,
|
|
9726
|
-
{
|
|
9727
|
-
control: form.control,
|
|
9728
|
-
name: "province",
|
|
9729
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
9730
|
-
/* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Province / State" }),
|
|
9731
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
9732
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
9733
|
-
] })
|
|
9734
|
-
}
|
|
9735
|
-
),
|
|
9736
|
-
/* @__PURE__ */ jsx(
|
|
9737
|
-
Form$2.Field,
|
|
9738
|
-
{
|
|
9739
|
-
control: form.control,
|
|
9740
|
-
name: "phone",
|
|
9741
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
9742
|
-
/* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Phone" }),
|
|
9743
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
9744
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
9745
|
-
] })
|
|
9746
|
-
}
|
|
9747
|
-
)
|
|
9748
|
-
] }) }),
|
|
9749
|
-
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9750
|
-
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9751
|
-
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
|
|
9752
|
-
] }) })
|
|
9753
|
-
]
|
|
9754
|
-
}
|
|
9755
|
-
) });
|
|
9756
|
-
};
|
|
9757
|
-
const schema$5 = addressSchema;
|
|
9758
|
-
const CustomItems = () => {
|
|
9759
|
-
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
9760
|
-
/* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
|
|
9761
|
-
/* @__PURE__ */ jsx(CustomItemsForm, {})
|
|
9762
|
-
] });
|
|
9763
|
-
};
|
|
9764
|
-
const CustomItemsForm = () => {
|
|
9765
|
-
const form = useForm({
|
|
9766
|
-
resolver: zodResolver(schema$4)
|
|
9767
|
-
});
|
|
9768
|
-
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9769
|
-
/* @__PURE__ */ jsx(RouteDrawer.Body, {}),
|
|
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", children: "Save" })
|
|
9773
|
-
] }) })
|
|
9774
|
-
] }) });
|
|
9775
|
-
};
|
|
9776
|
-
const schema$4 = objectType({
|
|
9777
|
-
email: stringType().email()
|
|
9778
|
-
});
|
|
9779
|
-
const Email = () => {
|
|
9780
|
-
const { id } = useParams();
|
|
9781
|
-
const { order, isPending, isError, error } = useOrder(id, {
|
|
9782
|
-
fields: "+email"
|
|
9783
|
-
});
|
|
9784
|
-
if (isError) {
|
|
9785
|
-
throw error;
|
|
9786
|
-
}
|
|
9787
|
-
const isReady = !isPending && !!order;
|
|
9788
|
-
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
9789
|
-
/* @__PURE__ */ jsxs(RouteDrawer.Header, { children: [
|
|
9790
|
-
/* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Email" }) }),
|
|
9791
|
-
/* @__PURE__ */ jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Edit the email for the draft order" }) })
|
|
9792
|
-
] }),
|
|
9793
|
-
isReady && /* @__PURE__ */ jsx(EmailForm, { order })
|
|
9794
|
-
] });
|
|
9795
|
-
};
|
|
9796
|
-
const EmailForm = ({ order }) => {
|
|
9797
|
-
const form = useForm({
|
|
9798
|
-
defaultValues: {
|
|
9799
|
-
email: order.email ?? ""
|
|
9800
|
-
},
|
|
9801
|
-
resolver: zodResolver(schema$3)
|
|
9802
|
-
});
|
|
9803
|
-
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9804
|
-
const { handleSuccess } = useRouteModal();
|
|
9805
|
-
const onSubmit = form.handleSubmit(async (data) => {
|
|
9806
|
-
await mutateAsync(
|
|
9807
|
-
{ email: data.email },
|
|
9808
|
-
{
|
|
9809
|
-
onSuccess: () => {
|
|
9810
|
-
handleSuccess();
|
|
9811
|
-
},
|
|
9812
|
-
onError: (error) => {
|
|
9813
|
-
toast.error(error.message);
|
|
9814
|
-
}
|
|
9815
|
-
}
|
|
9816
|
-
);
|
|
9817
|
-
});
|
|
9818
|
-
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(
|
|
9819
|
-
KeyboundForm,
|
|
9820
|
-
{
|
|
9821
|
-
className: "flex flex-1 flex-col overflow-hidden",
|
|
9822
|
-
onSubmit,
|
|
9823
|
-
children: [
|
|
9824
|
-
/* @__PURE__ */ jsx(RouteDrawer.Body, { className: "flex flex-col gap-y-6 overflow-y-auto", children: /* @__PURE__ */ jsx(
|
|
9825
|
-
Form$2.Field,
|
|
9826
|
-
{
|
|
9827
|
-
control: form.control,
|
|
9828
|
-
name: "email",
|
|
9829
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
9830
|
-
/* @__PURE__ */ jsx(Form$2.Label, { children: "Email" }),
|
|
9831
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
9832
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
9833
|
-
] })
|
|
9834
|
-
}
|
|
9835
|
-
) }),
|
|
9836
|
-
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9837
|
-
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9838
|
-
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
|
|
9839
|
-
] }) })
|
|
9840
|
-
]
|
|
9841
|
-
}
|
|
9842
|
-
) });
|
|
9843
|
-
};
|
|
9844
|
-
const schema$3 = objectType({
|
|
9845
|
-
email: stringType().email()
|
|
9846
|
-
});
|
|
9847
9568
|
const NumberInput = forwardRef(
|
|
9848
9569
|
({
|
|
9849
9570
|
value,
|
|
@@ -10803,20 +10524,88 @@ const CustomItemForm = ({ orderId, currencyCode }) => {
|
|
|
10803
10524
|
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx("div", { className: "w-full flex-1", children: /* @__PURE__ */ jsx(NumberInput, { ...field, className: "w-full" }) }) }),
|
|
10804
10525
|
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
10805
10526
|
] })
|
|
10806
|
-
] }) })
|
|
10807
|
-
}
|
|
10808
|
-
)
|
|
10809
|
-
] }) }) }),
|
|
10810
|
-
/* @__PURE__ */ jsx(StackedFocusModal.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
|
|
10811
|
-
/* @__PURE__ */ jsx(StackedFocusModal.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", type: "button", children: "Cancel" }) }),
|
|
10812
|
-
/* @__PURE__ */ jsx(Button, { size: "small", type: "button", onClick: onSubmit, children: "Add item" })
|
|
10813
|
-
] }) })
|
|
10814
|
-
] }) }) });
|
|
10527
|
+
] }) })
|
|
10528
|
+
}
|
|
10529
|
+
)
|
|
10530
|
+
] }) }) }),
|
|
10531
|
+
/* @__PURE__ */ jsx(StackedFocusModal.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
|
|
10532
|
+
/* @__PURE__ */ jsx(StackedFocusModal.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", type: "button", children: "Cancel" }) }),
|
|
10533
|
+
/* @__PURE__ */ jsx(Button, { size: "small", type: "button", onClick: onSubmit, children: "Add item" })
|
|
10534
|
+
] }) })
|
|
10535
|
+
] }) }) });
|
|
10536
|
+
};
|
|
10537
|
+
const customItemSchema = objectType({
|
|
10538
|
+
title: stringType().min(1),
|
|
10539
|
+
quantity: numberType(),
|
|
10540
|
+
unit_price: unionType([numberType(), stringType()])
|
|
10541
|
+
});
|
|
10542
|
+
const Email = () => {
|
|
10543
|
+
const { id } = useParams();
|
|
10544
|
+
const { order, isPending, isError, error } = useOrder(id, {
|
|
10545
|
+
fields: "+email"
|
|
10546
|
+
});
|
|
10547
|
+
if (isError) {
|
|
10548
|
+
throw error;
|
|
10549
|
+
}
|
|
10550
|
+
const isReady = !isPending && !!order;
|
|
10551
|
+
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
10552
|
+
/* @__PURE__ */ jsxs(RouteDrawer.Header, { children: [
|
|
10553
|
+
/* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Email" }) }),
|
|
10554
|
+
/* @__PURE__ */ jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Edit the email for the draft order" }) })
|
|
10555
|
+
] }),
|
|
10556
|
+
isReady && /* @__PURE__ */ jsx(EmailForm, { order })
|
|
10557
|
+
] });
|
|
10558
|
+
};
|
|
10559
|
+
const EmailForm = ({ order }) => {
|
|
10560
|
+
const form = useForm({
|
|
10561
|
+
defaultValues: {
|
|
10562
|
+
email: order.email ?? ""
|
|
10563
|
+
},
|
|
10564
|
+
resolver: zodResolver(schema$5)
|
|
10565
|
+
});
|
|
10566
|
+
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
10567
|
+
const { handleSuccess } = useRouteModal();
|
|
10568
|
+
const onSubmit = form.handleSubmit(async (data) => {
|
|
10569
|
+
await mutateAsync(
|
|
10570
|
+
{ email: data.email },
|
|
10571
|
+
{
|
|
10572
|
+
onSuccess: () => {
|
|
10573
|
+
handleSuccess();
|
|
10574
|
+
},
|
|
10575
|
+
onError: (error) => {
|
|
10576
|
+
toast.error(error.message);
|
|
10577
|
+
}
|
|
10578
|
+
}
|
|
10579
|
+
);
|
|
10580
|
+
});
|
|
10581
|
+
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(
|
|
10582
|
+
KeyboundForm,
|
|
10583
|
+
{
|
|
10584
|
+
className: "flex flex-1 flex-col overflow-hidden",
|
|
10585
|
+
onSubmit,
|
|
10586
|
+
children: [
|
|
10587
|
+
/* @__PURE__ */ jsx(RouteDrawer.Body, { className: "flex flex-col gap-y-6 overflow-y-auto", children: /* @__PURE__ */ jsx(
|
|
10588
|
+
Form$2.Field,
|
|
10589
|
+
{
|
|
10590
|
+
control: form.control,
|
|
10591
|
+
name: "email",
|
|
10592
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
10593
|
+
/* @__PURE__ */ jsx(Form$2.Label, { children: "Email" }),
|
|
10594
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
10595
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
10596
|
+
] })
|
|
10597
|
+
}
|
|
10598
|
+
) }),
|
|
10599
|
+
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
10600
|
+
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
10601
|
+
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
|
|
10602
|
+
] }) })
|
|
10603
|
+
]
|
|
10604
|
+
}
|
|
10605
|
+
) });
|
|
10815
10606
|
};
|
|
10816
|
-
const
|
|
10817
|
-
|
|
10818
|
-
quantity: numberType(),
|
|
10819
|
-
unit_price: unionType([numberType(), stringType()])
|
|
10607
|
+
const schema$5 = objectType({
|
|
10608
|
+
email: stringType().email()
|
|
10820
10609
|
});
|
|
10821
10610
|
const InlineTip = forwardRef(
|
|
10822
10611
|
({ variant = "tip", label, className, children, ...props }, ref) => {
|
|
@@ -11445,6 +11234,217 @@ function getPromotionIds(items, shippingMethods) {
|
|
|
11445
11234
|
}
|
|
11446
11235
|
return Array.from(promotionIds);
|
|
11447
11236
|
}
|
|
11237
|
+
const CustomItems = () => {
|
|
11238
|
+
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
11239
|
+
/* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
|
|
11240
|
+
/* @__PURE__ */ jsx(CustomItemsForm, {})
|
|
11241
|
+
] });
|
|
11242
|
+
};
|
|
11243
|
+
const CustomItemsForm = () => {
|
|
11244
|
+
const form = useForm({
|
|
11245
|
+
resolver: zodResolver(schema$4)
|
|
11246
|
+
});
|
|
11247
|
+
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
11248
|
+
/* @__PURE__ */ jsx(RouteDrawer.Body, {}),
|
|
11249
|
+
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
11250
|
+
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
11251
|
+
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
|
|
11252
|
+
] }) })
|
|
11253
|
+
] }) });
|
|
11254
|
+
};
|
|
11255
|
+
const schema$4 = objectType({
|
|
11256
|
+
email: stringType().email()
|
|
11257
|
+
});
|
|
11258
|
+
const BillingAddress = () => {
|
|
11259
|
+
const { id } = useParams();
|
|
11260
|
+
const { order, isPending, isError, error } = useOrder(id, {
|
|
11261
|
+
fields: "+billing_address"
|
|
11262
|
+
});
|
|
11263
|
+
if (isError) {
|
|
11264
|
+
throw error;
|
|
11265
|
+
}
|
|
11266
|
+
const isReady = !isPending && !!order;
|
|
11267
|
+
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
11268
|
+
/* @__PURE__ */ jsxs(RouteDrawer.Header, { children: [
|
|
11269
|
+
/* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Billing Address" }) }),
|
|
11270
|
+
/* @__PURE__ */ jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Edit the billing address for the draft order" }) })
|
|
11271
|
+
] }),
|
|
11272
|
+
isReady && /* @__PURE__ */ jsx(BillingAddressForm, { order })
|
|
11273
|
+
] });
|
|
11274
|
+
};
|
|
11275
|
+
const BillingAddressForm = ({ order }) => {
|
|
11276
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
11277
|
+
const form = useForm({
|
|
11278
|
+
defaultValues: {
|
|
11279
|
+
first_name: ((_a = order.billing_address) == null ? void 0 : _a.first_name) ?? "",
|
|
11280
|
+
last_name: ((_b = order.billing_address) == null ? void 0 : _b.last_name) ?? "",
|
|
11281
|
+
company: ((_c = order.billing_address) == null ? void 0 : _c.company) ?? "",
|
|
11282
|
+
address_1: ((_d = order.billing_address) == null ? void 0 : _d.address_1) ?? "",
|
|
11283
|
+
address_2: ((_e = order.billing_address) == null ? void 0 : _e.address_2) ?? "",
|
|
11284
|
+
city: ((_f = order.billing_address) == null ? void 0 : _f.city) ?? "",
|
|
11285
|
+
province: ((_g = order.billing_address) == null ? void 0 : _g.province) ?? "",
|
|
11286
|
+
country_code: ((_h = order.billing_address) == null ? void 0 : _h.country_code) ?? "",
|
|
11287
|
+
postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
|
|
11288
|
+
phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
|
|
11289
|
+
},
|
|
11290
|
+
resolver: zodResolver(schema$3)
|
|
11291
|
+
});
|
|
11292
|
+
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
11293
|
+
const { handleSuccess } = useRouteModal();
|
|
11294
|
+
const onSubmit = form.handleSubmit(async (data) => {
|
|
11295
|
+
await mutateAsync(
|
|
11296
|
+
{ billing_address: data },
|
|
11297
|
+
{
|
|
11298
|
+
onSuccess: () => {
|
|
11299
|
+
handleSuccess();
|
|
11300
|
+
},
|
|
11301
|
+
onError: (error) => {
|
|
11302
|
+
toast.error(error.message);
|
|
11303
|
+
}
|
|
11304
|
+
}
|
|
11305
|
+
);
|
|
11306
|
+
});
|
|
11307
|
+
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(
|
|
11308
|
+
KeyboundForm,
|
|
11309
|
+
{
|
|
11310
|
+
className: "flex flex-1 flex-col overflow-hidden",
|
|
11311
|
+
onSubmit,
|
|
11312
|
+
children: [
|
|
11313
|
+
/* @__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: [
|
|
11314
|
+
/* @__PURE__ */ jsx(
|
|
11315
|
+
Form$2.Field,
|
|
11316
|
+
{
|
|
11317
|
+
control: form.control,
|
|
11318
|
+
name: "country_code",
|
|
11319
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
11320
|
+
/* @__PURE__ */ jsx(Form$2.Label, { children: "Country" }),
|
|
11321
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(CountrySelect, { ...field }) }),
|
|
11322
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
11323
|
+
] })
|
|
11324
|
+
}
|
|
11325
|
+
),
|
|
11326
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
11327
|
+
/* @__PURE__ */ jsx(
|
|
11328
|
+
Form$2.Field,
|
|
11329
|
+
{
|
|
11330
|
+
control: form.control,
|
|
11331
|
+
name: "first_name",
|
|
11332
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
11333
|
+
/* @__PURE__ */ jsx(Form$2.Label, { children: "First name" }),
|
|
11334
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
11335
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
11336
|
+
] })
|
|
11337
|
+
}
|
|
11338
|
+
),
|
|
11339
|
+
/* @__PURE__ */ jsx(
|
|
11340
|
+
Form$2.Field,
|
|
11341
|
+
{
|
|
11342
|
+
control: form.control,
|
|
11343
|
+
name: "last_name",
|
|
11344
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
11345
|
+
/* @__PURE__ */ jsx(Form$2.Label, { children: "Last name" }),
|
|
11346
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
11347
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
11348
|
+
] })
|
|
11349
|
+
}
|
|
11350
|
+
)
|
|
11351
|
+
] }),
|
|
11352
|
+
/* @__PURE__ */ jsx(
|
|
11353
|
+
Form$2.Field,
|
|
11354
|
+
{
|
|
11355
|
+
control: form.control,
|
|
11356
|
+
name: "company",
|
|
11357
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
11358
|
+
/* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Company" }),
|
|
11359
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
11360
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
11361
|
+
] })
|
|
11362
|
+
}
|
|
11363
|
+
),
|
|
11364
|
+
/* @__PURE__ */ jsx(
|
|
11365
|
+
Form$2.Field,
|
|
11366
|
+
{
|
|
11367
|
+
control: form.control,
|
|
11368
|
+
name: "address_1",
|
|
11369
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
11370
|
+
/* @__PURE__ */ jsx(Form$2.Label, { children: "Address" }),
|
|
11371
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
11372
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
11373
|
+
] })
|
|
11374
|
+
}
|
|
11375
|
+
),
|
|
11376
|
+
/* @__PURE__ */ jsx(
|
|
11377
|
+
Form$2.Field,
|
|
11378
|
+
{
|
|
11379
|
+
control: form.control,
|
|
11380
|
+
name: "address_2",
|
|
11381
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
11382
|
+
/* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Apartment, suite, etc." }),
|
|
11383
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
11384
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
11385
|
+
] })
|
|
11386
|
+
}
|
|
11387
|
+
),
|
|
11388
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
11389
|
+
/* @__PURE__ */ jsx(
|
|
11390
|
+
Form$2.Field,
|
|
11391
|
+
{
|
|
11392
|
+
control: form.control,
|
|
11393
|
+
name: "postal_code",
|
|
11394
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
11395
|
+
/* @__PURE__ */ jsx(Form$2.Label, { children: "Postal code" }),
|
|
11396
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
11397
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
11398
|
+
] })
|
|
11399
|
+
}
|
|
11400
|
+
),
|
|
11401
|
+
/* @__PURE__ */ jsx(
|
|
11402
|
+
Form$2.Field,
|
|
11403
|
+
{
|
|
11404
|
+
control: form.control,
|
|
11405
|
+
name: "city",
|
|
11406
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
11407
|
+
/* @__PURE__ */ jsx(Form$2.Label, { children: "City" }),
|
|
11408
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
11409
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
11410
|
+
] })
|
|
11411
|
+
}
|
|
11412
|
+
)
|
|
11413
|
+
] }),
|
|
11414
|
+
/* @__PURE__ */ jsx(
|
|
11415
|
+
Form$2.Field,
|
|
11416
|
+
{
|
|
11417
|
+
control: form.control,
|
|
11418
|
+
name: "province",
|
|
11419
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
11420
|
+
/* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Province / State" }),
|
|
11421
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
11422
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
11423
|
+
] })
|
|
11424
|
+
}
|
|
11425
|
+
),
|
|
11426
|
+
/* @__PURE__ */ jsx(
|
|
11427
|
+
Form$2.Field,
|
|
11428
|
+
{
|
|
11429
|
+
control: form.control,
|
|
11430
|
+
name: "phone",
|
|
11431
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
11432
|
+
/* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Phone" }),
|
|
11433
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
11434
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
11435
|
+
] })
|
|
11436
|
+
}
|
|
11437
|
+
)
|
|
11438
|
+
] }) }),
|
|
11439
|
+
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
11440
|
+
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
11441
|
+
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
|
|
11442
|
+
] }) })
|
|
11443
|
+
]
|
|
11444
|
+
}
|
|
11445
|
+
) });
|
|
11446
|
+
};
|
|
11447
|
+
const schema$3 = addressSchema;
|
|
11448
11448
|
const SalesChannel = () => {
|
|
11449
11449
|
const { id } = useParams();
|
|
11450
11450
|
const { draft_order, isPending, isError, error } = useDraftOrder(
|
|
@@ -13058,21 +13058,13 @@ const routeModule = {
|
|
|
13058
13058
|
loader,
|
|
13059
13059
|
children: [
|
|
13060
13060
|
{
|
|
13061
|
-
Component:
|
|
13062
|
-
path: "/draft-orders/:id/
|
|
13063
|
-
},
|
|
13064
|
-
{
|
|
13065
|
-
Component: CustomItems,
|
|
13066
|
-
path: "/draft-orders/:id/custom-items"
|
|
13061
|
+
Component: Items,
|
|
13062
|
+
path: "/draft-orders/:id/items"
|
|
13067
13063
|
},
|
|
13068
13064
|
{
|
|
13069
13065
|
Component: Email,
|
|
13070
13066
|
path: "/draft-orders/:id/email"
|
|
13071
13067
|
},
|
|
13072
|
-
{
|
|
13073
|
-
Component: Items,
|
|
13074
|
-
path: "/draft-orders/:id/items"
|
|
13075
|
-
},
|
|
13076
13068
|
{
|
|
13077
13069
|
Component: Metadata,
|
|
13078
13070
|
path: "/draft-orders/:id/metadata"
|
|
@@ -13081,6 +13073,14 @@ const routeModule = {
|
|
|
13081
13073
|
Component: Promotions,
|
|
13082
13074
|
path: "/draft-orders/:id/promotions"
|
|
13083
13075
|
},
|
|
13076
|
+
{
|
|
13077
|
+
Component: CustomItems,
|
|
13078
|
+
path: "/draft-orders/:id/custom-items"
|
|
13079
|
+
},
|
|
13080
|
+
{
|
|
13081
|
+
Component: BillingAddress,
|
|
13082
|
+
path: "/draft-orders/:id/billing-address"
|
|
13083
|
+
},
|
|
13084
13084
|
{
|
|
13085
13085
|
Component: SalesChannel,
|
|
13086
13086
|
path: "/draft-orders/:id/sales-channel"
|
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-20251101060137",
|
|
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-20251101060137",
|
|
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-20251101060137",
|
|
52
|
+
"@medusajs/cli": "2.11.3-preview-20251101060137",
|
|
53
|
+
"@medusajs/framework": "2.11.3-preview-20251101060137",
|
|
54
|
+
"@medusajs/icons": "2.11.3-preview-20251101060137",
|
|
55
|
+
"@medusajs/test-utils": "2.11.3-preview-20251101060137",
|
|
56
|
+
"@medusajs/types": "2.11.3-preview-20251101060137",
|
|
57
|
+
"@medusajs/ui": "4.0.27-preview-20251101060137",
|
|
58
|
+
"@medusajs/ui-preset": "2.11.3-preview-20251101060137",
|
|
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-20251101060137",
|
|
77
|
+
"@medusajs/cli": "2.11.3-preview-20251101060137",
|
|
78
|
+
"@medusajs/framework": "2.11.3-preview-20251101060137",
|
|
79
|
+
"@medusajs/icons": "2.11.3-preview-20251101060137",
|
|
80
|
+
"@medusajs/test-utils": "2.11.3-preview-20251101060137",
|
|
81
|
+
"@medusajs/ui": "4.0.27-preview-20251101060137",
|
|
82
82
|
"react": "^18.3.1",
|
|
83
83
|
"react-dom": "^18.3.1",
|
|
84
84
|
"react-router-dom": "6.20.1"
|