@medusajs/draft-order 2.11.2-snapshot-20251028102245 → 2.11.2-snapshot-20251029124358

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.
@@ -11536,209 +11536,6 @@ const SalesChannelField = ({ control, order }) => {
11536
11536
  const schema$3 = objectType({
11537
11537
  sales_channel_id: stringType().min(1)
11538
11538
  });
11539
- const ShippingAddress = () => {
11540
- const { id } = reactRouterDom.useParams();
11541
- const { order, isPending, isError, error } = useOrder(id, {
11542
- fields: "+shipping_address"
11543
- });
11544
- if (isError) {
11545
- throw error;
11546
- }
11547
- const isReady = !isPending && !!order;
11548
- return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
11549
- /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer.Header, { children: [
11550
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Shipping Address" }) }),
11551
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Edit the shipping address for the draft order" }) })
11552
- ] }),
11553
- isReady && /* @__PURE__ */ jsxRuntime.jsx(ShippingAddressForm, { order })
11554
- ] });
11555
- };
11556
- const ShippingAddressForm = ({ order }) => {
11557
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
11558
- const form = reactHookForm.useForm({
11559
- defaultValues: {
11560
- first_name: ((_a = order.shipping_address) == null ? void 0 : _a.first_name) ?? "",
11561
- last_name: ((_b = order.shipping_address) == null ? void 0 : _b.last_name) ?? "",
11562
- company: ((_c = order.shipping_address) == null ? void 0 : _c.company) ?? "",
11563
- address_1: ((_d = order.shipping_address) == null ? void 0 : _d.address_1) ?? "",
11564
- address_2: ((_e = order.shipping_address) == null ? void 0 : _e.address_2) ?? "",
11565
- city: ((_f = order.shipping_address) == null ? void 0 : _f.city) ?? "",
11566
- province: ((_g = order.shipping_address) == null ? void 0 : _g.province) ?? "",
11567
- country_code: ((_h = order.shipping_address) == null ? void 0 : _h.country_code) ?? "",
11568
- postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
11569
- phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
11570
- },
11571
- resolver: zod.zodResolver(schema$2)
11572
- });
11573
- const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
11574
- const { handleSuccess } = useRouteModal();
11575
- const onSubmit = form.handleSubmit(async (data) => {
11576
- await mutateAsync(
11577
- {
11578
- shipping_address: {
11579
- first_name: data.first_name,
11580
- last_name: data.last_name,
11581
- company: data.company,
11582
- address_1: data.address_1,
11583
- address_2: data.address_2,
11584
- city: data.city,
11585
- province: data.province,
11586
- country_code: data.country_code,
11587
- postal_code: data.postal_code,
11588
- phone: data.phone
11589
- }
11590
- },
11591
- {
11592
- onSuccess: () => {
11593
- handleSuccess();
11594
- },
11595
- onError: (error) => {
11596
- ui.toast.error(error.message);
11597
- }
11598
- }
11599
- );
11600
- });
11601
- return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(
11602
- KeyboundForm,
11603
- {
11604
- className: "flex flex-1 flex-col overflow-hidden",
11605
- onSubmit,
11606
- children: [
11607
- /* @__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: [
11608
- /* @__PURE__ */ jsxRuntime.jsx(
11609
- Form$2.Field,
11610
- {
11611
- control: form.control,
11612
- name: "country_code",
11613
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11614
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Country" }),
11615
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(CountrySelect, { ...field }) }),
11616
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11617
- ] })
11618
- }
11619
- ),
11620
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
11621
- /* @__PURE__ */ jsxRuntime.jsx(
11622
- Form$2.Field,
11623
- {
11624
- control: form.control,
11625
- name: "first_name",
11626
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11627
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "First name" }),
11628
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11629
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11630
- ] })
11631
- }
11632
- ),
11633
- /* @__PURE__ */ jsxRuntime.jsx(
11634
- Form$2.Field,
11635
- {
11636
- control: form.control,
11637
- name: "last_name",
11638
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11639
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Last name" }),
11640
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11641
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11642
- ] })
11643
- }
11644
- )
11645
- ] }),
11646
- /* @__PURE__ */ jsxRuntime.jsx(
11647
- Form$2.Field,
11648
- {
11649
- control: form.control,
11650
- name: "company",
11651
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11652
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Company" }),
11653
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11654
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11655
- ] })
11656
- }
11657
- ),
11658
- /* @__PURE__ */ jsxRuntime.jsx(
11659
- Form$2.Field,
11660
- {
11661
- control: form.control,
11662
- name: "address_1",
11663
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11664
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Address" }),
11665
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11666
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11667
- ] })
11668
- }
11669
- ),
11670
- /* @__PURE__ */ jsxRuntime.jsx(
11671
- Form$2.Field,
11672
- {
11673
- control: form.control,
11674
- name: "address_2",
11675
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11676
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Apartment, suite, etc." }),
11677
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11678
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11679
- ] })
11680
- }
11681
- ),
11682
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
11683
- /* @__PURE__ */ jsxRuntime.jsx(
11684
- Form$2.Field,
11685
- {
11686
- control: form.control,
11687
- name: "postal_code",
11688
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11689
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Postal code" }),
11690
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11691
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11692
- ] })
11693
- }
11694
- ),
11695
- /* @__PURE__ */ jsxRuntime.jsx(
11696
- Form$2.Field,
11697
- {
11698
- control: form.control,
11699
- name: "city",
11700
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11701
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "City" }),
11702
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11703
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11704
- ] })
11705
- }
11706
- )
11707
- ] }),
11708
- /* @__PURE__ */ jsxRuntime.jsx(
11709
- Form$2.Field,
11710
- {
11711
- control: form.control,
11712
- name: "province",
11713
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11714
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Province / State" }),
11715
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11716
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11717
- ] })
11718
- }
11719
- ),
11720
- /* @__PURE__ */ jsxRuntime.jsx(
11721
- Form$2.Field,
11722
- {
11723
- control: form.control,
11724
- name: "phone",
11725
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11726
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Phone" }),
11727
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11728
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11729
- ] })
11730
- }
11731
- )
11732
- ] }) }),
11733
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
11734
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
11735
- /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
11736
- ] }) })
11737
- ]
11738
- }
11739
- ) });
11740
- };
11741
- const schema$2 = addressSchema;
11742
11539
  const STACKED_FOCUS_MODAL_ID = "shipping-form";
