@medusajs/draft-order 2.11.2-preview-20251029180202 → 2.11.2-preview-20251030000332

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.
@@ -11489,209 +11489,6 @@ const SalesChannelField = ({ control, order }) => {
11489
11489
  const schema$3 = objectType({
11490
11490
  sales_channel_id: stringType().min(1)
11491
11491
  });
11492
- const ShippingAddress = () => {
11493
- const { id } = reactRouterDom.useParams();
11494
- const { order, isPending, isError, error } = useOrder(id, {
11495
- fields: "+shipping_address"
11496
- });
11497
- if (isError) {
11498
- throw error;
11499
- }
11500
- const isReady = !isPending && !!order;
11501
- return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
11502
- /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer.Header, { children: [
11503
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Shipping Address" }) }),
11504
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Edit the shipping address for the draft order" }) })
11505
- ] }),
11506
- isReady && /* @__PURE__ */ jsxRuntime.jsx(ShippingAddressForm, { order })
11507
- ] });
11508
- };
11509
- const ShippingAddressForm = ({ order }) => {
11510
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
11511
- const form = reactHookForm.useForm({
11512
- defaultValues: {
11513
- first_name: ((_a = order.shipping_address) == null ? void 0 : _a.first_name) ?? "",
11514
- last_name: ((_b = order.shipping_address) == null ? void 0 : _b.last_name) ?? "",
11515
- company: ((_c = order.shipping_address) == null ? void 0 : _c.company) ?? "",
11516
- address_1: ((_d = order.shipping_address) == null ? void 0 : _d.address_1) ?? "",
11517
- address_2: ((_e = order.shipping_address) == null ? void 0 : _e.address_2) ?? "",
11518
- city: ((_f = order.shipping_address) == null ? void 0 : _f.city) ?? "",
11519
- province: ((_g = order.shipping_address) == null ? void 0 : _g.province) ?? "",
11520
- country_code: ((_h = order.shipping_address) == null ? void 0 : _h.country_code) ?? "",
11521
- postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
11522
- phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
11523
- },
11524
- resolver: zod.zodResolver(schema$2)
11525
- });
11526
- const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
11527
- const { handleSuccess } = useRouteModal();
11528
- const onSubmit = form.handleSubmit(async (data) => {
11529
- await mutateAsync(
11530
- {
11531
- shipping_address: {
11532
- first_name: data.first_name,
11533
- last_name: data.last_name,
11534
- company: data.company,
11535
- address_1: data.address_1,
11536
- address_2: data.address_2,
11537
- city: data.city,
11538
- province: data.province,
11539
- country_code: data.country_code,
11540
- postal_code: data.postal_code,
11541
- phone: data.phone
11542
- }
11543
- },
11544
- {
11545
- onSuccess: () => {
11546
- handleSuccess();
11547
- },
11548
- onError: (error) => {
11549
- ui.toast.error(error.message);
11550
- }
11551
- }
11552
- );
11553
- });
11554
- return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(
11555
- KeyboundForm,
11556
- {
11557
- className: "flex flex-1 flex-col overflow-hidden",
11558
- onSubmit,
11559
- children: [
11560
- /* @__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: [
11561
- /* @__PURE__ */ jsxRuntime.jsx(
11562
- Form$2.Field,
11563
- {
11564
- control: form.control,
11565
- name: "country_code",
11566
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11567
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Country" }),
11568
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(CountrySelect, { ...field }) }),
11569
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11570
- ] })
11571
- }
11572
- ),
11573
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
11574
- /* @__PURE__ */ jsxRuntime.jsx(
11575
- Form$2.Field,
11576
- {
11577
- control: form.control,
11578
- name: "first_name",
11579
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11580
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "First name" }),
11581
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11582
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11583
- ] })
11584
- }
11585
- ),
11586
- /* @__PURE__ */ jsxRuntime.jsx(
11587
- Form$2.Field,
11588
- {
11589
- control: form.control,
11590
- name: "last_name",
11591
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11592
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Last name" }),
11593
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11594
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11595
- ] })
11596
- }
11597
- )
11598
- ] }),
11599
- /* @__PURE__ */ jsxRuntime.jsx(
11600
- Form$2.Field,
11601
- {
11602
- control: form.control,
11603
- name: "company",
11604
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11605
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Company" }),
11606
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11607
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11608
- ] })
11609
- }
11610
- ),
11611
- /* @__PURE__ */ jsxRuntime.jsx(
11612
- Form$2.Field,
11613
- {
11614
- control: form.control,
11615
- name: "address_1",
11616
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11617
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Address" }),
11618
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11619
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11620
- ] })
11621
- }
11622
- ),
11623
- /* @__PURE__ */ jsxRuntime.jsx(
11624
- Form$2.Field,
11625
- {
11626
- control: form.control,
11627
- name: "address_2",
11628
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11629
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Apartment, suite, etc." }),
11630
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11631
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11632
- ] })
11633
- }
11634
- ),
11635
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
11636
- /* @__PURE__ */ jsxRuntime.jsx(
11637
- Form$2.Field,
11638
- {
11639
- control: form.control,
11640
- name: "postal_code",
11641
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11642
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Postal code" }),
11643
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11644
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11645
- ] })
11646
- }
11647
- ),
11648
- /* @__PURE__ */ jsxRuntime.jsx(
11649
- Form$2.Field,
11650
- {
11651
- control: form.control,
11652
- name: "city",
11653
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11654
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "City" }),
11655
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11656
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11657
- ] })
11658
- }
11659
- )
11660
- ] }),
11661
- /* @__PURE__ */ jsxRuntime.jsx(
11662
- Form$2.Field,
11663
- {
11664
- control: form.control,
11665
- name: "province",
11666
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11667
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Province / State" }),
11668
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11669
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11670
- ] })
11671
- }
11672
- ),
11673
- /* @__PURE__ */ jsxRuntime.jsx(
11674
- Form$2.Field,
11675
- {
11676
- control: form.control,
11677
- name: "phone",
11678
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11679
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Phone" }),
11680
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11681
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11682
- ] })
11683
- }
11684
- )
11685
- ] }) }),
11686
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
11687
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
11688
- /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
11689
- ] }) })
11690
- ]
11691
- }
11692
- ) });
11693
- };
11694
- const schema$2 = addressSchema;
11695
11492
  const STACKED_FOCUS_MODAL_ID = "shipping-form";