11743
11540
  const Shipping = () => {
11744
11541
  var _a;
@@ -12546,6 +12343,209 @@ const CustomAmountField = ({
12546
12343
  }
12547
12344
  );
12548
12345
  };
12346
+ const ShippingAddress = () => {
12347
+ const { id } = reactRouterDom.useParams();
12348
+ const { order, isPending, isError, error } = useOrder(id, {
12349
+ fields: "+shipping_address"
12350
+ });
12351
+ if (isError) {
12352
+ throw error;
12353
+ }
12354
+ const isReady = !isPending && !!order;
12355
+ return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
12356
+ /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer.Header, { children: [
12357
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Shipping Address" }) }),
12358
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Edit the shipping address for the draft order" }) })
12359
+ ] }),
12360
+ isReady && /* @__PURE__ */ jsxRuntime.jsx(ShippingAddressForm, { order })
12361
+ ] });
12362
+ };
12363
+ const ShippingAddressForm = ({ order }) => {
12364
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
12365
+ const form = reactHookForm.useForm({
12366
+ defaultValues: {
12367
+ first_name: ((_a = order.shipping_address) == null ? void 0 : _a.first_name) ?? "",
12368
+ last_name: ((_b = order.shipping_address) == null ? void 0 : _b.last_name) ?? "",
12369
+ company: ((_c = order.shipping_address) == null ? void 0 : _c.company) ?? "",
12370
+ address_1: ((_d = order.shipping_address) == null ? void 0 : _d.address_1) ?? "",
12371
+ address_2: ((_e = order.shipping_address) == null ? void 0 : _e.address_2) ?? "",
12372
+ city: ((_f = order.shipping_address) == null ? void 0 : _f.city) ?? "",
12373
+ province: ((_g = order.shipping_address) == null ? void 0 : _g.province) ?? "",
12374
+ country_code: ((_h = order.shipping_address) == null ? void 0 : _h.country_code) ?? "",
12375
+ postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
12376
+ phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
12377
+ },
12378
+ resolver: zod.zodResolver(schema$2)
12379
+ });
12380
+ const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12381
+ const { handleSuccess } = useRouteModal();
12382
+ const onSubmit = form.handleSubmit(async (data) => {
12383
+ await mutateAsync(
12384
+ {
12385
+ shipping_address: {
12386
+ first_name: data.first_name,
12387
+ last_name: data.last_name,
12388
+ company: data.company,
12389
+ address_1: data.address_1,
12390
+ address_2: data.address_2,
12391
+ city: data.city,
12392
+ province: data.province,
12393
+ country_code: data.country_code,
12394
+ postal_code: data.postal_code,
12395
+ phone: data.phone
12396
+ }
12397
+ },
12398
+ {
12399
+ onSuccess: () => {
12400
+ handleSuccess();
12401
+ },
12402
+ onError: (error) => {
12403
+ ui.toast.error(error.message);
12404
+ }
12405
+ }
12406
+ );
12407
+ });
12408
+ return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(
12409
+ KeyboundForm,
12410
+ {
12411
+ className: "flex flex-1 flex-col overflow-hidden",
12412
+ onSubmit,
12413
+ children: [
12414
+ /* @__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: [
12415
+ /* @__PURE__ */ jsxRuntime.jsx(
12416
+ Form$2.Field,
12417
+ {
12418
+ control: form.control,
12419
+ name: "country_code",
12420
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12421
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Country" }),
12422
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(CountrySelect, { ...field }) }),
12423
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12424
+ ] })
12425
+ }
12426
+ ),
12427
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
12428
+ /* @__PURE__ */ jsxRuntime.jsx(
12429
+ Form$2.Field,
12430
+ {
12431
+ control: form.control,
12432
+ name: "first_name",
12433
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12434
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "First name" }),
12435
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12436
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12437
+ ] })
12438
+ }
12439
+ ),
12440
+ /* @__PURE__ */ jsxRuntime.jsx(
12441
+ Form$2.Field,
12442
+ {
12443
+ control: form.control,
12444
+ name: "last_name",
12445
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12446
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Last name" }),
12447
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12448
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12449
+ ] })
12450
+ }
12451
+ )
12452
+ ] }),
12453
+ /* @__PURE__ */ jsxRuntime.jsx(
12454
+ Form$2.Field,
12455
+ {
12456
+ control: form.control,
12457
+ name: "company",
12458
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12459
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Company" }),
12460
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12461
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12462
+ ] })
12463
+ }
12464
+ ),
12465
+ /* @__PURE__ */ jsxRuntime.jsx(
12466
+ Form$2.Field,
12467
+ {
12468
+ control: form.control,
12469
+ name: "address_1",
12470
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12471
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Address" }),
12472
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12473
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12474
+ ] })
12475
+ }
12476
+ ),
12477
+ /* @__PURE__ */ jsxRuntime.jsx(
12478
+ Form$2.Field,
12479
+ {
12480
+ control: form.control,
12481
+ name: "address_2",
12482
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12483
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Apartment, suite, etc." }),
12484
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12485
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12486
+ ] })
12487
+ }
12488
+ ),
12489
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
12490
+ /* @__PURE__ */ jsxRuntime.jsx(
12491
+ Form$2.Field,
12492
+ {
12493
+ control: form.control,
12494
+ name: "postal_code",
12495
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12496
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Postal code" }),
12497
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12498
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12499
+ ] })
12500
+ }
12501
+ ),
12502
+ /* @__PURE__ */ jsxRuntime.jsx(
12503
+ Form$2.Field,
12504
+ {
12505
+ control: form.control,
12506
+ name: "city",
12507
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12508
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "City" }),
12509
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12510
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12511
+ ] })
12512
+ }
12513
+ )
12514
+ ] }),
12515
+ /* @__PURE__ */ jsxRuntime.jsx(
12516
+ Form$2.Field,
12517
+ {
12518
+ control: form.control,
12519
+ name: "province",
12520
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12521
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Province / State" }),
12522
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12523
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12524
+ ] })
12525
+ }
12526
+ ),
12527
+ /* @__PURE__ */ jsxRuntime.jsx(
12528
+ Form$2.Field,
12529
+ {
12530
+ control: form.control,
12531
+ name: "phone",
12532
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12533
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Phone" }),
12534
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12535
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12536
+ ] })
12537
+ }
12538
+ )
12539
+ ] }) }),
12540
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
12541
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
12542
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
12543
+ ] }) })
12544
+ ]
12545
+ }
12546
+ ) });
12547
+ };
12548
+ const schema$2 = addressSchema;
12549
12549
  const TransferOwnership = () => {
12550
12550
  const { id } = reactRouterDom.useParams();
12551
12551
  const { draft_order, isPending, isError, error } = useDraftOrder(id, {
@@ -13087,14 +13087,14 @@ const routeModule = {
13087
13087
  Component: SalesChannel,
13088
13088
  path: "/draft-orders/:id/sales-channel"
13089
13089
  },
13090
- {
13091
- Component: ShippingAddress,
13092
- path: "/draft-orders/:id/shipping-address"
13093
- },
13094
13090
  {
13095
13091
  Component: Shipping,
13096
13092
  path: "/draft-orders/:id/shipping"
13097
13093
  },
13094
+ {
13095
+ Component: ShippingAddress,
13096
+ path: "/draft-orders/:id/shipping-address"
13097
+ },
13098
13098
  {
13099
13099
  Component: TransferOwnership,
13100
13100
  path: "/draft-orders/:id/transfer-ownership"
@@ -11530,209 +11530,6 @@ const SalesChannelField = ({ control, order }) => {
11530
11530
  const schema$3 = objectType({
11531
11531
  sales_channel_id: stringType().min(1)
11532
11532
  });
11533
- const ShippingAddress = () => {
11534
- const { id } = useParams();
11535
- const { order, isPending, isError, error } = useOrder(id, {
11536
- fields: "+shipping_address"
11537
- });
11538
- if (isError) {
11539
- throw error;
11540
- }
11541
- const isReady = !isPending && !!order;
11542
- return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
11543
- /* @__PURE__ */ jsxs(RouteDrawer.Header, { children: [
11544
- /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Shipping Address" }) }),
11545
- /* @__PURE__ */ jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Edit the shipping address for the draft order" }) })
11546
- ] }),
11547
- isReady && /* @__PURE__ */ jsx(ShippingAddressForm, { order })
11548
- ] });
11549
- };
11550
- const ShippingAddressForm = ({ order }) => {
11551
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
11552
- const form = useForm({
11553
- defaultValues: {
11554
- first_name: ((_a = order.shipping_address) == null ? void 0 : _a.first_name) ?? "",
11555
- last_name: ((_b = order.shipping_address) == null ? void 0 : _b.last_name) ?? "",
11556
- company: ((_c = order.shipping_address) == null ? void 0 : _c.company) ?? "",
11557
- address_1: ((_d = order.shipping_address) == null ? void 0 : _d.address_1) ?? "",
11558
- address_2: ((_e = order.shipping_address) == null ? void 0 : _e.address_2) ?? "",
11559
- city: ((_f = order.shipping_address) == null ? void 0 : _f.city) ?? "",
11560
- province: ((_g = order.shipping_address) == null ? void 0 : _g.province) ?? "",
11561
- country_code: ((_h = order.shipping_address) == null ? void 0 : _h.country_code) ?? "",
11562
- postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
11563
- phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
11564
- },
11565
- resolver: zodResolver(schema$2)
11566
- });
11567
- const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
11568
- const { handleSuccess } = useRouteModal();
11569
- const onSubmit = form.handleSubmit(async (data) => {
11570
- await mutateAsync(
11571
- {
11572
- shipping_address: {
11573
- first_name: data.first_name,
11574
- last_name: data.last_name,
11575
- company: data.company,
11576
- address_1: data.address_1,
11577
- address_2: data.address_2,
11578
- city: data.city,
11579
- province: data.province,
11580
- country_code: data.country_code,
11581
- postal_code: data.postal_code,
11582
- phone: data.phone
11583
- }
11584
- },
11585
- {
11586
- onSuccess: () => {
11587
- handleSuccess();
11588
- },
11589
- onError: (error) => {
11590
- toast.error(error.message);
11591
- }
11592
- }
11593
- );
11594
- });
11595
- return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(
11596
- KeyboundForm,
11597
- {
11598
- className: "flex flex-1 flex-col overflow-hidden",
11599
- onSubmit,
11600
- children: [
11601
- /* @__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: [
11602
- /* @__PURE__ */ jsx(
11603
- Form$2.Field,
11604
- {
11605
- control: form.control,
11606
- name: "country_code",
11607
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11608
- /* @__PURE__ */ jsx(Form$2.Label, { children: "Country" }),
11609
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(CountrySelect, { ...field }) }),
11610
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11611
- ] })
11612
- }
11613
- ),
11614
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
11615
- /* @__PURE__ */ jsx(
11616
- Form$2.Field,
11617
- {
11618
- control: form.control,
11619
- name: "first_name",
11620
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11621
- /* @__PURE__ */ jsx(Form$2.Label, { children: "First name" }),
11622
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11623
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11624
- ] })
11625
- }
11626
- ),
11627
- /* @__PURE__ */ jsx(
11628
- Form$2.Field,
11629
- {
11630
- control: form.control,
11631
- name: "last_name",
11632
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11633
- /* @__PURE__ */ jsx(Form$2.Label, { children: "Last name" }),
11634
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11635
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11636
- ] })
11637
- }
11638
- )
11639
- ] }),
11640
- /* @__PURE__ */ jsx(
11641
- Form$2.Field,
11642
- {
11643
- control: form.control,
11644
- name: "company",
11645
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11646
- /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Company" }),
11647
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11648
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11649
- ] })
11650
- }
11651
- ),
11652
- /* @__PURE__ */ jsx(
11653
- Form$2.Field,
11654
- {
11655
- control: form.control,
11656
- name: "address_1",
11657
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11658
- /* @__PURE__ */ jsx(Form$2.Label, { children: "Address" }),
11659
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11660
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11661
- ] })
11662
- }
11663
- ),
11664
- /* @__PURE__ */ jsx(
11665
- Form$2.Field,
11666
- {
11667
- control: form.control,
11668
- name: "address_2",
11669
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11670
- /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Apartment, suite, etc." }),
11671
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11672
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11673
- ] })
11674
- }
11675
- ),
11676
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
11677
- /* @__PURE__ */ jsx(
11678
- Form$2.Field,
11679
- {
11680
- control: form.control,
11681
- name: "postal_code",
11682
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11683
- /* @__PURE__ */ jsx(Form$2.Label, { children: "Postal code" }),
11684
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11685
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11686
- ] })
11687
- }
11688
- ),
11689
- /* @__PURE__ */ jsx(
11690
- Form$2.Field,
11691
- {
11692
- control: form.control,
11693
- name: "city",
11694
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11695
- /* @__PURE__ */ jsx(Form$2.Label, { children: "City" }),
11696
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11697
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11698
- ] })
11699
- }
11700
- )
11701
- ] }),
11702
- /* @__PURE__ */ jsx(
11703
- Form$2.Field,
11704
- {
11705
- control: form.control,
11706
- name: "province",
11707
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11708
- /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Province / State" }),
11709
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11710
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11711
- ] })
11712
- }
11713
- ),
11714
- /* @__PURE__ */ jsx(
11715
- Form$2.Field,
11716
- {
11717
- control: form.control,
11718
- name: "phone",
11719
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11720
- /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Phone" }),
11721
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11722
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11723
- ] })
11724
- }
11725
- )
11726
- ] }) }),
11727
- /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
11728
- /* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
11729
- /* @__PURE__ */ jsx(Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
11730
- ] }) })
11731
- ]
11732
- }
11733
- ) });
11734
- };
11735
- const schema$2 = addressSchema;
11736
11533
  const STACKED_FOCUS_MODAL_ID = "shipping-form";