11696
11493
  const Shipping = () => {
11697
11494
  var _a;
@@ -12499,6 +12296,209 @@ const CustomAmountField = ({
12499
12296
  }
12500
12297
  );
12501
12298
  };
12299
+ const ShippingAddress = () => {
12300
+ const { id } = reactRouterDom.useParams();
12301
+ const { order, isPending, isError, error } = useOrder(id, {
12302
+ fields: "+shipping_address"
12303
+ });
12304
+ if (isError) {
12305
+ throw error;
12306
+ }
12307
+ const isReady = !isPending && !!order;
12308
+ return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
12309
+ /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer.Header, { children: [
12310
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Shipping Address" }) }),
12311
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Edit the shipping address for the draft order" }) })
12312
+ ] }),
12313
+ isReady && /* @__PURE__ */ jsxRuntime.jsx(ShippingAddressForm, { order })
12314
+ ] });
12315
+ };
12316
+ const ShippingAddressForm = ({ order }) => {
12317
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
12318
+ const form = reactHookForm.useForm({
12319
+ defaultValues: {
12320
+ first_name: ((_a = order.shipping_address) == null ? void 0 : _a.first_name) ?? "",
12321
+ last_name: ((_b = order.shipping_address) == null ? void 0 : _b.last_name) ?? "",
12322
+ company: ((_c = order.shipping_address) == null ? void 0 : _c.company) ?? "",
12323
+ address_1: ((_d = order.shipping_address) == null ? void 0 : _d.address_1) ?? "",
12324
+ address_2: ((_e = order.shipping_address) == null ? void 0 : _e.address_2) ?? "",
12325
+ city: ((_f = order.shipping_address) == null ? void 0 : _f.city) ?? "",
12326
+ province: ((_g = order.shipping_address) == null ? void 0 : _g.province) ?? "",
12327
+ country_code: ((_h = order.shipping_address) == null ? void 0 : _h.country_code) ?? "",
12328
+ postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
12329
+ phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
12330
+ },
12331
+ resolver: zod.zodResolver(schema$2)
12332
+ });
12333
+ const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12334
+ const { handleSuccess } = useRouteModal();
12335
+ const onSubmit = form.handleSubmit(async (data) => {
12336
+ await mutateAsync(
12337
+ {
12338
+ shipping_address: {
12339
+ first_name: data.first_name,
12340
+ last_name: data.last_name,
12341
+ company: data.company,
12342
+ address_1: data.address_1,
12343
+ address_2: data.address_2,
12344
+ city: data.city,
12345
+ province: data.province,
12346
+ country_code: data.country_code,
12347
+ postal_code: data.postal_code,
12348
+ phone: data.phone
12349
+ }
12350
+ },
12351
+ {
12352
+ onSuccess: () => {
12353
+ handleSuccess();
12354
+ },
12355
+ onError: (error) => {
12356
+ ui.toast.error(error.message);
12357
+ }
12358
+ }
12359
+ );
12360
+ });
12361
+ return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(
12362
+ KeyboundForm,
12363
+ {
12364
+ className: "flex flex-1 flex-col overflow-hidden",
12365
+ onSubmit,
12366
+ children: [
12367
+ /* @__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: [
12368
+ /* @__PURE__ */ jsxRuntime.jsx(
12369
+ Form$2.Field,
12370
+ {
12371
+ control: form.control,
12372
+ name: "country_code",
12373
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12374
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Country" }),
12375
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(CountrySelect, { ...field }) }),
12376
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12377
+ ] })
12378
+ }
12379
+ ),
12380
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
12381
+ /* @__PURE__ */ jsxRuntime.jsx(
12382
+ Form$2.Field,
12383
+ {
12384
+ control: form.control,
12385
+ name: "first_name",
12386
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12387
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "First name" }),
12388
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12389
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12390
+ ] })
12391
+ }
12392
+ ),
12393
+ /* @__PURE__ */ jsxRuntime.jsx(
12394
+ Form$2.Field,
12395
+ {
12396
+ control: form.control,
12397
+ name: "last_name",
12398
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12399
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Last name" }),
12400
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12401
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12402
+ ] })
12403
+ }
12404
+ )
12405
+ ] }),
12406
+ /* @__PURE__ */ jsxRuntime.jsx(
12407
+ Form$2.Field,
12408
+ {
12409
+ control: form.control,
12410
+ name: "company",
12411
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12412
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Company" }),
12413
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12414
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12415
+ ] })
12416
+ }
12417
+ ),
12418
+ /* @__PURE__ */ jsxRuntime.jsx(
12419
+ Form$2.Field,
12420
+ {
12421
+ control: form.control,
12422
+ name: "address_1",
12423
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12424
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Address" }),
12425
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12426
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12427
+ ] })
12428
+ }
12429
+ ),
12430
+ /* @__PURE__ */ jsxRuntime.jsx(
12431
+ Form$2.Field,
12432
+ {
12433
+ control: form.control,
12434
+ name: "address_2",
12435
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12436
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Apartment, suite, etc." }),
12437
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12438
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12439
+ ] })
12440
+ }
12441
+ ),
12442
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
12443
+ /* @__PURE__ */ jsxRuntime.jsx(
12444
+ Form$2.Field,
12445
+ {
12446
+ control: form.control,
12447
+ name: "postal_code",
12448
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12449
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Postal code" }),
12450
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12451
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12452
+ ] })
12453
+ }
12454
+ ),
12455
+ /* @__PURE__ */ jsxRuntime.jsx(
12456
+ Form$2.Field,
12457
+ {
12458
+ control: form.control,
12459
+ name: "city",
12460
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12461
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "City" }),
12462
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12463
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12464
+ ] })
12465
+ }
12466
+ )
12467
+ ] }),
12468
+ /* @__PURE__ */ jsxRuntime.jsx(
12469
+ Form$2.Field,
12470
+ {
12471
+ control: form.control,
12472
+ name: "province",
12473
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12474
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Province / State" }),
12475
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12476
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12477
+ ] })
12478
+ }
12479
+ ),
12480
+ /* @__PURE__ */ jsxRuntime.jsx(
12481
+ Form$2.Field,
12482
+ {
12483
+ control: form.control,
12484
+ name: "phone",
12485
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12486
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Phone" }),
12487
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12488
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12489
+ ] })
12490
+ }
12491
+ )
12492
+ ] }) }),
12493
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
12494
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
12495
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
12496
+ ] }) })
12497
+ ]
12498
+ }
12499
+ ) });
12500
+ };
12501
+ const schema$2 = addressSchema;
12502
12502
  const TransferOwnership = () => {
12503
12503
  const { id } = reactRouterDom.useParams();
12504
12504
  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"
@@ -11483,209 +11483,6 @@ const SalesChannelField = ({ control, order }) => {
11483
11483
  const schema$3 = objectType({
11484
11484
  sales_channel_id: stringType().min(1)
11485
11485
  });
11486
- const ShippingAddress = () => {
11487
- const { id } = useParams();
11488
- const { order, isPending, isError, error } = useOrder(id, {
11489
- fields: "+shipping_address"
11490
- });
11491
- if (isError) {
11492
- throw error;
11493
- }
11494
- const isReady = !isPending && !!order;
11495
- return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
11496
- /* @__PURE__ */ jsxs(RouteDrawer.Header, { children: [
11497
- /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Shipping Address" }) }),
11498
- /* @__PURE__ */ jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Edit the shipping address for the draft order" }) })
11499
- ] }),
11500
- isReady && /* @__PURE__ */ jsx(ShippingAddressForm, { order })
11501
- ] });
11502
- };
11503
- const ShippingAddressForm = ({ order }) => {
11504
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
11505
- const form = useForm({
11506
- defaultValues: {
11507
- first_name: ((_a = order.shipping_address) == null ? void 0 : _a.first_name) ?? "",
11508
- last_name: ((_b = order.shipping_address) == null ? void 0 : _b.last_name) ?? "",
11509
- company: ((_c = order.shipping_address) == null ? void 0 : _c.company) ?? "",
11510
- address_1: ((_d = order.shipping_address) == null ? void 0 : _d.address_1) ?? "",
11511
- address_2: ((_e = order.shipping_address) == null ? void 0 : _e.address_2) ?? "",
11512
- city: ((_f = order.shipping_address) == null ? void 0 : _f.city) ?? "",
11513
- province: ((_g = order.shipping_address) == null ? void 0 : _g.province) ?? "",
11514
- country_code: ((_h = order.shipping_address) == null ? void 0 : _h.country_code) ?? "",
11515
- postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
11516
- phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
11517
- },
11518
- resolver: zodResolver(schema$2)
11519
- });
11520
- const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
11521
- const { handleSuccess } = useRouteModal();
11522
- const onSubmit = form.handleSubmit(async (data) => {
11523
- await mutateAsync(
11524
- {
11525
- shipping_address: {
11526
- first_name: data.first_name,
11527
- last_name: data.last_name,
11528
- company: data.company,
11529
- address_1: data.address_1,
11530
- address_2: data.address_2,
11531
- city: data.city,
11532
- province: data.province,
11533
- country_code: data.country_code,
11534
- postal_code: data.postal_code,
11535
- phone: data.phone
11536
- }
11537
- },
11538
- {
11539
- onSuccess: () => {
11540
- handleSuccess();
11541
- },
11542
- onError: (error) => {
11543
- toast.error(error.message);
11544
- }
11545
- }
11546
- );
11547
- });
11548
- return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(
11549
- KeyboundForm,
11550
- {
11551
- className: "flex flex-1 flex-col overflow-hidden",
11552
- onSubmit,
11553
- children: [
11554
- /* @__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: [
11555
- /* @__PURE__ */ jsx(
11556
- Form$2.Field,
11557
- {
11558
- control: form.control,
11559
- name: "country_code",
11560
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11561
- /* @__PURE__ */ jsx(Form$2.Label, { children: "Country" }),
11562
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(CountrySelect, { ...field }) }),
11563
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11564
- ] })
11565
- }
11566
- ),
11567
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
11568
- /* @__PURE__ */ jsx(
11569
- Form$2.Field,
11570
- {
11571
- control: form.control,
11572
- name: "first_name",
11573
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11574
- /* @__PURE__ */ jsx(Form$2.Label, { children: "First name" }),
11575
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11576
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11577
- ] })
11578
- }
11579
- ),
11580
- /* @__PURE__ */ jsx(
11581
- Form$2.Field,
11582
- {
11583
- control: form.control,
11584
- name: "last_name",
11585
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11586
- /* @__PURE__ */ jsx(Form$2.Label, { children: "Last name" }),
11587
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11588
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11589
- ] })
11590
- }
11591
- )
11592
- ] }),
11593
- /* @__PURE__ */ jsx(
11594
- Form$2.Field,
11595
- {
11596
- control: form.control,
11597
- name: "company",
11598
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11599
- /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Company" }),
11600
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11601
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11602
- ] })
11603
- }
11604
- ),
11605
- /* @__PURE__ */ jsx(
11606
- Form$2.Field,
11607
- {
11608
- control: form.control,
11609
- name: "address_1",
11610
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11611
- /* @__PURE__ */ jsx(Form$2.Label, { children: "Address" }),
11612
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11613
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11614
- ] })
11615
- }
11616
- ),
11617
- /* @__PURE__ */ jsx(
11618
- Form$2.Field,
11619
- {
11620
- control: form.control,
11621
- name: "address_2",
11622
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11623
- /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Apartment, suite, etc." }),
11624
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11625
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11626
- ] })
11627
- }
11628
- ),
11629
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
11630
- /* @__PURE__ */ jsx(
11631
- Form$2.Field,
11632
- {
11633
- control: form.control,
11634
- name: "postal_code",
11635
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11636
- /* @__PURE__ */ jsx(Form$2.Label, { children: "Postal code" }),
11637
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11638
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11639
- ] })
11640
- }
11641
- ),
11642
- /* @__PURE__ */ jsx(
11643
- Form$2.Field,
11644
- {
11645
- control: form.control,
11646
- name: "city",
11647
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11648
- /* @__PURE__ */ jsx(Form$2.Label, { children: "City" }),
11649
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11650
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11651
- ] })
11652
- }
11653
- )
11654
- ] }),
11655
- /* @__PURE__ */ jsx(
11656
- Form$2.Field,
11657
- {
11658
- control: form.control,
11659
- name: "province",
11660
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11661
- /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Province / State" }),
11662
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11663
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11664
- ] })
11665
- }
11666
- ),
11667
- /* @__PURE__ */ jsx(
11668
- Form$2.Field,
11669
- {
11670
- control: form.control,
11671
- name: "phone",
11672
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11673
- /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Phone" }),
11674
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11675
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11676
- ] })
11677
- }
11678
- )
11679
- ] }) }),
11680
- /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
11681
- /* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
11682
- /* @__PURE__ */ jsx(Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
11683
- ] }) })
11684
- ]
11685
- }
11686
- ) });
11687
- };
11688
- const schema$2 = addressSchema;
11689
11486
  const STACKED_FOCUS_MODAL_ID = "shipping-form";
11690
11487
  const Shipping = () => {
11691
11488
  var _a;
@@ -12493,6 +12290,209 @@ const CustomAmountField = ({
12493
12290
  }
12494
12291
  );
12495
12292
  };
12293
+ const ShippingAddress = () => {
12294
+ const { id } = useParams();
12295
+ const { order, isPending, isError, error } = useOrder(id, {
12296
+ fields: "+shipping_address"
12297
+ });
12298
+ if (isError) {
12299
+ throw error;
12300
+ }
12301
+ const isReady = !isPending && !!order;
12302
+ return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
12303
+ /* @__PURE__ */ jsxs(RouteDrawer.Header, { children: [
12304
+ /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Shipping Address" }) }),
12305
+ /* @__PURE__ */ jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Edit the shipping address for the draft order" }) })
12306
+ ] }),
12307
+ isReady && /* @__PURE__ */ jsx(ShippingAddressForm, { order })
12308
+ ] });
12309
+ };
12310
+ const ShippingAddressForm = ({ order }) => {
12311
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
12312
+ const form = useForm({
12313
+ defaultValues: {
12314
+ first_name: ((_a = order.shipping_address) == null ? void 0 : _a.first_name) ?? "",
12315
+ last_name: ((_b = order.shipping_address) == null ? void 0 : _b.last_name) ?? "",
12316
+ company: ((_c = order.shipping_address) == null ? void 0 : _c.company) ?? "",
12317
+ address_1: ((_d = order.shipping_address) == null ? void 0 : _d.address_1) ?? "",
12318
+ address_2: ((_e = order.shipping_address) == null ? void 0 : _e.address_2) ?? "",
12319
+ city: ((_f = order.shipping_address) == null ? void 0 : _f.city) ?? "",
12320
+ province: ((_g = order.shipping_address) == null ? void 0 : _g.province) ?? "",
12321
+ country_code: ((_h = order.shipping_address) == null ? void 0 : _h.country_code) ?? "",
12322
+ postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
12323
+ phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
12324
+ },
12325
+ resolver: zodResolver(schema$2)
12326
+ });
12327
+ const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12328
+ const { handleSuccess } = useRouteModal();
12329
+ const onSubmit = form.handleSubmit(async (data) => {
12330
+ await mutateAsync(
12331
+ {
12332
+ shipping_address: {
12333
+ first_name: data.first_name,
12334
+ last_name: data.last_name,
12335
+ company: data.company,
12336
+ address_1: data.address_1,
12337
+ address_2: data.address_2,
12338
+ city: data.city,
12339
+ province: data.province,
12340
+ country_code: data.country_code,
12341
+ postal_code: data.postal_code,
12342
+ phone: data.phone
12343
+ }
12344
+ },
12345
+ {
12346
+ onSuccess: () => {
12347
+ handleSuccess();
12348
+ },
12349
+ onError: (error) => {
12350
+ toast.error(error.message);
12351
+ }
12352
+ }
12353
+ );
12354
+ });
12355
+ return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(
12356
+ KeyboundForm,
12357
+ {
12358
+ className: "flex flex-1 flex-col overflow-hidden",
12359
+ onSubmit,
12360
+ children: [
12361
+ /* @__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: [
12362
+ /* @__PURE__ */ jsx(
12363
+ Form$2.Field,
12364
+ {
12365
+ control: form.control,
12366
+ name: "country_code",
12367
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12368
+ /* @__PURE__ */ jsx(Form$2.Label, { children: "Country" }),
12369
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(CountrySelect, { ...field }) }),
12370
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12371
+ ] })
12372
+ }
12373
+ ),
12374
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
12375
+ /* @__PURE__ */ jsx(
12376
+ Form$2.Field,
12377
+ {
12378
+ control: form.control,
12379
+ name: "first_name",
12380
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12381
+ /* @__PURE__ */ jsx(Form$2.Label, { children: "First name" }),
12382
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12383
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12384
+ ] })
12385
+ }
12386
+ ),
12387
+ /* @__PURE__ */ jsx(
12388
+ Form$2.Field,
12389
+ {
12390
+ control: form.control,
12391
+ name: "last_name",
12392
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12393
+ /* @__PURE__ */ jsx(Form$2.Label, { children: "Last name" }),
12394
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12395
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12396
+ ] })
12397
+ }
12398
+ )
12399
+ ] }),
12400
+ /* @__PURE__ */ jsx(
12401
+ Form$2.Field,
12402
+ {
12403
+ control: form.control,
12404
+ name: "company",
12405
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12406
+ /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Company" }),
12407
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12408
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12409
+ ] })
12410
+ }
12411
+ ),
12412
+ /* @__PURE__ */ jsx(
12413
+ Form$2.Field,
12414
+ {
12415
+ control: form.control,
12416
+ name: "address_1",
12417
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12418
+ /* @__PURE__ */ jsx(Form$2.Label, { children: "Address" }),
12419
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12420
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12421
+ ] })
12422
+ }
12423
+ ),
12424
+ /* @__PURE__ */ jsx(
12425
+ Form$2.Field,
12426
+ {
12427
+ control: form.control,
12428
+ name: "address_2",
12429
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12430
+ /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Apartment, suite, etc." }),
12431
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12432
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12433
+ ] })
12434
+ }
12435
+ ),
12436
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
12437
+ /* @__PURE__ */ jsx(
12438
+ Form$2.Field,
12439
+ {
12440
+ control: form.control,
12441
+ name: "postal_code",
12442
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12443
+ /* @__PURE__ */ jsx(Form$2.Label, { children: "Postal code" }),
12444
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12445
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12446
+ ] })
12447
+ }
12448
+ ),
12449
+ /* @__PURE__ */ jsx(
12450
+ Form$2.Field,
12451
+ {
12452
+ control: form.control,
12453
+ name: "city",
12454
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12455
+ /* @__PURE__ */ jsx(Form$2.Label, { children: "City" }),
12456
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12457
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12458
+ ] })
12459
+ }
12460
+ )
12461
+ ] }),
12462
+ /* @__PURE__ */ jsx(
12463
+ Form$2.Field,
12464
+ {
12465
+ control: form.control,
12466
+ name: "province",
12467
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12468
+ /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Province / State" }),
12469
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12470
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12471
+ ] })
12472
+ }
12473
+ ),
12474
+ /* @__PURE__ */ jsx(
12475
+ Form$2.Field,
12476
+ {
12477
+ control: form.control,
12478
+ name: "phone",
12479
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12480
+ /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Phone" }),
12481
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12482
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12483
+ ] })
12484
+ }
12485
+ )
12486
+ ] }) }),
12487
+ /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
12488
+ /* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
12489
+ /* @__PURE__ */ jsx(Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
12490
+ ] }) })
12491
+ ]
12492
+ }
12493
+ ) });
12494
+ };
12495
+ const schema$2 = addressSchema;
12496
12496
  const TransferOwnership = () => {
12497
12497
  const { id } = useParams();
12498
12498
  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-preview-20251029180202",
3
+ "version": "2.11.2-preview-20251030000332",
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-preview-20251029180202",
39
+ "@medusajs/js-sdk": "2.11.2-preview-20251030000332",
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-preview-20251029180202",
49
- "@medusajs/cli": "2.11.2-preview-20251029180202",
50
- "@medusajs/framework": "2.11.2-preview-20251029180202",
51
- "@medusajs/icons": "2.11.2-preview-20251029180202",
52
- "@medusajs/test-utils": "2.11.2-preview-20251029180202",
53
- "@medusajs/types": "2.11.2-preview-20251029180202",
54
- "@medusajs/ui": "4.0.26-preview-20251029180202",
55
- "@medusajs/ui-preset": "2.11.2-preview-20251029180202",
48
+ "@medusajs/admin-sdk": "2.11.2-preview-20251030000332",
49
+ "@medusajs/cli": "2.11.2-preview-20251030000332",
50
+ "@medusajs/framework": "2.11.2-preview-20251030000332",
51
+ "@medusajs/icons": "2.11.2-preview-20251030000332",
52
+ "@medusajs/test-utils": "2.11.2-preview-20251030000332",
53
+ "@medusajs/types": "2.11.2-preview-20251030000332",
54
+ "@medusajs/ui": "4.0.26-preview-20251030000332",
55
+ "@medusajs/ui-preset": "2.11.2-preview-20251030000332",
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-preview-20251029180202",
73
- "@medusajs/cli": "2.11.2-preview-20251029180202",
74
- "@medusajs/framework": "2.11.2-preview-20251029180202",
75
- "@medusajs/icons": "2.11.2-preview-20251029180202",
76
- "@medusajs/test-utils": "2.11.2-preview-20251029180202",
77
- "@medusajs/ui": "4.0.26-preview-20251029180202",
72
+ "@medusajs/admin-sdk": "2.11.2-preview-20251030000332",
73
+ "@medusajs/cli": "2.11.2-preview-20251030000332",
74
+ "@medusajs/framework": "2.11.2-preview-20251030000332",
75
+ "@medusajs/icons": "2.11.2-preview-20251030000332",
76
+ "@medusajs/test-utils": "2.11.2-preview-20251030000332",
77
+ "@medusajs/ui": "4.0.26-preview-20251030000332",
78
78
  "lodash": "^4.17.21",
79
79
  "react-router-dom": "6.20.1"
80
80
  },