11737
11534
  const Shipping = () => {
11738
11535
  var _a;
@@ -12540,6 +12337,209 @@ const CustomAmountField = ({
12540
12337
  }
12541
12338
  );
12542
12339
  };
12340
+ const ShippingAddress = () => {
12341
+ const { id } = useParams();
12342
+ const { order, isPending, isError, error } = useOrder(id, {
12343
+ fields: "+shipping_address"
12344
+ });
12345
+ if (isError) {
12346
+ throw error;
12347
+ }
12348
+ const isReady = !isPending && !!order;
12349
+ return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
12350
+ /* @__PURE__ */ jsxs(RouteDrawer.Header, { children: [
12351
+ /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Shipping Address" }) }),
12352
+ /* @__PURE__ */ jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Edit the shipping address for the draft order" }) })
12353
+ ] }),
12354
+ isReady && /* @__PURE__ */ jsx(ShippingAddressForm, { order })
12355
+ ] });
12356
+ };
12357
+ const ShippingAddressForm = ({ order }) => {
12358
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
12359
+ const form = useForm({
12360
+ defaultValues: {
12361
+ first_name: ((_a = order.shipping_address) == null ? void 0 : _a.first_name) ?? "",
12362
+ last_name: ((_b = order.shipping_address) == null ? void 0 : _b.last_name) ?? "",
12363
+ company: ((_c = order.shipping_address) == null ? void 0 : _c.company) ?? "",
12364
+ address_1: ((_d = order.shipping_address) == null ? void 0 : _d.address_1) ?? "",
12365
+ address_2: ((_e = order.shipping_address) == null ? void 0 : _e.address_2) ?? "",
12366
+ city: ((_f = order.shipping_address) == null ? void 0 : _f.city) ?? "",
12367
+ province: ((_g = order.shipping_address) == null ? void 0 : _g.province) ?? "",
12368
+ country_code: ((_h = order.shipping_address) == null ? void 0 : _h.country_code) ?? "",
12369
+ postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
12370
+ phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
12371
+ },
12372
+ resolver: zodResolver(schema$2)
12373
+ });
12374
+ const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12375
+ const { handleSuccess } = useRouteModal();
12376
+ const onSubmit = form.handleSubmit(async (data) => {
12377
+ await mutateAsync(
12378
+ {
12379
+ shipping_address: {
12380
+ first_name: data.first_name,
12381
+ last_name: data.last_name,
12382
+ company: data.company,
12383
+ address_1: data.address_1,
12384
+ address_2: data.address_2,
12385
+ city: data.city,
12386
+ province: data.province,
12387
+ country_code: data.country_code,
12388
+ postal_code: data.postal_code,
12389
+ phone: data.phone
12390
+ }
12391
+ },
12392
+ {
12393
+ onSuccess: () => {
12394
+ handleSuccess();
12395
+ },
12396
+ onError: (error) => {
12397
+ toast.error(error.message);
12398
+ }
12399
+ }
12400
+ );
12401
+ });
12402
+ return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(
12403
+ KeyboundForm,
12404
+ {
12405
+ className: "flex flex-1 flex-col overflow-hidden",
12406
+ onSubmit,
12407
+ children: [
12408
+ /* @__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: [
12409
+ /* @__PURE__ */ jsx(
12410
+ Form$2.Field,
12411
+ {
12412
+ control: form.control,
12413
+ name: "country_code",
12414
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12415
+ /* @__PURE__ */ jsx(Form$2.Label, { children: "Country" }),
12416
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(CountrySelect, { ...field }) }),
12417
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12418
+ ] })
12419
+ }
12420
+ ),
12421
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
12422
+ /* @__PURE__ */ jsx(
12423
+ Form$2.Field,
12424
+ {
12425
+ control: form.control,
12426
+ name: "first_name",
12427
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12428
+ /* @__PURE__ */ jsx(Form$2.Label, { children: "First name" }),
12429
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12430
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12431
+ ] })
12432
+ }
12433
+ ),
12434
+ /* @__PURE__ */ jsx(
12435
+ Form$2.Field,
12436
+ {
12437
+ control: form.control,
12438
+ name: "last_name",
12439
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12440
+ /* @__PURE__ */ jsx(Form$2.Label, { children: "Last name" }),
12441
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12442
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12443
+ ] })
12444
+ }
12445
+ )
12446
+ ] }),
12447
+ /* @__PURE__ */ jsx(
12448
+ Form$2.Field,
12449
+ {
12450
+ control: form.control,
12451
+ name: "company",
12452
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12453
+ /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Company" }),
12454
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12455
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12456
+ ] })
12457
+ }
12458
+ ),
12459
+ /* @__PURE__ */ jsx(
12460
+ Form$2.Field,
12461
+ {
12462
+ control: form.control,
12463
+ name: "address_1",
12464
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12465
+ /* @__PURE__ */ jsx(Form$2.Label, { children: "Address" }),
12466
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12467
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12468
+ ] })
12469
+ }
12470
+ ),
12471
+ /* @__PURE__ */ jsx(
12472
+ Form$2.Field,
12473
+ {
12474
+ control: form.control,
12475
+ name: "address_2",
12476
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12477
+ /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Apartment, suite, etc." }),
12478
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12479
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12480
+ ] })
12481
+ }
12482
+ ),
12483
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
12484
+ /* @__PURE__ */ jsx(
12485
+ Form$2.Field,
12486
+ {
12487
+ control: form.control,
12488
+ name: "postal_code",
12489
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12490
+ /* @__PURE__ */ jsx(Form$2.Label, { children: "Postal code" }),
12491
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12492
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12493
+ ] })
12494
+ }
12495
+ ),
12496
+ /* @__PURE__ */ jsx(
12497
+ Form$2.Field,
12498
+ {
12499
+ control: form.control,
12500
+ name: "city",
12501
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12502
+ /* @__PURE__ */ jsx(Form$2.Label, { children: "City" }),
12503
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12504
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12505
+ ] })
12506
+ }
12507
+ )
12508
+ ] }),
12509
+ /* @__PURE__ */ jsx(
12510
+ Form$2.Field,
12511
+ {
12512
+ control: form.control,
12513
+ name: "province",
12514
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12515
+ /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Province / State" }),
12516
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12517
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12518
+ ] })
12519
+ }
12520
+ ),
12521
+ /* @__PURE__ */ jsx(
12522
+ Form$2.Field,
12523
+ {
12524
+ control: form.control,
12525
+ name: "phone",
12526
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12527
+ /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Phone" }),
12528
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12529
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12530
+ ] })
12531
+ }
12532
+ )
12533
+ ] }) }),
12534
+ /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
12535
+ /* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
12536
+ /* @__PURE__ */ jsx(Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
12537
+ ] }) })
12538
+ ]
12539
+ }
12540
+ ) });
12541
+ };
12542
+ const schema$2 = addressSchema;
12543
12543
  const TransferOwnership = () => {
12544
12544
  const { id } = useParams();
12545
12545
  const { draft_order, isPending, isError, error } = useDraftOrder(id, {
@@ -13081,14 +13081,14 @@ const routeModule = {
13081
13081
  Component: SalesChannel,
13082
13082
  path: "/draft-orders/:id/sales-channel"
13083
13083
  },
13084
- {
13085
- Component: ShippingAddress,
13086
- path: "/draft-orders/:id/shipping-address"
13087
- },
13088
13084
  {
13089
13085
  Component: Shipping,
13090
13086
  path: "/draft-orders/:id/shipping"
13091
13087
  },
13088
+ {
13089
+ Component: ShippingAddress,
13090
+ path: "/draft-orders/:id/shipping-address"
13091
+ },
13092
13092
  {
13093
13093
  Component: TransferOwnership,
13094
13094
  path: "/draft-orders/:id/transfer-ownership"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/draft-order",
3
- "version": "2.11.2-snapshot-20251028102245",
3
+ "version": "2.11.2-snapshot-20251029124358",
4
4
  "description": "A starter for Medusa plugins.",
5
5
  "author": "Medusa (https://medusajs.com)",
6
6
  "license": "MIT",
@@ -36,7 +36,7 @@
36
36
  "dependencies": {
37
37
  "@ariakit/react": "^0.4.15",
38
38
  "@hookform/resolvers": "3.4.2",
39
- "@medusajs/js-sdk": "2.11.2-snapshot-20251028102245",
39
+ "@medusajs/js-sdk": "2.11.2-snapshot-20251029124358",
40
40
  "@tanstack/react-query": "5.64.2",
41
41
  "@uiw/react-json-view": "^2.0.0-alpha.17",
42
42
  "date-fns": "^3.6.0",
@@ -45,14 +45,14 @@
45
45
  "react-hook-form": "7.49.1"
46
46
  },
47
47
  "devDependencies": {
48
- "@medusajs/admin-sdk": "2.11.2-snapshot-20251028102245",
49
- "@medusajs/cli": "2.11.2-snapshot-20251028102245",
50
- "@medusajs/framework": "2.11.2-snapshot-20251028102245",
51
- "@medusajs/icons": "2.11.2-snapshot-20251028102245",
52
- "@medusajs/test-utils": "2.11.2-snapshot-20251028102245",
53
- "@medusajs/types": "2.11.2-snapshot-20251028102245",
54
- "@medusajs/ui": "4.0.26-snapshot-20251028102245",
55
- "@medusajs/ui-preset": "2.11.2-snapshot-20251028102245",
48
+ "@medusajs/admin-sdk": "2.11.2-snapshot-20251029124358",
49
+ "@medusajs/cli": "2.11.2-snapshot-20251029124358",
50
+ "@medusajs/framework": "2.11.2-snapshot-20251029124358",
51
+ "@medusajs/icons": "2.11.2-snapshot-20251029124358",
52
+ "@medusajs/test-utils": "2.11.2-snapshot-20251029124358",
53
+ "@medusajs/types": "2.11.2-snapshot-20251029124358",
54
+ "@medusajs/ui": "4.0.26-snapshot-20251029124358",
55
+ "@medusajs/ui-preset": "2.11.2-snapshot-20251029124358",
56
56
  "@swc/core": "1.5.7",
57
57
  "@types/lodash": "^4.17.15",
58
58
  "@types/node": "^20.0.0",
@@ -69,12 +69,12 @@
69
69
  "yalc": "^1.0.0-pre.53"
70
70
  },
71
71
  "peerDependencies": {
72
- "@medusajs/admin-sdk": "2.11.2-snapshot-20251028102245",
73
- "@medusajs/cli": "2.11.2-snapshot-20251028102245",
74
- "@medusajs/framework": "2.11.2-snapshot-20251028102245",
75
- "@medusajs/icons": "2.11.2-snapshot-20251028102245",
76
- "@medusajs/test-utils": "2.11.2-snapshot-20251028102245",
77
- "@medusajs/ui": "4.0.26-snapshot-20251028102245",
72
+ "@medusajs/admin-sdk": "2.11.2-snapshot-20251029124358",
73
+ "@medusajs/cli": "2.11.2-snapshot-20251029124358",
74
+ "@medusajs/framework": "2.11.2-snapshot-20251029124358",
75
+ "@medusajs/icons": "2.11.2-snapshot-20251029124358",
76
+ "@medusajs/test-utils": "2.11.2-snapshot-20251029124358",
77
+ "@medusajs/ui": "4.0.26-snapshot-20251029124358",
78
78
  "lodash": "^4.17.21",
79
79
  "react-router-dom": "6.20.1"
80
80
  },